1
0
Преглед на файлове

Add init scripts for jack and brutefir

These scripts will start jack and brutefir in this order and are also compatible with subsequent startup of mpd.
Brutefir will create a sample config file ~/.brutefir_defaults when run without arguments.

Signed-off-by: Oliver Schib <lich000king@yahoo.de>
Oliver Schib преди 9 години
родител
ревизия
b5f9c8b5c5
променени са 4 файла, в които са добавени 64 реда и са изтрити 0 реда
  1. 28 0
      package/brutefir/files/brutefir.init
  2. 4 0
      package/brutefir/files/brutefir.postinst
  3. 28 0
      package/jack/files/jack.init
  4. 4 0
      package/jack/files/jack.postinst

+ 28 - 0
package/brutefir/files/brutefir.init

@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG brutefir
+#INIT 79
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+	test x"${brutefir:-NO}" = x"NO" && exit 0
+	test x"$brutefir" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
+	exec sh $0 start
+	;;
+start)
+	(/usr/bin/brutefir $brutefir_flags &) && sleep 0.2
+	;;
+stop)
+	kill $(pgrep -f /usr/bin/brutefir) && sleep 0.2
+	;;
+restart)
+	sh $0 stop
+	sh $0 start
+	;;
+*)
+	echo "Usage: $0 {start | stop | restart}"
+	exit 1
+	;;
+esac
+exit $?

+ 4 - 0
package/brutefir/files/brutefir.postinst

@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf brutefir NO
+add_rcconf brutefir_flags '-nodefault -daemon /data/brutefir/config/brutefir.conf'

+ 28 - 0
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 $?

+ 4 - 0
package/jack/files/jack.postinst

@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf jack NO
+add_rcconf jack_flags '-R -P70 -dalsa -r44100 -dhw:0 -p1024'