#!/bin/bash
#
# synonym Controls synonym
#
#
# chkconfig: 2345 13 96
# description: syslog - the message archiver \
# Please visit http://www.modulo.ro/synonym
### BEGIN INIT INFO
# Provides: $synonym
### END INIT INFO
. /etc/init.d/functions
RETVAL=0
# Function used to start the synonym daemon
start() {
echo -n $"Starting synonym: "
daemon /usr/local/sbin/synonym -d
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/synonym
return $RETVAL
}
# Function used to stop the synonym daemon
stop() {
echo -n $"Shutting down synonym: "
killproc /usr/local/sbin/synonym
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/synonym
return $RETVAL
}
# Function used to restart the synonym daemon
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status synonym
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
exit $?
syntax highlighted by Code2HTML, v. 0.9.1