#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

description="daemon for TeamViewer"

PIDFILE="/var/run/teamviewerd.pid"

start() {
	ebegin "Starting Teamviewer Daemon"

	start-stop-daemon \
		--start \
		--pidfile "${PIDFILE}" \
		--background \
		--exec /opt/teamviewer@TVV@/teamviewerd -- -d
}

stop() {
	ebegin "Stopping Teamviewer Daemon"

	start-stop-daemon \
		--stop \
		--pidfile "${PIDFILE}"
}