$field is not a global.
[freeside.git] / init.d / freeside-init
1 #! /bin/sh
2 #
3 # chkconfig: 345 86 16
4 # description: Freeside daemons
5
6 QUEUED_USER=%%%QUEUED_USER%%%
7
8 FREESIDE_PATH="%%%FREESIDE_PATH%%%"
9
10 SELFSERVICE_USER=%%%SELFSERVICE_USER%%%
11 SELFSERVICE_MACHINE=%%%SELFSERVICE_MACHINE%%%
12
13 case "$1" in
14   start)
15         # Start daemons.
16         echo -n "Starting freeside-queued: "
17         freeside-queued $QUEUED_USER
18         echo "done."
19
20         echo -n "Starting freeside-selfservice-server: "
21         freeside-selfservice-server $SELFSERVICE_USER $SELFSERVICE_MACHINE
22         echo "done."
23
24         ;;
25   stop)
26         # Stop daemons.
27         echo -n "Stopping freeside-queued: "
28         kill `cat /var/run/freeside-queued.pid`
29         echo "done."
30
31         echo -n "Stopping freeside-selfservice-server: "
32         kill `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.pid`
33         echo "done."
34         ;;
35
36   restart)
37         $0 stop
38         $0 start
39         ;;
40   *)
41         echo "Usage: freeside {start|stop|restart}"
42         exit 1
43 esac
44
45 exit 0
46