From b5f9c8b5c54e58b7425ddf5f2c2c9623bd13beed Mon Sep 17 00:00:00 2001 From: Oliver Schib Date: Tue, 5 Jul 2016 20:52:25 +0200 Subject: 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 --- package/jack/files/jack.init | 28 ++++++++++++++++++++++++++++ package/jack/files/jack.postinst | 4 ++++ 2 files changed, 32 insertions(+) create mode 100644 package/jack/files/jack.init create mode 100644 package/jack/files/jack.postinst (limited to 'package/jack') 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 $? diff --git a/package/jack/files/jack.postinst b/package/jack/files/jack.postinst new file mode 100644 index 000000000..c28d4a148 --- /dev/null +++ b/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' -- cgit v1.2.3