summaryrefslogtreecommitdiffstats
path: root/audio/icecast2
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2005-06-22 20:08:28 +0000
committerlofi <lofi@FreeBSD.org>2005-06-22 20:08:28 +0000
commitd74e67e5aa65e0e0aad66e26a6a9cc0592e8f9d1 (patch)
tree36a394303cf4160e0f6b38f94119cbc2226628c7 /audio/icecast2
parent4f99d486cd2139414545e1b2126a104eb5947670 (diff)
downloadFreeBSD-ports-d74e67e5aa65e0e0aad66e26a6a9cc0592e8f9d1.zip
FreeBSD-ports-d74e67e5aa65e0e0aad66e26a6a9cc0592e8f9d1.tar.gz
Fix various issues with the rc-script and adjust pkg-message accordingly.
Diffstat (limited to 'audio/icecast2')
-rw-r--r--audio/icecast2/Makefile4
-rw-r--r--audio/icecast2/files/icecast2.sh.in16
-rw-r--r--audio/icecast2/files/pkg-message.in17
3 files changed, 29 insertions, 8 deletions
diff --git a/audio/icecast2/Makefile b/audio/icecast2/Makefile
index 9934bc5..619cfc1 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 14e6b68..accb367 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 0000000..ee11554
--- /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. **
+**********************************************************************
OpenPOWER on IntegriCloud