-
Notifications
You must be signed in to change notification settings - Fork 0
/
sendpage.init
executable file
·69 lines (65 loc) · 1.27 KB
/
sendpage.init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
#
# Startup script for Sendpage
#
# chkconfig: 345 85 15
# description: Sendpage sends alphanumeric pages via a modem, received \
# via SNPP.
# processname: sendpage
# pidfile: /var/spool/sendpage/sendpage.pid
# config: /etc/sendpage.cf
#
### BEGIN INIT INFO
# Provides: sendpage
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Description: Alphanumeric TAP paging daemon
### END INIT INFO
# try our two common locations
SENDPAGE=/usr/bin/sendpage
if [ ! -x $SENDPAGE ]; then
SENDPAGE=/usr/local/bin/sendpage
if [ ! -x $SENDPAGE ]; then
echo 'Cannot execute sendpage !'
fi
fi
# See how we were called.
case "$1" in
start)
echo -n "Starting sendpage: "
if $SENDPAGE -bd ; then
echo "done"
else
echo "failed"
fi
;;
stop)
echo -n "Shutting down sendpage: "
if $SENDPAGE -bs ; then
echo "done"
else
echo "failed"
fi
;;
status)
$SENDPAGE -bq
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading sendpage: "
if $SENDPAGE -br ; then
echo "done"
else
echo "failed"
fi
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0