2013-02-18 06:42:49 +01:00
|
|
|
#!/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
|
2013-10-28 00:42:55 +01:00
|
|
|
# Also, add this line in your /etc/rc.d/rc.local:
|
|
|
|
#
|
|
|
|
# if [ -x /etc/rc.d/rc.teamviewerd ]; then
|
|
|
|
# /etc/rc.d/rc.teamviewerd start
|
|
|
|
# fi
|
2013-02-18 06:42:49 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
teamviewerd_start() {
|
2013-12-04 07:59:55 +01:00
|
|
|
if [ -x /opt/teamviewer9/tv_bin/teamviewerd ]; then
|
2013-02-18 06:42:49 +01:00
|
|
|
echo "Starting TeamViewer Daemon"
|
2014-04-27 17:05:07 +02:00
|
|
|
/opt/teamviewer9/tv_bin/teamviewerd --daemon start
|
2013-02-18 06:42:49 +01:00
|
|
|
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
|