aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2004-12-11 05:41:23 +0800
committerlofi <lofi@FreeBSD.org>2004-12-11 05:41:23 +0800
commit759cbe328da552edb236ed57c7eab4f65f25bf23 (patch)
treecf0ad7113e09eb30274bf12e1fec4fdb3f83614c /audio
parent0e96866357490f6f70bb8fbca4cdfff5a19ff081 (diff)
downloadfreebsd-ports-gnome-759cbe328da552edb236ed57c7eab4f65f25bf23.tar.gz
freebsd-ports-gnome-759cbe328da552edb236ed57c7eab4f65f25bf23.tar.zst
freebsd-ports-gnome-759cbe328da552edb236ed57c7eab4f65f25bf23.zip
Add a rc-script.
Submitted by: "dave" <dmehler26@woh.rr.com>
Diffstat (limited to 'audio')
-rw-r--r--audio/icecast2/Makefile8
-rw-r--r--audio/icecast2/files/icecast2.sh32
-rw-r--r--audio/icecast2/pkg-message14
-rw-r--r--audio/icecast2/pkg-plist1
4 files changed, 54 insertions, 1 deletions
diff --git a/audio/icecast2/Makefile b/audio/icecast2/Makefile
index 3c4e2964959b..51aa8ee1a767 100644
--- a/audio/icecast2/Makefile
+++ b/audio/icecast2/Makefile
@@ -26,4 +26,10 @@ CONFIGURE_ENV= OGG_PREFIX=${LOCALBASE}
WRKSRC= ${WRKDIR}/icecast-${PORTVERSION}
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+post-install:
+ @${INSTALL_SCRIPT} ${FILESDIR}/icecast2.sh ${PREFIX}/etc/rc.d/icecast2.sh
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/audio/icecast2/files/icecast2.sh b/audio/icecast2/files/icecast2.sh
new file mode 100644
index 000000000000..f66e1c5f28f7
--- /dev/null
+++ b/audio/icecast2/files/icecast2.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/audio/icecast2/files/Attic/icecast2.sh,v 1.1 2004-12-10 21:41:23 lofi Exp $
+#
+
+# PROVIDE: icecast2
+# REQUIRE: DAEMON
+# BEFORE: login
+# KEYWORD: FreeBSD shutdown
+
+# Add the following line to /etc/rc.conf to enable `icecast2':
+#
+#icecast_enable="YES"
+#icecast_flags=""
+#
+
+. "/etc/rc.subr"
+
+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"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${icecast_enable="NO"}
+: ${icecast_flags=""}
+
+run_rc_command "$1"
diff --git a/audio/icecast2/pkg-message b/audio/icecast2/pkg-message
new file mode 100644
index 000000000000..ec84301aade8
--- /dev/null
+++ b/audio/icecast2/pkg-message
@@ -0,0 +1,14 @@
+To start icecast at system boot add:
+
+icecast_enable="YES"
+
+to /etc/rc.conf. See the icecast -h command for optional additional
+flags. To specify a config file for example add:
+
+icecast_flags="-c /usr/local/etc/icecast.xml"
+
+Customize /usr/local/etc/icecast.xml for your environment. In
+particular if you use chroot in the config file ensure the pid
+directive in icecast.xml matches the setting in
+/usr/local/etc/rc.d/icecast.sh.
+
diff --git a/audio/icecast2/pkg-plist b/audio/icecast2/pkg-plist
index 7a69ae28ddb7..8829e9641b3d 100644
--- a/audio/icecast2/pkg-plist
+++ b/audio/icecast2/pkg-plist
@@ -1,5 +1,6 @@
bin/icecast
etc/icecast.xml.sample
+etc/rc.d/icecast2.sh
share/doc/icecast/ChangeLog
share/doc/icecast/AUTHORS
share/doc/icecast/COPYING