packages: dss/dss.spec, dss/dss-admin.init (NEW) - add admin initscript
glen
glen at pld-linux.org
Sun Aug 1 20:14:42 CEST 2010
Author: glen Date: Sun Aug 1 18:14:42 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- add admin initscript
---- Files affected:
packages/dss:
dss.spec (1.15 -> 1.16) , dss-admin.init (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/dss/dss.spec
diff -u packages/dss/dss.spec:1.15 packages/dss/dss.spec:1.16
--- packages/dss/dss.spec:1.15 Sun Aug 1 20:09:40 2010
+++ packages/dss/dss.spec Sun Aug 1 20:14:36 2010
@@ -6,13 +6,14 @@
Summary: Darwin Streaming Server
Name: dss
Version: 6.0.3
-Release: 0.11
+Release: 0.12
License: Apple Public Source License
Group: Networking/Daemons
Source0: http://dss.macosforge.org/downloads/DarwinStreamingSrvr%{version}-Source.tar
# Source0-md5: ca676691db8417d05121699c0ca3d549
Source1: %{name}.init
-Source2: README.utils
+Source2: %{name}-admin.init
+Source3: README.utils
Patch0: %{name}.patch
Patch1: %{name}-x86_64.patch
Patch2: optflags.patch
@@ -101,7 +102,7 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
-cp -p %{SOURCE2} .
+cp -p %{SOURCE3} .
# patch streamingadminserver.pl
%{__sed} -i.bak -e '
@@ -156,6 +157,7 @@
$RPM_BUILD_ROOT
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-admin
# avoid extension
mv $RPM_BUILD_ROOT%{_sbindir}/streamingadminserver{.pl,}
@@ -215,7 +217,9 @@
%post
/sbin/chkconfig --add %{name}
+/sbin/chkconfig --add %{name}-admin
%service %{name} restart
+%service %{name}-admin restart
if [ "$1" = "1" ]; then
%banner %{name} -e <<-EOF
@@ -230,7 +234,9 @@
%preun
if [ "$1" = "0" ]; then
%service -q %{name} stop
+ %service -q %{name}-admin stop
/sbin/chkconfig --del %{name}
+ /sbin/chkconfig --del %{name}-admin
fi
%postun
@@ -267,6 +273,7 @@
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingadminserver.pem
%attr(754,root,root) /etc/rc.d/init.d/dss
+%attr(754,root,root) /etc/rc.d/init.d/dss-admin
%attr(755,root,root) %{_bindir}/MP3Broadcaster
%attr(755,root,root) %{_bindir}/PlaylistBroadcaster
%attr(755,root,root) %{_bindir}/StreamingLoadTool
@@ -326,6 +333,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.16 2010/08/01 18:14:36 glen
+- add admin initscript
+
Revision 1.15 2010/08/01 18:09:40 glen
- perl deps, admin access url
================================================================
Index: packages/dss/dss-admin.init
diff -u /dev/null packages/dss/dss-admin.init:1.1
--- /dev/null Sun Aug 1 20:14:42 2010
+++ packages/dss/dss-admin.init Sun Aug 1 20:14:36 2010
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# streaming Start/Stop MPEG-4 streaming server admin web interface
+#
+# chkconfig: 345 13 87
+#
+# description: Web admin interface for the MPEG-4 video and audio streaming server.
+#
+# processname: streamingadminserver
+# pidfile:
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down "DSS Admin"
+ exit 1
+ fi
+else
+ exit 0
+fi
+
+start() {
+ # Check if the service is already running?
+ if [ -f /var/lock/subsys/dss-admin ]; then
+ msg_already_running "DSS Admin"
+ return
+ fi
+
+ msg_starting "DSS Admin"
+ daemon /usr/sbin/dss-admin
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dss-admin
+}
+
+stop() {
+ if [ ! -f /var/lock/subsys/dss-admin ]; then
+ msg_not_running "DSS Admin"
+ return
+ fi
+
+ # Stop daemons.
+ msg_stopping "DSS Admin"
+ killproc --pidfile /var/run/dss-admin.pid streamingadminserver -TERM
+ rm -f /var/lock/subsys/dss-admin
+}
+
+condrestart() {
+ if [ ! -f /var/lock/subsys/dss-admin ]; then
+ msg_not_running "DSS Admin"
+ RETVAL=$1
+ return
+ fi
+
+ stop
+ start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
+ status)
+ status --pidfile /var/run/dss-admin.pid streamingadminserver
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dss/dss.spec?r1=1.15&r2=1.16&f=u
More information about the pld-cvs-commit
mailing list