aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2005-10-31 04:35:43 +0800
committersem <sem@FreeBSD.org>2005-10-31 04:35:43 +0800
commit34b605faca95c4281e0c2d2fe3cdd855a95018da (patch)
tree5df4b56586f1601157566f815d9455ba347c42a8 /audio
parentb0f99409c86779cdaf766f7579a26eabc8a2247f (diff)
downloadfreebsd-ports-gnome-34b605faca95c4281e0c2d2fe3cdd855a95018da.tar.gz
freebsd-ports-gnome-34b605faca95c4281e0c2d2fe3cdd855a95018da.tar.zst
freebsd-ports-gnome-34b605faca95c4281e0c2d2fe3cdd855a95018da.zip
- Add rcNG script
PR: ports/88244 Submitted by: maintainer
Diffstat (limited to 'audio')
-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.
-==============================================================
+================================================================