X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=rel%2Ffiles%2Fbin%2Fpleroma_ctl;h=87c486514008b84086e308efee4f7774cc85afad;hb=7ac5f210ea386b9c0e75626a71fd01c6ef9d4408;hp=90f87a9909ed3960976019088645119c8958a917;hpb=da0e4879bcd12849182a39445174384420fcf064;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 "$@"