summaryrefslogtreecommitdiff
path: root/package/jack/files/jack.init
diff options
context:
space:
mode:
Diffstat (limited to 'package/jack/files/jack.init')
-rw-r--r--package/jack/files/jack.init28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/jack/files/jack.init b/package/jack/files/jack.init
new file mode 100644
index 000000000..53a81ac07
--- /dev/null
+++ b/package/jack/files/jack.init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG jack
+#INIT 78
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${jack:-NO}" = x"NO" && exit 0
+ test x"$jack" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
+ exec sh $0 start
+ ;;
+start)
+ (/usr/bin/jackd $jack_flags &) && sleep 0.1
+ ;;
+stop)
+ kill $(pgrep -f /usr/bin/jackd ) && sleep 0.1
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?