--- icecast2.sh.in 2010-03-27 01:12:41.000000000 +0100 +++ icecast2.sh.in.new 2010-04-17 17:35:37.000000000 +0200 @@ -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 section in your %%PREFIX%%/etc/icecast.xml is +# You can specify another configuration file than %%PREFIX%%/etc/icecast.xml +# by adding the following line. +# +#icecast_config="%%PREFIX%%/etc/icecast.xml" +# +# Make sure the section in your configuration file is # not commented out - icecast refuses to run as root. # @@ -24,11 +28,12 @@ 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"