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 (-21 / +9 lines)
Lines 31-50 function PrintInfo() Link Here
31
{
31
{
32
  PrintVersion
32
  PrintVersion
33
  echo
33
  echo
34
  PrintDaemonStatus
35
  echo
36
  PrintTeamViewerID
34
  PrintTeamViewerID
37
}
35
}
38
36
39
function PrintDaemonStatus()
40
{
41
  local cmd="$(daemonCtl 'status')"
42
  local txt="$(eval "$cmd")"
43
  [ $? = 0 ] || txt='n/a (error)'
44
  
45
  ABecho "teamviewerd status" "$txt"
46
}
47
48
function PrintTeamViewerID()
37
function PrintTeamViewerID()
49
{
38
{
50
  local config="$TV_BASE_DIR/config/global.conf"
39
  local config="$TV_BASE_DIR/config/global.conf"
Lines 55-72 function PrintTeamViewerID() Link Here
55
  if [ -n "$tvid" ]; then
44
  if [ -n "$tvid" ]; then
56
    ABecho "TeamViewer ID:" "$tvid"
45
    ABecho "TeamViewer ID:" "$tvid"
57
  else
46
  else
58
    echo "TeamViewer ID: not found"
47
    echo "Try restarting the TeamViewer daemon."
59
    echo "Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)"
60
  fi
48
  fi
61
}
49
}
62
50
63
function SetPasswd()
51
function SetPasswd()
64
{
52
{
53
  echo "Stop your teamviewer daemon first, then press enter."
54
  read
55
65
  local pwd="$1"
56
  local pwd="$1"
66
  [ -n "$pwd" ] || die 'no password specified'
57
  [ -n "$pwd" ] || die 'no password specified'
67
58
68
  Run_Daemon 'stop' > /dev/null
69
  
70
  $TV_BIN_DIR/teamviewerd --passwd "$pwd"
59
  $TV_BIN_DIR/teamviewerd --passwd "$pwd"
71
  case $? in
60
  case $? in
72
    0  ) echo 'ok'	;;
61
    0  ) echo 'ok'	;;
Lines 76-93 function SetPasswd() Link Here
76
    *  ) echo 'unknown response'	;;
65
    *  ) echo 'unknown response'	;;
77
   esac
66
   esac
78
  
67
  
79
  Run_Daemon 'start' || die 'failed to restart the daemon'
68
  echo "You may start your teamviewer daemon again."
80
  echo
81
}
69
}
82
70
83
function ExportLicense()
71
function ExportLicense()
84
{
72
{
73
  echo "Stop your teamviewer daemon first, then press enter."
74
  read
75
85
  local license="$1"
76
  local license="$1"
86
  local path='/tmp/tv_global.conf'
77
  local path='/tmp/tv_global.conf'
87
78
88
  [ -n "$license" ] || die 'no license specified'
79
  [ -n "$license" ] || die 'no license specified'
89
90
  Run_Daemon 'stop' > /dev/null
91
  
80
  
92
  $TV_BIN_DIR/teamviewerd --export-license "$license" "$path"
81
  $TV_BIN_DIR/teamviewerd --export-license "$license" "$path"
93
  case $? in
82
  case $? in
Lines 96-103 function ExportLicense() Link Here
96
    *  ) echo 'unknown response'	;;
85
    *  ) echo 'unknown response'	;;
97
   esac
86
   esac
98
  
87
  
99
  Run_Daemon 'start' || die 'failed to restart the daemon'
88
  echo "You may start your teamviewer daemon again."
100
  echo
101
}
89
}
102
90
103
function CreateZipLog()
91
function CreateZipLog()
(-)a/opt/teamviewer9/tv_bin/script/tvw_main (-15 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 149-164 function Run_RegEdit() Link Here
149
  Init
147
  Init
150
  wine regedit "$@"
148
  wine regedit "$@"
151
}
149
}
152
153
function Run_Daemon()
154
{
155
  local opt="$1"
156
157
  case "$opt" in
158
    ( disable )				removeDaemon	|| rootSuggest	;;
159
    ( enable  )				installDaemon	|| rootSuggest	;;
160
    ( start | stop | restart )		cmdDaemon $opt	|| rootSuggest	;;
161
    ( status )				cmdDaemon $opt			;;
162
    ( * )				echo "unknown option '$opt'"	;;
163
  esac
164
}

Return to bug 491770