aboutsummaryrefslogtreecommitdiff
path: root/src/oss/rc-script
diff options
context:
space:
mode:
Diffstat (limited to 'src/oss/rc-script')
-rwxr-xr-xsrc/oss/rc-script30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/oss/rc-script b/src/oss/rc-script
new file mode 100755
index 0000000..5c93010
--- /dev/null
+++ b/src/oss/rc-script
@@ -0,0 +1,30 @@
+#!/bin/bash
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy 'Starting Open Sound System'
+ if /usr/sbin/soundon; then
+ add_daemon oss
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy 'Stopping Open Sound System'
+ if /usr/sbin/soundoff; then
+ rm_daemon oss
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+esac