X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=rel%2Ffiles%2Fbin%2Fpleroma_ctl;h=87c486514008b84086e308efee4f7774cc85afad;hb=904598b89c78296f31e7e7703cd6f23e1e916d66;hp=90f87a9909ed3960976019088645119c8958a917;hpb=3b1bc079af8fb6e467a9114de0d32e2de59a7fab;p=akkoma diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl index 90f87a990..87c486514 100755 --- a/rel/files/bin/pleroma_ctl +++ b/rel/files/bin/pleroma_ctl @@ -140,12 +140,16 @@ else FULL_ARGS="$*" ACTION="$1" - shift - - if [ "$(echo \"$1\" | grep \"^-\" >/dev/null)" = false ]; then - SUBACTION="$1" + if [ $# -gt 0 ]; then shift fi + echo "$1" | grep "^-" >/dev/null + if [ $? -eq 1 ]; then + SUBACTION="$1" + if [ $# -gt 0 ]; then + shift + fi + fi if [ "$ACTION" = "update" ]; then update "$@"