4 # description: Freeside daemons
6 QUEUED_USER=%%%QUEUED_USER%%%
8 SELFSERVICE_USER=%%%SELFSERVICE_USER%%%
9 SELFSERVICE_MACHINES="%%%SELFSERVICE_MACHINES%%%"
13 #INSTALLSCRIPT/INSTALLSITEBIN from Makefile.PL
14 PATH="$PATH:/usr/local/bin"
17 [ -r /etc/default/freeside ] && . /etc/default/freeside
22 echo -n "Starting freeside-queued: "
23 #perl -MDBIx::Profile /usr/local/bin/freeside-queued $QUEUED_USER
24 freeside-queued $QUEUED_USER
25 #export NYTPROF="file=/usr/local/etc/freeside/nytprof.out"
26 #PERL5OPT="-d:NYTProf" freeside-queued $QUEUED_USER
29 echo -n "Starting freeside-sqlradius-radacctd: "
30 freeside-sqlradius-radacctd $QUEUED_USER
33 echo -n "Starting freeside-prepaidd: "
34 freeside-prepaidd $QUEUED_USER
37 echo -n "Starting freeside-cdrrewrited: "
38 freeside-cdrrewrited $QUEUED_USER
41 echo -n "Starting freeside-cdrd: "
42 freeside-cdrd $QUEUED_USER
45 for MACHINE in $SELFSERVICE_MACHINES; do
46 echo -n "Starting freeside-selfservice-server to $MACHINE: "
47 freeside-selfservice-server $SELFSERVICE_USER $MACHINE
51 #ip=`/sbin/ifconfig $IF | grep 'inet addr:' | cut -d: -f2- | cut -d' ' -f1`
52 #cp /opt/rt3/etc/RT_SiteConfig.pm.ORIG /opt/rt3/etc/RT_SiteConfig.pm
53 #perl -pi -e "s/localhost/$ip/" /opt/rt3/etc/RT_SiteConfig.pm
58 echo -n "Stopping freeside-queued: "
59 [ -e /var/run/freeside-queued.pid ] && kill `cat /var/run/freeside-queued.pid`
62 killall freeside-queued
65 if [ -e /var/run/freeside-sqlradius-radacctd.pid ]; then
66 echo -n "Stopping freeside-sqlradius-radacctd: "
67 kill `cat /var/run/freeside-sqlradius-radacctd.pid`
71 if [ -e /var/run/freeside-prepaidd.pid ]; then
72 echo -n "Stopping freeside-prepaidd: "
73 kill `cat /var/run/freeside-prepaidd.pid`
77 if [ -e /var/run/freeside-cdrd.pid ]; then
78 echo -n "Stopping freeside-cdrd: "
79 kill `cat /var/run/freeside-cdrd.pid`
83 if [ -e /var/run/freeside-cdrrewrited.pid ]; then
84 echo -n "Stopping freeside-cdrrewrited: "
85 kill `cat /var/run/freeside-cdrrewrited.pid`
89 if [ -e /var/run/freeside-selfservice-server.$SELFSERVICE_USER.pid ]
91 echo -n "Stopping (old) freeside-selfservice-server: "
92 kill `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.pid`
93 rm /var/run/freeside-selfservice-server.$SELFSERVICE_USER.pid
97 if [ -z "$SELFSERVICE_MACHINES" ]; then SELFSERVICE_MACHINES='localhost'; fi
98 for MACHINE in $SELFSERVICE_MACHINES; do
99 if [ -e /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid ]
101 echo -n "Stopping freeside-selfservice-server to $MACHINE: "
102 kill `cat /var/run/freeside-selfservice-server.$SELFSERVICE_USER.$MACHINE.pid`
114 echo "Usage: freeside {start|stop|restart}"