diff options
-rw-r--r-- | audio/icecast2/Makefile | 4 | ||||
-rw-r--r-- | audio/icecast2/files/icecast2.sh.in | 16 | ||||
-rw-r--r-- | audio/icecast2/files/pkg-message.in | 17 |
3 files changed, 29 insertions, 8 deletions
diff --git a/audio/icecast2/Makefile b/audio/icecast2/Makefile index 9934bc5179da..619cfc1fdca5 100644 --- a/audio/icecast2/Makefile +++ b/audio/icecast2/Makefile @@ -7,7 +7,7 @@ PORTNAME= icecast2 PORTVERSION= 2.2.0 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= audio net ipv6 MASTER_SITES= http://svn.xiph.org/releases/icecast/ @@ -25,6 +25,8 @@ LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl \ USE_GMAKE= yes USE_LIBTOOL_VER=15 USE_RC_SUBR= icecast2.sh +SUB_FILES+= pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message CONFIGURE_ENV= OGG_PREFIX=${LOCALBASE} WRKSRC= ${WRKDIR}/icecast-${PORTVERSION} diff --git a/audio/icecast2/files/icecast2.sh.in b/audio/icecast2/files/icecast2.sh.in index 14e6b6863b59..accb36722e61 100644 --- a/audio/icecast2/files/icecast2.sh.in +++ b/audio/icecast2/files/icecast2.sh.in @@ -8,10 +8,13 @@ # BEFORE: login # KEYWORD: FreeBSD shutdown -# Add the following line to /etc/rc.conf to enable `icecast2': +# Add the following line to /etc/rc.conf to enable `icecast2'. This requires +# a working configuration in %%PREFIX%%/etc/icecast.xml. # #icecast_enable="YES" -#icecast_flags="" +# +# Make sure the <changeowner> section in your %%PREFIX%%/etc/icecast.xml is +# not commented out - icecast refuses to run as root. # . "%%RC_SUBR%%" @@ -19,14 +22,13 @@ name="icecast" rcvar=`set_rcvar` -command="/usr/local/bin/icecast" -command_args="1>/dev/null 2>&1" -pidfile="/usr/local/share/icecast/$name.pid" -required_files="/usr/local/etc/$name.xml" +command="%%PREFIX%%/bin/icecast" +command_args="1>/dev/null" +required_files="%%PREFIX%%/etc/$name.xml" # read configuration and set defaults load_rc_config "$name" : ${icecast_enable="NO"} -: ${icecast_flags=""} +: ${icecast_flags="-c ${required_files} -b"} run_rc_command "$1" diff --git a/audio/icecast2/files/pkg-message.in b/audio/icecast2/files/pkg-message.in new file mode 100644 index 000000000000..ee11554da5d8 --- /dev/null +++ b/audio/icecast2/files/pkg-message.in @@ -0,0 +1,17 @@ +To start icecast at system boot, customize +%%PREFIX%%/etc/icecast.xml.sample to your environment and add: + +icecast_enable="YES" + +to /etc/rc.conf. See the icecast -h command for optional additional +flags. To specify an alternative config file for example add: + +icecast_flags="-c /path/to/your/configuration.xml" + +********************************************************************** +** Make sure the <changeowner> section in your configuration file ** +** is NOT commented out. Icecast will refuse to run as root. ** +** ** +** Also make sure that the user you choose is able to write to your ** +** configured log directory, otherwise icecast will refuse to run. ** +********************************************************************** |