Add FreeBSD service and installation. Change default PID file directory. SystemV and SystemD scripts should be updated.

This commit is contained in:
Mike Brady
2017-04-22 15:00:22 +01:00
parent f90fb9b2ed
commit 0df8bf3105
4 changed files with 59 additions and 14 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
#
# $FreeBSD: releng/11.0/etc/rc.d/motd 298514 2016-04-23 16:10:54Z lme $
#
# PROVIDE: shairport-sync
# REQUIRE: FILESYSTEMS DAEMON hostname
. /etc/rc.subr
name="shairport-sync"
start_cmd="${name}_start"
stop_cmd="${name}_stop"
shairport-sync_start()
{
su -m shairport-sync -c "/usr/local/bin/shairport-sync -d"
}
shairport-sync_stop()
{
su -m shairport-sync -c "/usr/local/bin/shairport-sync -k"
}
load_rc_config $name
run_rc_command "$1"