aboutsummaryrefslogtreecommitdiff
path: root/rel/files/bin
diff options
context:
space:
mode:
Diffstat (limited to 'rel/files/bin')
-rwxr-xr-xrel/files/bin/pleroma_ctl12
1 files changed, 8 insertions, 4 deletions
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 "$@"