Holger Hans Peter Freyther | c1625ee | 2012-06-13 16:47:51 +0800 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | # |
| 3 | # cell-log This shell script starts and stops cell-log. |
| 4 | # |
| 5 | # chkconfig: 345 90 40 |
| 6 | # description: Cell-log monitors cell in the neighborhood. |
| 7 | # processname: cell_log |
| 8 | |
| 9 | PATH=/bin:/usr/bin:/sbin:/usr/sbin |
| 10 | |
| 11 | case "$1" in |
| 12 | start) |
| 13 | echo -n "Starting cell-log: " |
| 14 | start-stop-daemon -S -b -x /etc/gsmd-respawn.sh /usr/bin/cell_log |
| 15 | |
| 16 | if [ $? = 0 ]; then |
| 17 | echo "cell-log" |
| 18 | else |
| 19 | echo "(failed.)" |
| 20 | fi |
| 21 | ;; |
| 22 | stop) |
| 23 | echo -n "Stopping GSM daemon: " |
| 24 | start-stop-daemon -K -x /usr/bin/cell_log |
| 25 | echo "cell-log." |
| 26 | ;; |
| 27 | restart|force-reload) |
| 28 | $0 stop |
| 29 | $0 start |
| 30 | ;; |
| 31 | *) |
| 32 | echo "Usage: /etc/init.d/cell-log {start|stop|restart|force-reload}" |
| 33 | exit 1 |
| 34 | ;; |
| 35 | esac |
| 36 | |
| 37 | exit 0 |