You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2016/04/16 06:55:27 UTC

svn commit: r1739410 - /openmeetings/debian/trunk/etc/init.d/red5

Author: solomax
Date: Sat Apr 16 04:55:27 2016
New Revision: 1739410

URL: http://svn.apache.org/viewvc?rev=1739410&view=rev
Log:
Debian start-stop script is added

Added:
    openmeetings/debian/trunk/etc/init.d/red5   (with props)

Added: openmeetings/debian/trunk/etc/init.d/red5
URL: http://svn.apache.org/viewvc/openmeetings/debian/trunk/etc/init.d/red5?rev=1739410&view=auto
==============================================================================
--- openmeetings/debian/trunk/etc/init.d/red5 (added)
+++ openmeetings/debian/trunk/etc/init.d/red5 Sat Apr 16 04:55:27 2016
@@ -0,0 +1,64 @@
+#! /bin/sh
+#
+# red5 red5 initscript
+#
+# Author: Simon Eisenmann .
+#
+set -e
+export JAVA_OPTS="-Xrs -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:NewSize=256m -XX:SurvivorRatio=16 -XX:MinHeapFreeRatio=20 -XX:+ExplicitGCInvokesConcurrent -XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true -Xverify:none"
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Red5 flash streaming server"
+NAME=red5
+RED5_HOME=/opt/red5
+DAEMON=$RED5_HOME/$NAME.sh
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+# Read config file if it is present.
+if [ -r /etc/default/$NAME ]
+then
+    . /etc/default/$NAME
+fi
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+    start-stop-daemon --start -c nobody --pidfile $PIDFILE --chdir $RED5_HOME --background --make-pidfile --exec $DAEMON
+}
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+    start-stop-daemon --stop --quiet --pidfile $PIDFILE --name java
+    rm -f $PIDFILE
+}
+case "$1" in
+    start)
+        echo -n "Starting $DESC: $NAME"
+        d_start
+        echo "."
+    ;;
+    stop)
+        echo -n "Stopping $DESC: $NAME"
+        d_stop
+        echo "."
+    ;;
+
+    restart|force-reload)
+        echo -n "Restarting $DESC: $NAME"
+        d_stop
+        sleep 1
+        d_start
+        echo "."
+    ;;
+
+    *)
+        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+        exit 1
+    ;;
+
+esac
+exit 0
+

Propchange: openmeetings/debian/trunk/etc/init.d/red5
------------------------------------------------------------------------------
    svn:executable = *