summaryrefslogtreecommitdiff
path: root/audio/shoutcast
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2005-10-30 20:35:43 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2005-10-30 20:35:43 +0000
commit6a2aecf3c61ad32cfcec30fabcca8dd18d6d0a92 (patch)
treed3134cfcde50df33184fc02ea2854e821c55b74e /audio/shoutcast
parentUpdate mastersite and www. (diff)
- Add rcNG script
PR: ports/88244 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=146767
Diffstat (limited to 'audio/shoutcast')
-rw-r--r--audio/shoutcast/Makefile1
-rw-r--r--audio/shoutcast/files/shoutcast.sh.in27
-rw-r--r--audio/shoutcast/pkg-message12
3 files changed, 35 insertions, 5 deletions
diff --git a/audio/shoutcast/Makefile b/audio/shoutcast/Makefile
index 0a0cd8c80c61..6b79a50c9377 100644
--- a/audio/shoutcast/Makefile
+++ b/audio/shoutcast/Makefile
@@ -16,6 +16,7 @@ ONLY_FOR_ARCHS= i386
NO_BUILD= YES
NO_PACKAGE= Redistribution of the software isn't allowed
+USE_RC_SUBR= shoutcast.sh
PLIST_FILES= sbin/sc_serv etc/shoutcast/sc_serv.conf
PLIST_DIRS= etc/shoutcast
PORTDOCS= README.TXT
diff --git a/audio/shoutcast/files/shoutcast.sh.in b/audio/shoutcast/files/shoutcast.sh.in
new file mode 100644
index 000000000000..e737ff4c27f4
--- /dev/null
+++ b/audio/shoutcast/files/shoutcast.sh.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+
+# PROVIDE: shoutcast
+# REQUIRE: LOGIN
+# BEFORE:
+# KEYWORD: FreeBSD shutdown
+
+. /etc/rc.subr
+
+name="shoutcast"
+rcvar=`set_rcvar`
+start_cmd="shoutcast_startcmd"
+stop_cmd="shoutcast_stopcmd"
+
+shoutcast_startcmd ()
+{
+%%PREFIX%%/sbin/sc_serv %%PREFIX%%/etc/sc_serv.conf
+}
+
+imapd_stopcmd ()
+{
+killall sc_serv
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/audio/shoutcast/pkg-message b/audio/shoutcast/pkg-message
index 9c228c7e1483..529f34db354e 100644
--- a/audio/shoutcast/pkg-message
+++ b/audio/shoutcast/pkg-message
@@ -1,7 +1,9 @@
-==============================================================
-Shoutcast is now installed, You can start it by typing:
+================================================================
+Shoutcast is now installed.
+The server config file is %%PREFIX%%/etc/sc_serv.conf.
+If You want to start it set shoutcast_enable="YES" in your
+/etc/rc.conf file and type:
-%%PREFIX%%/sbin/sc_serv [config_file]
+%%PREFIX%%/etc/rc.d/shoutcast.sh start
-A sample sc_serv.conf file is installed under %%PREFIX%%/etc.
-==============================================================
+================================================================