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

Collapse All | Expand All

(-)a/opt/teamviewer9/tv_bin/script/tvw_extra (-30 / +10 lines)
Lines 16-28 function PrintHelp() 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 39-57 function PrintInfo() Link Here
39
  PrintTeamViewerID
32
  PrintTeamViewerID
40
}
33
}
41
34
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
}
54
55
function PrintTeamViewerID()
35
function PrintTeamViewerID()
56
{
36
{
57
  local config="$TV_BASE_DIR/config/global.conf"
37
  local config="$TV_BASE_DIR/config/global.conf"
Lines 64-79 function PrintTeamViewerID() 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
76
  Run_Daemon 'stop' > /dev/null
77
  
58
  
78
  $TV_BIN_DIR/teamviewerd --passwd "$pwd"
59
  $TV_BIN_DIR/teamviewerd --passwd "$pwd"
79
  case $? in
60
  case $? in
Lines 84-102 function SetPasswd() Link Here
84
    *  ) echo 'unknown response'	;;
65
    *  ) echo 'unknown response'	;;
85
   esac
66
   esac
86
  
67
  
87
  Run_Daemon 'start' || die 'failed to restart the daemon'
68
  echo "You may start your teamviewer daemon again."
88
  echo
89
}
69
}
90
70
91
function ExportLicense()
71
function ExportLicense()
92
{
72
{
73
  echo "Stop your teamviewer daemon first, then press enter."
74
  read
75
93
  local license="$1"
76
  local license="$1"
94
  local path='/tmp/tv_global.conf'
77
  local path='/tmp/tv_global.conf'
95
78
96
  [ -n "$license" ] || die 'no license specified'
79
  [ -n "$license" ] || die 'no license specified'
97
80
 
98
  Run_Daemon 'stop' > /dev/null
99
  
100
  $TV_BIN_DIR/teamviewerd --export-license "$license" "$path"
81
  $TV_BIN_DIR/teamviewerd --export-license "$license" "$path"
101
  case $? in
82
  case $? in
102
    0  ) echo "ok - license exported to '$path'"		;;
83
    0  ) echo "ok - license exported to '$path'"		;;
Lines 104-111 function ExportLicense() Link Here
104
    *  ) echo 'unknown response'	;;
85
    *  ) echo 'unknown response'	;;
105
   esac
86
   esac
106
  
87
  
107
  Run_Daemon 'start' || die 'failed to restart the daemon'
88
  echo "You may start your teamviewer daemon again."
108
  echo
109
}
89
}
110
90
111
function StripPersonalInformation()
91
function StripPersonalInformation()
(-)a/opt/teamviewer9/tv_bin/script/tvw_main (-17 lines)
Lines 4-10 source "$TV_SCRIPT_DIR/tvw_aux" 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
9
Lines 19-25 function Main() Link Here
19
    --help )			PrintHelp				;;
18
    --help )			PrintHelp				;;
20
    --version )			PrintVersion			;;
19
    --version )			PrintVersion			;;
21
    --info )			PrintInfo				;;
20
    --info )			PrintInfo				;;
22
    --daemon )			Run_Daemon $opt			;;
23
    --winecfg )	shift;	Run_WineCfg "$@"		;;
21
    --winecfg )	shift;	Run_WineCfg "$@"		;;
24
    --regedit )	shift;	Run_RegEdit "$@"		;;
22
    --regedit )	shift;	Run_RegEdit "$@"		;;
25
    --kill )			Run_KillTeamViewer		;;
23
    --kill )			Run_KillTeamViewer		;;
Lines 166-183 function Run_RegEdit() Link Here
166
  Init
164
  Init
167
  wine regedit "$@"
165
  wine regedit "$@"
168
}
166
}
169
170
function Run_Daemon()
171
{
172
  local opt="$1"
173
  
174
  installedTVorDie
175
176
  case "$opt" in
177
    ( disable )					removeDaemon	|| rootSuggest	;;
178
    ( enable  )					installDaemon	|| rootSuggest	;;
179
    ( start | stop | restart )	cmdDaemon $opt	|| rootSuggest	;;
180
    ( status )					cmdDaemon $opt					;;
181
    ( * )						echo "unknown option '$opt'"	;;
182
  esac
183
}

Return to bug 491770