blob: fd9e9e71bdff2527817cfc75b93619fc20145d6f (
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=ivan
FREESIDE_PATH="/home/ivan/freeside_current"
PASSWD_USER=ivan
PASSWD_MACHINE=localhost
SIGNUP_USER=ivan
SIGNUP_MACHINE=localhost
SIGNUP_AGENTNUM=2
SIGNUP_REFNUM=2
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_passwd_server: "
killall fs_signup_server
echo "done."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: freeside {start|stop|restart}"
exit 1
esac
exit 0
|