mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-06 10:09:33 +02:00
install script for FreeBSD
This commit is contained in:
parent
7dc6f17c3e
commit
bc6529e5d6
2 changed files with 47 additions and 0 deletions
|
@ -61,6 +61,14 @@ install:
|
||||||
install -D -g root -o root $(BIN) $(TARGET_DIR)/sbin/$(BIN)
|
install -D -g root -o root $(BIN) $(TARGET_DIR)/sbin/$(BIN)
|
||||||
install -D -g root -o root $(BIN).1 $(TARGET_DIR)/share/man/man1/$(BIN).1
|
install -D -g root -o root $(BIN).1 $(TARGET_DIR)/share/man/man1/$(BIN).1
|
||||||
|
|
||||||
|
else ifeq ($(TARGET), FREEBSD)
|
||||||
|
|
||||||
|
install:
|
||||||
|
echo BSD
|
||||||
|
install -g wheel -o root -m 555 $(BIN) $(TARGET_DIR)/local/sbin/$(BIN)
|
||||||
|
install -g wheel -o root -m 555 $(BIN).1 $(TARGET_DIR)/local/man/man1/$(BIN).1
|
||||||
|
install -g wheel -o root -m 555 debian/$(BIN).bsd /usr/local/etc/rc.d/$(BIN)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
@ -93,6 +101,9 @@ installsysv:
|
||||||
update-rc.d $(BIN) defaults; \
|
update-rc.d $(BIN) defaults; \
|
||||||
/etc/init.d/$(BIN) start; \
|
/etc/init.d/$(BIN) start; \
|
||||||
|
|
||||||
|
installbsd:
|
||||||
|
@echo using bsd; \
|
||||||
|
cp debian/$(BIN).bsd /usr/local/etc/rc.d/$(BIN); \
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(TARGET_DIR)/share/man/man1/$(BIN).1
|
rm -f $(TARGET_DIR)/share/man/man1/$(BIN).1
|
||||||
|
|
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