]> git.pld-linux.org Git - packages/partimage.git/blob - partimaged.init
- downgrade to 0.6.x - quite stable branch (0.7.x is testing branch)
[packages/partimage.git] / partimaged.init
1 #!/bin/bash
2 #
3 # partimaged   This shell script starts partimage server
4 #
5 # chkconfig: 345 56 44
6 # description: This scripts starts partimage server \
7 #              which allow to get partimage partition \
8 #              images over network
9
10 # Source function library.
11 . /etc/rc.d/init.d/functions
12
13 # [ -f /etc/sysconfig/partimaged ] && . /etc/sysconfig/partimaged
14
15 # See how we were called.
16 case "$1" in
17   start)
18         if [ ! -f /var/lock/subsys/partimaged ]; then
19                 msg_starting partimaged
20                 busy
21                 /usr/sbin/partimaged -D -p13000
22                 RETVAL=$?
23                 deltext
24                 if [ $RETVAL -eq 0 ]; then
25                     touch /var/lock/subsys/partimaged
26                     ok
27                 else
28                     fail
29                     exit 1
30                 fi
31         else
32                 msg_Already_Running partimaged
33                 exit 1
34         fi
35         ;;
36   stop)
37         if [ -f /var/lock/subsys/partimaged ]; then
38                 msg_stopping partimaged
39                 killproc partimaged
40                 rm -f /var/lock/subsys/partimaged >/dev/null 2>&1
41         else
42                 msg_Not_Running partimaged
43                 exit 1
44         fi
45         ;;
46
47   status)
48         status partimaged
49         ;;
50
51   restart|reload)
52         $0 stop
53         $0 start
54         ;;
55
56   *)
57         echo $"Usage: $0 {start|stop|status|restart}"
58         exit 1
59 esac
60
61 exit 0
This page took 0.029646 seconds and 3 git commands to generate.