summaryrefslogtreecommitdiff
path: root/network/heimdal/config/rc.ipropd-master
blob: 744943b4c59c28bc372f9045c4367c5c9c84f350 (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

HOSTNAME=`hostname -f`

ipropd_master_start() {
  if [ -x /usr/libexec/ipropd-master ]; then
    echo "Starting the ipropd-master service: /usr/libexec/ipropd-master --detach"
    /usr/libexec/ipropd-master --detach --hostname=$HOSTNAME
  fi
}

ipropd_master_stop() {
  killall ipropd-master
}

ipropd_master_restart() {
  ipropd-master_stop
  sleep 1
  ipropd-master_start
}

case "$1" in
  'start')
    ipropd_master_start
  ;;
  'stop')
    ipropd_master_stop
  ;;
  'restart')
    ipropd_master_restart
  ;;
  *)
    echo "Usage: $0 start|stop|restart"
  ;;
esac