summaryrefslogtreecommitdiffstats
path: root/network/heimdal/config/rc.heimdal
blob: 7c0b93fe72b84ac6e04198ad666d2ba5fe631424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

heimdal_start() {
  if [ -r /var/heimdal/kdc.conf -a -x /usr/heimdal/libexec/kdc ]; then
    echo "Starting the Kerberos service:  /usr/heimdal/libexec/kdc --detach"
    /usr/heimdal/libexec/kdc --detach
  fi

}

heimdal_stop() {
  killall kdc

}

heimdal_restart() {
  heimdal_stop
  sleep 1
  heimdal_start

}

case "$1" in
'start')
  heimdal_start
  ;;
'stop')
  heimdal_stop
  ;;
'restart')
  heimdal_restart
  ;;
*)
  echo "Usage: $0 start|stop|restart"
esac