aboutsummaryrefslogtreecommitdiffstats
path: root/audio/icecast2
diff options
context:
space:
mode:
authorsahil <sahil@FreeBSD.org>2010-04-25 04:45:05 +0800
committersahil <sahil@FreeBSD.org>2010-04-25 04:45:05 +0800
commitf8632d0c00da9edf3dd7febd751ab730cc45c84a (patch)
treee39c1173759064dc3a462764eea337c7e19e828b /audio/icecast2
parente42ce939be097e79600fb19d13c902ce7f01a886 (diff)
downloadfreebsd-ports-gnome-f8632d0c00da9edf3dd7febd751ab730cc45c84a.tar.gz
freebsd-ports-gnome-f8632d0c00da9edf3dd7febd751ab730cc45c84a.tar.zst
freebsd-ports-gnome-f8632d0c00da9edf3dd7febd751ab730cc45c84a.zip
- Add support for custom config file location
PR: ports/145779 Submitted by: Jille Timmermans <jille@quis.cx> Approved by: Sunpoet Hsieh (maintainer), wxs@ (mentor)
Diffstat (limited to 'audio/icecast2')
-rw-r--r--audio/icecast2/files/icecast2.sh.in16
1 files changed, 11 insertions, 5 deletions
diff --git a/audio/icecast2/files/icecast2.sh.in b/audio/icecast2/files/icecast2.sh.in
index 6c85793a0bc2..6d3edb2a5e80 100644
--- a/audio/icecast2/files/icecast2.sh.in
+++ b/audio/icecast2/files/icecast2.sh.in
@@ -8,12 +8,16 @@
# BEFORE: LOGIN
# KEYWORD: shutdown
-# Add the following line to /etc/rc.conf to enable `icecast2'. This requires
-# a working configuration in %%PREFIX%%/etc/icecast.xml.
+# Add the following line to /etc/rc.conf to enable `icecast2'.
#
#icecast_enable="YES"
#
-# Make sure the <changeowner> section in your %%PREFIX%%/etc/icecast.xml is
+# To specify a non-default configuration file, set icecast_config
+# in /etc/rc.conf:
+#
+#icecast_config="%%PREFIX%%/etc/icecast.xml"
+#
+# Make sure the <changeowner> section in your configuration file is
# not commented out - icecast refuses to run as root.
#
@@ -24,11 +28,13 @@ rcvar=`set_rcvar`
command="%%PREFIX%%/bin/icecast"
command_args="-b 1>/dev/null"
-required_files="%%PREFIX%%/etc/$name.xml"
# read configuration and set defaults
load_rc_config "$name"
: ${icecast_enable="NO"}
-: ${icecast_flags="-c ${required_files}"}
+: ${icecast_config="%%PREFIX%%/etc/${name}.xml"}
+: ${icecast_flags="-c ${icecast_config}"}
+
+required_files="${icecast_config}"
run_rc_command "$1"