|
|
|
@ -19,7 +19,7 @@ def install(): |
|
|
|
|
run(r'certutil.exe -addstore trustedpublisher openvpn.p7b') |
|
|
|
|
|
|
|
|
|
print('Installing OpenVPN client') |
|
|
|
|
install_exe_if_needed('openvpn-install-%s-I602.exe' % version,'/S',key='OpenVPN',min_version='%s-I602' % version,killbefore=['openvpn','openvpn-gui']) |
|
|
|
|
install_exe_if_needed('openvpn-install-%s-I603.exe' % version,'/S',key='OpenVPN',min_version='%s-I602' % version,killbefore=['openvpn','openvpn-gui']) |
|
|
|
|
uninstallkey.append('TAP-Windows') |
|
|
|
|
|
|
|
|
|
if 'openvpn_config' in variables: |
|
|
|
@ -37,12 +37,12 @@ def update_package(): |
|
|
|
|
current_version = control['version'].split('-',1)[0] |
|
|
|
|
if Version(latest_version) > Version(current_version): |
|
|
|
|
print('Updating Package from %s to %s' % (current_version, latest_version)) |
|
|
|
|
if not isfile('openvpn-install-%s-I602.exe' % latest_version): |
|
|
|
|
url = 'https://swupdate.openvpn.org/community/releases/openvpn-install-%s-I602.exe' % latest_version |
|
|
|
|
if not isfile('openvpn-install-%s-I603.exe' % latest_version): |
|
|
|
|
url = 'https://swupdate.openvpn.org/community/releases/openvpn-install-%s-I603.exe' % latest_version |
|
|
|
|
print('downloading %s' % url) |
|
|
|
|
wget(url, os.getcwd()) |
|
|
|
|
for file in glob.glob('*.exe'): |
|
|
|
|
if file != 'openvpn-install-%s-I602.exe' % latest_version: |
|
|
|
|
if file != 'openvpn-install-%s-I603.exe' % latest_version: |
|
|
|
|
print('Removing %s' % file) |
|
|
|
|
remove_file(file) |
|
|
|
|
pe.version = latest_version + '-0' |
|
|
|
|