mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-04 20:29:09 +01:00
35adc7933a
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
46 lines
851 B
Bash
46 lines
851 B
Bash
#!/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
|
|
# 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
|
|
#
|
|
|
|
teamviewerd_start() {
|
|
if [ -x /opt/teamviewer/tv_bin/teamviewerd ]; then
|
|
echo "Starting TeamViewer Daemon"
|
|
/opt/teamviewer/tv_bin/teamviewerd --daemon start
|
|
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
|