summaryrefslogtreecommitdiff
path: root/net-misc/teamviewer/files/teamviewerd.init
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-07-15 18:06:53 +0100
committerV3n3RiX <venerix@rogentos.ro>2016-07-15 18:06:53 +0100
commit48ed061e72d23131832814eb7cfb4bc2387630f2 (patch)
tree56e9db8abc37f0900bc544b28a4cea34edb48ec3 /net-misc/teamviewer/files/teamviewerd.init
parent398f183cfc641c99092e78f825aaf51bc43b39d7 (diff)
of course, I'm an idiot...fix teamviewer ebuild
Diffstat (limited to 'net-misc/teamviewer/files/teamviewerd.init')
-rw-r--r--net-misc/teamviewer/files/teamviewerd.init31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-misc/teamviewer/files/teamviewerd.init b/net-misc/teamviewer/files/teamviewerd.init
new file mode 100644
index 00000000..a8966dc1
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewerd.init
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command=/opt/teamviewer@TVV@/tv_bin/teamviewerd
+command_args=-d
+description="daemon for TeamViewer"
+pidfile=/var/run/teamviewerd.pid
+
+extra_stopped_commands="passwd"
+
+passwd() {
+ if [ -z "${PASSWD}" ]; then
+ eerror "No password specified."
+ exit 1
+ fi
+
+ ebegin "Attempting to change password."
+ /opt/teamviewer@TVV@/tv_bin/teamviewerd --passwd "${PASSWD}"
+ retr=$?
+ case $retr in
+ 0) einfo "Password successfully set." ;;
+ 11|12) eerror "Password must be between 8 and 12 characters.";;
+ 13) eerror "Invalid characters detected.";;
+ 14) eerror "Password invalid. Validation failed.";;
+ *) eerror "Unknown error code";;
+ esac
+ eend $retr
+ exit $retr
+}