slackbuilds_ponce/libraries/bluez-alsa/rc.bluez-alsa
khronosschoty c21c4098e6
libraries/bluez-alsa: Added rc script
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-02-17 12:55:24 +07:00

24 lines
436 B
Bash

#!/bin/sh
#
# /etc/rc.d/rc.bluez-alsa
#
case "$1" in
'start')
nohup /usr/bin/bluealsa > /dev/null 2>&1 &
echo $! > /var/run/bluealsa.pid
;;
'stop')
kill $(cat /var/run/bluealsa.pid)
rm -f /var/run/bluealsa.pid
;;
'restart')
kill $(cat /var/run/bluealsa.pid)
nohup /usr/bin/bluealsa > /dev/null 2>&1 &
echo $! > /var/run/bluealsa.pid
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac