summaryrefslogtreecommitdiff
path: root/package/squeezelite/files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-26 12:40:05 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-26 12:40:05 +0100
commitc9969f1e6f1b363a9d32c9baf32dc9c012fd3a27 (patch)
treed27d4ff18b8339f6095982c139c80ad2d35d645e /package/squeezelite/files
parent8d5f70a15b65616574c9c26dcbdd956906b2063b (diff)
add startup script
Diffstat (limited to 'package/squeezelite/files')
-rw-r--r--package/squeezelite/files/squeezelite.init26
-rw-r--r--package/squeezelite/files/squeezelite.postinst4
2 files changed, 30 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 $?
diff --git a/package/squeezelite/files/squeezelite.postinst b/package/squeezelite/files/squeezelite.postinst
new file mode 100644
index 000000000..e5d9c91ee
--- /dev/null
+++ b/package/squeezelite/files/squeezelite.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf squeezelite squeezelite NO
+add_rcconf squeezelite_flags squeezelite_flags "-z -a 160:5:0:0 -s 10.0.0.1"