summaryrefslogtreecommitdiff
path: root/package/squeezelite/files/squeezelite.init
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-27 09:48:34 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-27 09:48:34 +0100
commitf327dedeb0144c84c1365f878ed008d998a0a258 (patch)
tree820df62c34dc978438ba4e158e2f0be44d5cfe0b /package/squeezelite/files/squeezelite.init
parent395027c0eca327aa515ec95131218f017ed376e8 (diff)
parent1e3216e7e3ac2dc3dfdd69811190f159527783aa (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/squeezelite/files/squeezelite.init')
-rw-r--r--package/squeezelite/files/squeezelite.init26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/squeezelite/files/squeezelite.init b/package/squeezelite/files/squeezelite.init
new file mode 100644
index 000000000..933b81ab5
--- /dev/null
+++ b/package/squeezelite/files/squeezelite.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#PKG squeezelite
+#INIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${squeezelite:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/bin/squeezelite $squeezelite_flags
+ ;;
+stop)
+ kill $(pgrep -f /usr/bin/squeezelite)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?