Fix settings logic (need both the SET_ and the VALUE_OF_)

master
Daniel Berteaud 6 years ago
parent 2cc98a59cc
commit 92b2b35651
  1. 2
      WAPT/control
  2. 26
      setup.py

@ -1,5 +1,5 @@
package : fws-tightvnc-server
version : 2.8.11-1
version : 2.8.11-2
architecture : all
section : base
priority : optional

@ -28,19 +28,33 @@ def install():
props = {
'ADDLOCAL': 'Server',
'SET_ACCEPTHTTPCONNECTIONS': 0,
'SET_LOGLEVEL': 3,
'SET_REMOVEWALLPAPER': 0
'SET_ACCEPTHTTPCONNECTIONS': 1,
'VALUE_OF_ACCEPTHTTPCONNECTIONS': 0,
'SET_ACCEPTRFBCONNECTIONS': 1,
'VALUE_OF_ACCEPTRFBCONNECTIONS': 1,
'SET_LOGLEVEL': 1,
'VALUE_OF_LOGLEVEL': 3,
'SET_REMOVEWALLPAPER': 1,
'VALUE_OF_REMOVEWALLPAPER': 0
}
if 'vnc_allowed_ip' in variables:
props['SET_IPACCESSCONTROL'] =','.join( '%s-%s:0' % (ip,ip) if not re.search('\-',ip) else '%s:0' % ip for ip in ensure_list(variables['vnc_allowed_ip']) )
print('Access will be restricted to %s' % ','.join(variables['vnc_allowed_ip']))
props['SET_IPACCESSCONTROL'] = 1,
props['VALUE_OF_IPACCESSCONTROL'] = ','.join( '%s-%s:0' % (ip,ip) if not re.search('\-',ip) else '%s:0' % ip for ip in ensure_list(variables['vnc_allowed_ip']) )
if 'vnc_pass' in variables:
props['SET_PASSWORD'] = variables['vnc_pass']
print('Setting VNC password')
props['SET_USEVNCAUTHENTICATION'] = 1
props['VALUE_OF_USEVNCAUTHENTICATION'] = 1
props['SET_PASSWORD'] = 1
props['VALUE_OF_PASSWORD'] = variables['vnc_pass']
props['SET_USEVNCAUTHENTICATION'] = 1
if 'vnc_admin_pass' in variables:
props['SET_CONTROLPASSWORD'] = variables['vnc_admin_pass']
print('Setting VNC control password')
props['SET_USECONTROLAUTHENTICATION'] = 1
props['VALUE_OF_USECONTROLAUTHENTICATION'] = 1
props['SET_CONTROLPASSWORD'] = 1
props['VALUE_OF_CONTROLPASSWORD'] = variables['vnc_admin_pass']
install_msi_if_needed(msi,min_version=version,properties=props)
Loading…
Cancel
Save