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