Changeset View
Changeset View
Standalone View
Standalone View
head/audio/forked-daapd/files/forked-daapd.in
#!/bin/sh | #!/bin/sh | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# PROVIDE: %%PORTNAME%% | # PROVIDE: forked-daapd | ||||
# REQUIRE: avahi_daemon dbus | # REQUIRE: avahi_daemon dbus | ||||
# KEYWORD: shutdown | # KEYWORD: shutdown | ||||
# | # | ||||
# Add these lines to /etc/rc.conf.local or /etc/rc.conf | # Add these lines to /etc/rc.conf.local or /etc/rc.conf | ||||
# to enable this service: | # to enable this service: | ||||
# | # | ||||
# %%RC_NAME%%_enable (bool): Set to NO by default. | # forked_daapd_enable (bool): Set to NO by default. | ||||
# Set it to YES to enable %%PORTNAME%%. | # Set it to YES to enable forked-daapd. | ||||
# %%RC_NAME%%_config (path): Set to %%PREFIX%%/etc/forked-daapd.conf | # forked_daapd_config (path): Set to %%PREFIX%%/etc/forked-daapd.conf | ||||
# by default. | # by default. | ||||
# %%RC_NAME%%_flags (str): Set to "" by default | # forked_daapd_flags (str): Set to "" by default | ||||
. /etc/rc.subr | . /etc/rc.subr | ||||
name=%%RC_NAME%% | name=forked_daapd | ||||
rcvar=${name}_enable | rcvar=${name}_enable | ||||
load_rc_config $name | load_rc_config $name | ||||
: ${%%RC_NAME%%_enable:="NO"} | : ${forked_daapd_enable:="NO"} | ||||
: ${%%RC_NAME%%_config:="%%PREFIX%%/etc/forked-daapd.conf"} | : ${forked_daapd_config:="%%PREFIX%%/etc/forked-daapd.conf"} | ||||
: ${%%RC_NAME%%_flags:=""} | : ${forked_daapd_flags:=""} | ||||
pidfile="/var/run/%%PORTNAME%%.pid" | pidfile="/var/run/forked-daapd.pid" | ||||
required_files="$%%RC_NAME%%_config" | required_files="$forked_daapd_config" | ||||
command="%%PREFIX%%/sbin/%%PORTNAME%%" | command="%%PREFIX%%/sbin/forked-daapd" | ||||
command_args="-P $pidfile -c $%%RC_NAME%%_config $%%RC_NAME%%_flags" | command_args="-P $pidfile -c $forked_daapd_config $forked_daapd_flags" | ||||
run_rc_command "$1" | run_rc_command "$1" |