]> git.pld-linux.org Git - packages/partimage.git/commitdiff
init script for partimage daemon
authorfilon <filon@sokrates.mimuw.edu.pl>
Thu, 8 Nov 2001 22:32:54 +0000 (22:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    partimaged.init -> 1.1

partimaged.init [new file with mode: 0644]

diff --git a/partimaged.init b/partimaged.init
new file mode 100644 (file)
index 0000000..6596750
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# partimaged   This shell script starts partimage server
+#
+# chkconfig: 345 56 44
+# description: This scripts starts partimage server \
+#              which allow to get partimage partition \
+#              images over network
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# [ -f /etc/sysconfig/partimaged ] && . /etc/sysconfig/partimaged
+
+# See how we were called.
+case "$1" in
+  start)
+       if [ ! -f /var/lock/subsys/partimaged ]; then
+               msg_starting partimaged
+               busy
+               /usr/sbin/partimaged -D -p13000
+               RETVAL=$?
+               deltext
+               if [ $RETVAL -eq 0 ]; then
+                   touch /var/lock/subsys/partimaged
+                   ok
+               else
+                   fail
+                   exit 1
+               fi
+       else
+               msg_Already_Running partimaged
+               exit 1
+       fi
+        ;;
+  stop)
+       if [ -f /var/lock/subsys/partimaged ]; then
+               msg_stopping partimaged
+               killproc partimaged
+               rm -f /var/lock/subsys/partimaged >/dev/null 2>&1
+       else
+               msg_Not_Running partimaged
+               exit 1
+       fi
+        ;;
+
+  status)
+       status partimaged
+        ;;
+
+  restart|reload)
+        $0 stop
+        $0 start
+        ;;
+
+  *)
+        echo $"Usage: $0 {start|stop|status|restart}"
+        exit 1
+esac
+
+exit 0
This page took 0.28832 seconds and 4 git commands to generate.