]> git.pld-linux.org Git - packages/opensips.git/commitdiff
- new files, based on openser
authorJacek Konieczny <jajcus@pld-linux.org>
Fri, 22 Aug 2008 13:20:36 +0000 (13:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    opensips.init -> 1.1
    opensips.sysconfig -> 1.1

opensips.init [new file with mode: 0644]
opensips.sysconfig [new file with mode: 0644]

diff --git a/opensips.init b/opensips.init
new file mode 100644 (file)
index 0000000..96aa2a3
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# opensips             This shell script takes care of starting and stopping opensips
+#
+# chkconfig:   2345 20 80
+# description: opensips
+# processname: opensips
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /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 opensips
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       # Start daemons.
+       if [ ! -f /var/lock/subsys/opensips ]; then
+               msg_starting opensips
+               daemon opensips
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/opensips
+       else
+               msg_already_running opensips
+       fi
+}
+
+stop() {
+       # Stop daemons.
+       if [ -f /var/lock/subsys/opensips ]; then
+               msg_stopping opensips
+               killproc opensips
+               rm -f /var/lock/subsys/opensips >/dev/null 2>&1
+       else
+               msg_not_running opensips
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart|force-reload)
+       stop
+       start
+       ;;
+  status)
+       status opensips
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/opensips.sysconfig b/opensips.sysconfig
new file mode 100644 (file)
index 0000000..a40048e
--- /dev/null
@@ -0,0 +1,2 @@
+# Define nice level for opensips
+SERVICE_RUN_NICE_LEVEL="+5"
This page took 1.605297 seconds and 4 git commands to generate.