mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
564e1f2a5b
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
39 lines
594 B
Bash
39 lines
594 B
Bash
#!/bin/sh
|
|
# Start/stop/restart OSS:
|
|
|
|
# Credit to Tsomi, on the 4Front Technologies forum:
|
|
# http://www.opensound.com/board2006/viewtopic.php?p=8174
|
|
|
|
oss_start() {
|
|
echo "Starting OSS..."
|
|
if [ -x /usr/sbin/soundon ]; then
|
|
/usr/sbin/soundon
|
|
else
|
|
echo "No /usr/sbin/soundon script found."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
oss_stop() {
|
|
echo "Stopping OSS..."
|
|
/usr/sbin/soundoff
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
oss_start
|
|
;;
|
|
stop)
|
|
oss_stop
|
|
;;
|
|
restart)
|
|
oss_stop
|
|
sleep 1
|
|
oss_start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
;;
|
|
esac
|
|
|