summaryrefslogtreecommitdiff
path: root/source/n/krb5/conf/rc.kpropd
blob: 8dde85d8721adf5049975ece465931f7864b5b51 (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
37
38
39
40
41
#!/bin/sh
# Start the Kerberos V5 slave KDC update server. This runs on a slave
# (secondary) KDC server. It allows the master Kerberos server to use
# kprop(8) to propagate its database to the slave servers.

# To change the default options, edit /etc/default/kpropd.
if [ -r /etc/default/kpropd ]; then
  . /etc/default/kpropd
fi

start_atd() {
  if ! /usr/bin/pgrep --ns $$ --euid root -f "^/usr/sbin/kpropd" 1> /dev/null 2> /dev/null ; then
    echo "Starting kpropd:  /usr/sbin/kpropd $KPROPD_OPTIONS"
    /usr/sbin/kpropd $KPROPD_OPTIONS
  fi
}

stop_atd() {
  echo "Stopping kpropd."
  /usr/bin/pkill --ns $$ --euid root -f "^/usr/sbin/kpropd" 2> /dev/null
}

restart_atd() {
  stop_atd
  sleep 1
  start_atd
}

case "$1" in
'start')
  start_atd
  ;;
'stop')
  stop_atd
  ;;
'restart')
  restart_atd
  ;;
*)
  echo "usage $0 start|stop|restart"
esac