1 | #!/bin/sh
|
---|
2 | # Begin $rc_base/init.d/heimdal
|
---|
3 |
|
---|
4 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
5 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
6 |
|
---|
7 | #$LastChangedBy: bdubbs $
|
---|
8 | #$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
---|
9 |
|
---|
10 | . /etc/sysconfig/rc
|
---|
11 | . $rc_functions
|
---|
12 |
|
---|
13 | case "$1" in
|
---|
14 | start)
|
---|
15 | boot_mesg -n "Starting KDC Server Daemon..."
|
---|
16 | if test -f "/var/run/kdc.pid"
|
---|
17 | then
|
---|
18 | boot_mesg "kdc already running!" ${WARNING}
|
---|
19 | echo_warning
|
---|
20 | else
|
---|
21 | /usr/sbin/kdc &
|
---|
22 | sleep 1
|
---|
23 | if test -f "/var/run/kdc.pid"
|
---|
24 | then
|
---|
25 | echo ""
|
---|
26 | echo_ok
|
---|
27 | else
|
---|
28 | echo ""
|
---|
29 | echo_failure
|
---|
30 | fi
|
---|
31 | fi
|
---|
32 | boot_mesg -n "Starting KDC kpasswdd Daemon..."
|
---|
33 | if test -f "/var/run/kpasswdd.pid"
|
---|
34 | then
|
---|
35 | boot_mesg "kpasswdd already running!" ${WARNING}
|
---|
36 | echo_warning
|
---|
37 | else
|
---|
38 | /usr/sbin/kpasswdd &
|
---|
39 | sleep 1
|
---|
40 | if test -f "/var/run/kpasswdd.pid"
|
---|
41 | then
|
---|
42 | echo ""
|
---|
43 | echo_ok
|
---|
44 | else
|
---|
45 | echo ""
|
---|
46 | echo_failure
|
---|
47 | fi
|
---|
48 | fi
|
---|
49 | boot_mesg -n "Starting KDC kadmind Daemon..."
|
---|
50 | if test -f "/var/run/kadmind.pid"
|
---|
51 | then
|
---|
52 | boot_mesg "kadmind already running!" ${WARNING}
|
---|
53 | echo_warning
|
---|
54 | else
|
---|
55 | /usr/sbin/kadmind &
|
---|
56 | sleep 1
|
---|
57 | if test -f "/var/run/kadmind.pid"
|
---|
58 | then
|
---|
59 | echo ""
|
---|
60 | echo_ok
|
---|
61 | else
|
---|
62 | echo ""
|
---|
63 | echo_failure
|
---|
64 | fi
|
---|
65 | fi
|
---|
66 | ;;
|
---|
67 |
|
---|
68 | stop)
|
---|
69 | boot_mesg "Stopping KDC kadmind Daemon..."
|
---|
70 | killproc /usr/sbin/kadmind
|
---|
71 | boot_mesg "Stopping KDC kpasswdd Daemon..."
|
---|
72 | killproc /usr/sbin/kpasswdd
|
---|
73 | boot_mesg "Stopping KDC Server Daemon..."
|
---|
74 | killproc /usr/sbin/kdc
|
---|
75 | ;;
|
---|
76 |
|
---|
77 | restart)
|
---|
78 | $0 stop
|
---|
79 | sleep 1
|
---|
80 | $0 start
|
---|
81 | ;;
|
---|
82 |
|
---|
83 | status)
|
---|
84 | statusproc /usr/sbin/kdc
|
---|
85 | statusproc /usr/sbin/kpasswdd
|
---|
86 | statusproc /usr/sbin/kadmind
|
---|
87 | ;;
|
---|
88 |
|
---|
89 | *)
|
---|
90 | echo "Usage: $0 {start|stop|restart|status}"
|
---|
91 | exit 1
|
---|
92 | ;;
|
---|
93 | esac
|
---|
94 |
|
---|
95 | # End $rc_base/init.d/heimdal
|
---|