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