Changed files:
atd.init -> 1.7
# Get service config
[ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
# Get service config
[ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
# See how we were called.
case "$1" in
start)
# See how we were called.
case "$1" in
start)
if [ ! -f /var/lock/subsys/atd ]; then
msg_starting at
daemon atd
if [ ! -f /var/lock/subsys/atd ]; then
msg_starting at
daemon atd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/atd
else
msg_already_running atd
else
msg_already_running atd
- touch /var/lock/subsys/atd
- msg_stopping at
- killproc atd
- rm -f /var/lock/subsys/atd
+ if [ -f /var/lock/subsys/atd ]; then
+ msg_stopping at
+ killproc atd
+ rm -f /var/lock/subsys/atd
+ else
+ msg_not_running atd
+ fi
- msg_usage "$0 {start|stop|restart|reload|status}"
- exit 1
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3