blob: d3016b289dfec1d886a49d3ea153db8fbc58178b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#! /bin/sh
#
# chkconfig: 345 86 16
# description: Freeside daemons
QUEUED_USER=%%%QUEUED_USER%%%
FREESIDE_PATH="%%%FREESIDE_PATH%%%"
PASSWD_USER=%%%PASSWD_USER%%%
PASSWD_MACHINE=%%%PASSWD_MACHINE%%%
SIGNUP_USER=%%%SIGNUP_USER%%%
SIGNUP_MACHINE=%%%SIGNUP_MACHINE%%%
SIGNUP_AGENTNUM=%%%SIGNUP_AGENTNUM%%%
SIGNUP_REFNUM=%%%SIGNUP_REFNUM%%%
case "$1" in
start)
# Start daemons.
echo -n "Starting freeside-queued: "
freeside-queued $QUEUED_USER
echo "done."
echo -n "Starting fs_passwd_server: "
su freeside -c "$FREESIDE_PATH/fs_passwd/fs_passwd_server $PASSWD_USER $PASSWD_MACHINE" &
echo "done."
echo -n "Starting fs_signup_server: "
su freeside -c "$FREESIDE_PATH/fs_signup/fs_signup_server $SIGNUP_USER $SIGNUP_MACHINE $SIGNUP_AGENTNUM $SIGNUP_REFNUM" &
echo "done."
;;
stop)
# Stop daemons.
echo -n "Stopping freeside-queued: "
kill `cat /var/run/freeside-queued.pid`
echo "done."
echo -n "Stopping fs_passwd_server: "
killall fs_passwd_server
echo "done."
echo -n "Stopping fs_signup_server: "
killall fs_signup_server
echo "done."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: freeside {start|stop|restart}"
exit 1
esac
exit 0
|