3 # gnugk This shell script takes care of starting and stopping
4 # gnugk (Openh323 Gatekeeper - GNU Gatekeeper daemon)
6 # Coded by Dariusz Wrebiak <dariusz.wrebiak@cstnet.com.pl>
8 # Cyfrowe Systemy Telekomunikacyjne Sp z O.O.
9 # ul. Szkotnik 2B, 33-100 Tarnow
11 # tel: (+048) 146376600
12 # fax: (+048) 146376621
13 # www: http://cstnet.com.pl
14 # e-mail: office@cstnet.com.pl
18 GKPID=/var/run/gnugk.pid
19 GKCONFIG=/etc/gnugk.ini
20 LOGFILE=/var/log/gk.log
22 if [ ! -x $GNUGK ] ; then
23 echo "$GNUGK: No such file!"
27 if [ ! -f $GKCONFIG ] ; then
28 echo "$GKCONFIG: No such file!"
33 if [ -f $GKPID ] ; then
34 echo "$GNUGK is running!"
37 if [ -f $LOGFILE ] ; then
38 mv $LOGFILE $LOGFILE.old
40 echo -n "Starting $GNUGK: "
41 $GNUGK -c $GKCONFIG -o $LOGFILE > /dev/null 2>&1 &
46 if [ ! -f $GKPID ] ; then
47 echo "$GNUGK is not running!"
50 echo -n "Stopping $GNUGK: "
51 kill -9 "`cat $GKPID`"
75 echo "Usage: $0 {start|stop|restart}"