forked from VK3FNG/soundmodem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsoundmodem.initscript
More file actions
executable file
·56 lines (50 loc) · 1004 Bytes
/
soundmodem.initscript
File metadata and controls
executable file
·56 lines (50 loc) · 1004 Bytes
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
#! /bin/sh
#
# soundmodem Start Soundmodem driver.
#
# Author: Thomas Sailer, <sailer@ife.ee.ethz.ch>
#
# chkconfig: 345 50 50
# description: This script starts/stops the Soundmodem driver
# processname: soundmodem
# pidfile: /var/run/soundmodem.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
## Check that networking is up.
#if [ ${NETWORKING} = "no" ]
#then
# exit 0
#fi
[ -f /usr/sbin/soundmodem ] || exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting Soundmodem: "
daemon /usr/sbin/soundmodem --daemonize
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/soundmodem
;;
stop)
echo -n "Stopping Soundmodem: "
killproc soundmodem
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/soundmodem
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
status)
status soundmodem
RETVAL=$?
;;
*)
echo "Usage: soundmodem {start|stop|restart|status}"
exit 1
esac
exit $RETVAL