mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-03 16:48:52 +02:00
install script for FreeBSD
This commit is contained in:
parent
7dc6f17c3e
commit
bc6529e5d6
2 changed files with 47 additions and 0 deletions
36
server/debian/snapserver.bsd
Normal file
36
server/debian/snapserver.bsd
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: snapserver
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: Snapserver
|
||||
#
|
||||
# Snapserver - Snapcast server
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable snapserver:
|
||||
# snapserver_enable=YES
|
||||
# Add snapserver_opts=<options> to configure command line arguments
|
||||
|
||||
snapserver_opts="-d"
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=snapserver
|
||||
rcvar=snapserver_enable
|
||||
desc="Snapserver - Snapcast server"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${snapserver_enable:=NO}
|
||||
|
||||
command=/usr/local/sbin/${name}
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
start_cmd=snapserver_start
|
||||
|
||||
|
||||
snapserver_start() {
|
||||
checkyesno snapserver_enable && echo "Starting snapserver." && ${command} ${snapserver_opts}
|
||||
}
|
||||
|
||||
run_rc_command $1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue