/[projects]/smsdaemon/scripts/smsdaemon-initscript
ViewVC logotype

Diff of /smsdaemon/scripts/smsdaemon-initscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 204 by torben, Fri Dec 19 07:33:01 2008 UTC revision 592 by torben, Fri Feb 19 08:47:31 2010 UTC
# Line 1  Line 1 
1  #! /bin/bash  #! /bin/bash
2    
3  PIDFILE="/var/run/smsdaemon.pid"  PIDFILE="/var/run/smsdaemon.pid"
4    chmod 666 /dev/ttyUSB0
5    
6    
7  function start_d  function start_d
8  {  {
9          /usr/local/sbin/smsdaemon --daemon          /usr/local/bin/smsdaemon --daemon
10  }  }
11    
12  function stop_d  function stop_d
# Line 37  function status_d Line 39  function status_d
39          fi          fi
40  }  }
41    
42    function reload_d
43    {
44            PID=`cat $PIDFILE`
45            kill -HUP $PID
46    }
47    
48  case $1 in  case $1 in
49          "start")          "start")
50                  start_d                  start_d
# Line 47  case $1 in Line 55  case $1 in
55          "status")          "status")
56                  status_d                  status_d
57                  ;;                  ;;
58            "reload")
59                    reload_d
60                    ;;
61            "restart")
62                    stop_d
63                    sleep 5
64                    start_d
65                    ;;
66          *)          *)
67                  echo "Usage $0 [start|stop|status]"                  echo "Usage $0 [start|stop|status|reload|restart]"
68                  ;;                  ;;
69  esac  esac

Legend:
Removed from v.204  
changed lines
  Added in v.592

  ViewVC Help
Powered by ViewVC 1.1.20