3 # $Id: reaim,v 1.3 2003/03/26 11:59:30 mark-c Exp $
5 # ReAim startup / shutdown script. Based on RedHat 8.0 distribution
6 # scripts for other GPL'd packages.
8 # This script is designed for systems that have a user called reaim
9 # defined, as this id is used for the log file.
11 # Linux chkconfig stuff:
13 # chkconfig: 2345 50 50
14 # description: ReAIM Messaging Proxy
17 # pidfile: /var/run/reaim.pid
19 # source function library
20 . /etc/init.d/functions
24 # Command line flags to the program
26 LOG_FILE="/var/log/reaim.log"
31 chown "$USER_NAME" "$LOG_FILE"
32 echo -n $"Starting $prog: "
33 daemon --user "$USER_NAME" "/usr/sbin/$prog" "$flags"
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
41 echo -n $"Stopping $prog: "
45 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
50 echo -n $"Reloading $prog: "
63 [ -e /var/lock/subsys/$prog ] && restart
68 [ -e /var/lock/subsys/$prog ] && stop
96 echo $"Usage: $0 {start|stop|status|restart|condrestart|condstop|reload}"