]> git.pld-linux.org Git - packages/gnustep-base.git/blob - gnustep-base.init
- up to 0.19
[packages/gnustep-base.git] / gnustep-base.init
1 #!/bin/sh
2 #
3 # gnustep daemons
4 #
5 # chkconfig:    2345 35 65
6 # description:  Starts gnustep daemons
7 #
8
9 # Source function library.
10 . /etc/rc.d/init.d/functions
11
12 # Get service config
13 [ -f /etc/sysconfig/gnustep ] && . /etc/sysconfig/gnustep
14
15 start() {
16         if [ ! -f /var/lock/subsys/gnustep ]; then
17                 msg_starting "gnustep services"
18                 daemon gdomap $GDOMAP_OPTIONS
19                 RETVAL=$?
20                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gnustep
21         else
22                 msg_already_running "gnustep services"
23                 exit 1
24         fi
25 }
26
27 stop() {
28         if [ -f /var/lock/subsys/gnustep ]; then
29                 msg_stopping "gnustep services"
30                 killproc gdomap
31                 RETVAL=$?
32                 rm -f /var/lock/subsys/gnustep
33         else
34                 msg_not_running "gnustep services"
35                 exit 1
36         fi
37 }
38
39 case "$1" in
40   start)
41         start
42         ;;
43   stop)
44         stop
45         ;;
46   status)
47         status gdomap
48         RETVAL=$?
49         ;;
50   restart|reload)
51         stop
52         start
53         ;;
54 *)
55         msg_usage "$0 {start|stop|status|restart|reload}"
56         exit 1
57 esac
58
59 exit $RETVAL
This page took 0.065927 seconds and 3 git commands to generate.