summaryrefslogtreecommitdiffstats
path: root/.scripts/tinc_multicast/retiolum
blob: f506a1b015b8ac343acf52dcce12fdf4bf8cca69 (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
#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

TINCNAME='retiolum'
case "$1" in
  start)
    stat_busy "Starting retiolum Daemon"
    success=0
    /home/death/git/retiolum/.scripts/tinc_multicast/retiolum.py -n retiolum -T &
    sleep 2
    if [ $success -eq 0 ]; then
      add_daemon retiolum
      stat_done
    else
      stat_fail
    fi
    ;;
  stop)
    stat_busy "Stopping retiolum Daemon"
    kill `cat /var/lock/retiolum.retiolum`
    rm_daemon tincd
    stat_done
    ;;
  restart)
    $0 stop
    sleep 4
    $0 start
    ;;
  *)
    echo "usage $0 {start¦stop¦restart}"
esac
exit 0