if [ ${?} -ne 0 ]; then
sleep 2
- if statusproc ${base} | grep -q "not running"; then
+ if statusproc ${base} | grep -q "stopped"; then
return ${EXIT_CODE_FAILURE}
fi
fi
if [ -f ${piddir}/${base}.pid ]; then
pid=$(head -1 ${piddir}/${base}.pid)
if [ -n "${pid}" ]; then
- echo "${base} not running but ${piddir}/${base}.pid exists"
+ echo "${base} stopped but ${piddir}/${base}.pid exists"
return ${EXIT_CODE_FAILURE}
fi
- else
- echo "${base} is not running"
fi
+
+ echo "${base} is stopped"
+ return ${EXIT_CODE_FAILURE}
}
DAEMON_OPTS="--config-file=/etc/dbus-1/system.conf"
dbus_start() {
- if statusproc ${DAEMON} | grep -q "not running"; then
+ if statusproc ${DAEMON} | grep -q "stopped"; then
if [ -f /var/run/dbus/pid ]; then
rm /var/run/dbus/pid
fi
start()
{
- if statusproc clamd | grep -q "not running"; then
+ if statusproc clamd | grep -q "stopped"; then
# Not taking any chances, removing left-over files
rm -f ${SOCKET_DIR}/clamd.{sock,pid} || return 1
fi
sleep 1
- if statusproc clamav-milter | grep -q "not running"; then
+ if statusproc clamav-milter | grep -q "stopped"; then
# Not taking any chances, removing left-over files
rm -f ${SOCKET_DIR}/clmilter.sock || return 1
fi