aboutsummaryrefslogtreecommitdiffstats
path: root/audio/icecast/files
diff options
context:
space:
mode:
Diffstat (limited to 'audio/icecast/files')
-rw-r--r--audio/icecast/files/icecast.in41
-rw-r--r--audio/icecast/files/patch-conf-Makefile.in12
-rw-r--r--audio/icecast/files/pkg-message.in18
3 files changed, 71 insertions, 0 deletions
diff --git a/audio/icecast/files/icecast.in b/audio/icecast/files/icecast.in
new file mode 100644
index 000000000000..83261185e2af
--- /dev/null
+++ b/audio/icecast/files/icecast.in
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: icecast
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `icecast'.
+#
+#icecast_enable="YES"
+#
+# 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.
+#
+
+. /etc/rc.subr
+
+name="icecast"
+rcvar=icecast_enable
+
+command="%%PREFIX%%/bin/icecast"
+command_args="-b 1>/dev/null"
+extra_commands="reload"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${icecast_enable="NO"}
+: ${icecast_config="%%PREFIX%%/etc/${name}.xml"}
+: ${icecast_flags="-c ${icecast_config}"}
+
+required_files="${icecast_config}"
+
+run_rc_command "$1"
diff --git a/audio/icecast/files/patch-conf-Makefile.in b/audio/icecast/files/patch-conf-Makefile.in
new file mode 100644
index 000000000000..d515eed5ad6a
--- /dev/null
+++ b/audio/icecast/files/patch-conf-Makefile.in
@@ -0,0 +1,12 @@
+--- conf/Makefile.in.orig 2016-01-04 21:07:07 UTC
++++ conf/Makefile.in
+@@ -539,8 +539,7 @@ uninstall-am: uninstall-docDATA
+
+ install-data-hook:
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+- test -f $(DESTDIR)$(sysconfdir)/icecast.xml || \
+- $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml
++ $(INSTALL_DATA) icecast.xml.dist $(DESTDIR)$(sysconfdir)/icecast.xml.sample
+
+ icecast.xml.dist: $(srcdir)/icecast.xml.in
+ $(edit) $(srcdir)/icecast.xml.in > icecast.xml.dist
diff --git a/audio/icecast/files/pkg-message.in b/audio/icecast/files/pkg-message.in
new file mode 100644
index 000000000000..0bb7e6898662
--- /dev/null
+++ b/audio/icecast/files/pkg-message.in
@@ -0,0 +1,18 @@
+To start icecast at system boot, copy
+%%PREFIX%%/etc/icecast.xml.sample to %%PREFIX%%/etc/icecast.xml, customize
+to your environment as desired 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. **
+**********************************************************************