Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 533452 | Differences between
and this patch

Collapse All | Expand All

(-)a/opt/teamviewer10/tv_bin/script/tvw_extra (-29 / +9 lines)
Lines 16-28 Link Here
16
  isInstalledTV || return
16
  isInstalledTV || return
17
  ABecho "teamviewer --passwd [PASSWD]"	"set a password (useful when installing remote (ssh)"
17
  ABecho "teamviewer --passwd [PASSWD]"	"set a password (useful when installing remote (ssh)"
18
  echo
18
  echo
19
  ABecho "teamviewer --daemon status"	"show current status of the TeamViewer daemon"
20
  ABecho "teamviewer --daemon start"	"start		TeamViewer daemon"
21
  ABecho "teamviewer --daemon stop"		"stop		TeamViewer daemon"
22
  ABecho "teamviewer --daemon restart"	"stop/start	TeamViewer daemon"
23
  ABecho "teamviewer --daemon disable"	"disable	TeamViewer daemon - don't start daemon on system startup"
24
  ABecho "teamviewer --daemon enable"	"enable		TeamViewer daemon - start daemon on system startup (default)"
25
  echo
26
}
19
}
27
20
28
function PrintVersion()
21
function PrintVersion()
Lines 37-55 Link Here
37
  PrintDaemonStatus
30
  PrintDaemonStatus
38
  echo
31
  echo
39
  PrintTeamViewerID
32
  PrintTeamViewerID
40
}
41
42
function PrintDaemonStatus()
43
{
44
  local cmd="$(daemonCtl 'status')"
45
  local txt="n/a"
46
47
  if [ isInstalledTV ] ; then
48
    txt="$(eval "$cmd")"
49
    [ $? = 0 ] || txt='n/a (error)'
50
  fi
51
  
52
  ABecho "teamviewerd status" "$txt"
53
}
33
}
54
34
55
function PrintTeamViewerID()
35
function PrintTeamViewerID()
Lines 64-83 Link Here
64
  ABecho "TeamViewer ID:" "$tvid"
44
  ABecho "TeamViewer ID:" "$tvid"
65
45
66
  if [ -z "$tvid" ] && isInstalledTV; then
46
  if [ -z "$tvid" ] && isInstalledTV; then
67
    echo "Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)"
47
    echo "Try restarting the TeamViewer daemon."
68
  fi
48
  fi
69
}
49
}
70
50
71
function SetPasswd()
51
function SetPasswd()
72
{
52
{
53
  echo "Stop your teamviewer daemon first, then press enter."
54
  read
55
73
  local pwd="$1"
56
  local pwd="$1"
74
  [ -n "$pwd" ] || die 'no password specified'
57
  [ -n "$pwd" ] || die 'no password specified'
75
58
76
  installedTVorDie
59
  installedTVorDie
77
  isSuperUser || die 'You need root permissions for this operation'
60
  isSuperUser || die 'You need root permissions for this operation'
78
61
79
  Run_Daemon 'stop' > /dev/null
80
  
81
  "$TV_BIN_DIR/teamviewerd" --passwd "$pwd"
62
  "$TV_BIN_DIR/teamviewerd" --passwd "$pwd"
82
  case $? in
63
  case $? in
83
    0  ) echo 'ok'	;;
64
    0  ) echo 'ok'	;;
Lines 88-99 Link Here
88
    *  ) echo 'unknown response'	;;
69
    *  ) echo 'unknown response'	;;
89
   esac
70
   esac
90
  
71
  
91
  Run_Daemon 'start' > /dev/null || die 'failed to restart the daemon'
72
  echo "You may start your teamviewer daemon again."
92
  echo
93
}
73
}
94
74
95
function ExportLicense()
75
function ExportLicense()
96
{
76
{
77
  echo "Stop your teamviewer daemon first, then press enter."
78
  read
79
97
  local license="$1"
80
  local license="$1"
98
  local path='/tmp/tv_global.conf'
81
  local path='/tmp/tv_global.conf'
99
82
Lines 101-108 Link Here
101
84
102
  isSuperUser || die 'You need root permissions for this operation'
85
  isSuperUser || die 'You need root permissions for this operation'
103
86
104
  Run_Daemon 'stop' > /dev/null
105
  
106
  "$TV_BIN_DIR/teamviewerd" --export-license "$license" "$path"
87
  "$TV_BIN_DIR/teamviewerd" --export-license "$license" "$path"
107
  case $? in
88
  case $? in
108
    0  ) echo "ok - license exported to '$path'"		;;
89
    0  ) echo "ok - license exported to '$path'"		;;
Lines 110-117 Link Here
110
    *  ) echo 'unknown response'	;;
91
    *  ) echo 'unknown response'	;;
111
   esac
92
   esac
112
  
93
  
113
  Run_Daemon 'start' > /dev/null || die 'failed to restart the daemon'
94
  echo "You may start your teamviewer daemon again."
114
  echo
115
}
95
}
116
96
117
function StripPersonalInformation()
97
function StripPersonalInformation()
(-)a/opt/teamviewer10/tv_bin/script/tvw_main (-17 lines)
Lines 4-10 Link Here
4
source "$TV_SCRIPT_DIR/tvw_config"
4
source "$TV_SCRIPT_DIR/tvw_config"
5
source "$TV_SCRIPT_DIR/tvw_exec"
5
source "$TV_SCRIPT_DIR/tvw_exec"
6
source "$TV_SCRIPT_DIR/tvw_extra"
6
source "$TV_SCRIPT_DIR/tvw_extra"
7
source "$TV_SCRIPT_DIR/tvw_daemon"
8
source "$TV_SCRIPT_DIR/tvw_profile"
7
source "$TV_SCRIPT_DIR/tvw_profile"
9
8
10
function Main()
9
function Main()
Lines 18-24 Link Here
18
    --help )			PrintHelp				;;
17
    --help )			PrintHelp				;;
19
    --version )			PrintVersion			;;
18
    --version )			PrintVersion			;;
20
    --info )			PrintInfo				;;
19
    --info )			PrintInfo				;;
21
    --daemon )			Run_Daemon $opt			;;
22
    --winecfg )	shift;	Run_WineCfg "$@"		;;
20
    --winecfg )	shift;	Run_WineCfg "$@"		;;
23
    --regedit )	shift;	Run_RegEdit "$@"		;;
21
    --regedit )	shift;	Run_RegEdit "$@"		;;
24
    --kill )			Run_KillTeamViewer		;;
22
    --kill )			Run_KillTeamViewer		;;
Lines 170-187 Link Here
170
  Init
168
  Init
171
  wine regedit "$@"
169
  wine regedit "$@"
172
}
170
}
173
174
function Run_Daemon()
175
{
176
  local opt="$1"
177
  
178
  installedTVorDie
179
180
  case "$opt" in
181
    ( disable )					removeDaemon	|| rootSuggest	;;
182
    ( enable  )					installDaemon	|| rootSuggest	;;
183
    ( start | stop | restart )	cmdDaemon $opt	|| rootSuggest	;;
184
    ( status )					cmdDaemon $opt					;;
185
    ( * )						echo "unknown option '$opt'"	;;
186
  esac
187
}

Return to bug 533452