X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famcleanup.sh.in;h=f301c5c84ed7bdbf46d151c01db383e60ed19e76;hb=34197d9f46a5f4e944378cbb65fca32ee0eec7b9;hp=2590932ca0841ff3a5e242260392da00337c70b7;hpb=12179dea039515c06168c0037d048566a3f623de;p=debian%2Famanda diff --git a/server-src/amcleanup.sh.in b/server-src/amcleanup.sh.in index 2590932..f301c5c 100644 --- a/server-src/amcleanup.sh.in +++ b/server-src/amcleanup.sh.in @@ -48,25 +48,26 @@ else fi if test -h /proc/1/exe ; then - if test $# -eq 1 ; then - KILL_ENABLE=0 - conf=$1 - shift; - elif test $# -eq 2 && test "$1" == "-k" ; then + if test $# -ge 2 && test "$1" == "-k" ; then KILL_ENABLE=1 conf=$2 shift shift + elif test $# -ge 1 ; then + KILL_ENABLE=0 + conf=$1 + shift; else echo "Usage: amcleanup [-k] conf" exit 1 fi else - if test $# -ne 1 ; then + if test $# -lt 1 ; then echo "Usage: amcleanup conf" exit 1 else conf=$1 + shift KILL_ENABLE=0 fi fi