summaryrefslogtreecommitdiff
path: root/network/teamviewer/rc.teamviewerd
blob: 51be305c09ee3c71318b0a33268e9739dd5472ad (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
#
# /etc/rc.d/rc.teamviewerd
#
# Start/stop/restart the TeamViewer Daemon
#
# To make TeamViewer Daemon start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.teamviewerd
#

teamviewerd_start() {
  if [ -x /opt/teamviewer8/tv_bin/teamviewerd ]; then
    echo "Starting TeamViewer Daemon"
    /opt/teamviewer8/tv_bin/teamviewerd    
  fi
}

teamviewerd_stop() {
    echo "Terminating TeamViewer Daemon"
  killall teamviewerd
}

teamviewerd_restart() {
  teamviewerd_stop
  sleep 2
  teamviewerd_start
}

case "$1" in
'start')
  teamviewerd_start
  ;;
'stop')
  teamviewerd_stop
  ;;
'restart')
  teamviewerd_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac