4 # description: starts/stops Gammu
5 # written by Frank Vestergaard Pedersen <fvp@linuxhouse.dk>
8 ###################################################
9 # change these values to fit yur installation
12 bin
="/usr/local/gammu/bin/gammu-smsd"
13 configfile
="/etc/gammu-smsdrc"
14 pidfile
="/var/run/gammu.pid"
16 ####################################################
17 # It should not be nesserry to edit below this line
18 ####################################################
20 proc_name
=`basename $0`
25 $bin -c $configfile -p $pidfile -U $user -G $group -d
26 if [ "$?" != "0" ];then
27 echo "ERROR - gammu did not start!"
33 if [ -n "$PID" ] ; then
34 echo "$proc_name running PID: $PID"
36 echo "$proc_name not running"
40 # See how we were called.
43 if [ -n "$PID" ]; then
44 if [ "`ps -p "$PID" -o comm=`" = "" ]; then
48 echo "Error - $proc_name already running!"
61 if [ -n "$PID" ] ; then
62 echo "$proc_name stopping PID: $PID"
66 echo "$proc_name stopped"
74 echo $
"Usage: $0 {start|stop|restart|reload|status}"