fi
if test -h /proc/1/exe ; then
- if test $# -ge 2 && test "$1" == "-k" ; then
+ if test $# -ge 2 && test "$1" = "-k" ; then
KILL_ENABLE=1
conf=$2
shift
while test ${KEEP_CHECKING} -ne 0 ; do
PIDS_THIS_PASS=0
for search_user in ${dumpuser} root ; do
- if test "${search_user}" == "${dumpuser}" ; then
+ if test "${search_user}" = "${dumpuser}" ; then
PROCESS_NAMES=${USER_PROCESS_NAMES}
- elif test "${search_user}" == "root" ; then
+ elif test "${search_user}" = "root" ; then
PROCESS_NAMES=${ROOT_PROCESS_NAMES}
fi
for search_pid in [0-9]* ; do
ls -l /proc/${search_pid}/exe 2>/dev/null | grep ${search_name} >/dev/null
match_name=$?
pid_uid="`cat /proc/${search_pid}/status 2>/dev/null | grep Uid | awk '//{split($_,i); print i[2]}'`"
- if test ${match_name} -eq 0 && test "${pid_uid}" == "${search_user}" ; then
+ if test ${match_name} -eq 0 && test "${pid_uid}" = "${search_user}" ; then
echo "amcleanup: Process ${search_name} found running at pid #${search_pid}."
kill_pid=${search_pid}
kill_name=${search_name}
if test ! -z "${kill_pid}" ; then
if test -d /proc/${kill_pid} ; then
echo "amcleanup: Sending process ${kill_pid} the TERM signal."
- kill -15 -- ${kill_pid}
+ kill TERM -- ${kill_pid}
sleep 5
if test -d /proc/${kill_pid} ; then
echo "amcleanup: Sending process ${kill_pid} the KILL signal."
- kill -9 -- ${kill_pid}
+ kill KILL -- ${kill_pid}
fi
sleep 5
if test -d /proc/${kill_pid} ; then