Fix script location
diff --git a/xos/observers/vpn/steps/sync_vpntenant.py b/xos/observers/vpn/steps/sync_vpntenant.py
index 5d04c14..31500d3 100644
--- a/xos/observers/vpn/steps/sync_vpntenant.py
+++ b/xos/observers/vpn/steps/sync_vpntenant.py
@@ -37,7 +37,7 @@
"client_address": o.client_address}
def create_client_script(self, tenant):
- script = open(tenant.file_name, 'w')
+ script = open("/opt/xos/core/" + tenant.file_name, 'w')
# write the key portion
script.write("printf \"")
for line in tenant.server_key.splitlines():
diff --git a/xos/services/vpn/admin.py b/xos/services/vpn/admin.py
index f6d233f..543fa88 100644
--- a/xos/services/vpn/admin.py
+++ b/xos/services/vpn/admin.py
@@ -94,7 +94,7 @@
self.fields['client_address'].initial = "10.8.0.2"
self.fields['is_persistent'].initial = True
self.fields['can_view_subnet'].initial = False
- self.fields['file_name'].initial = time.time() + ".vpn"
+ self.fields['file_name'].initial = "/static/vpn/" + time.time() + ".vpn"
if VPNService.get_service_objects().exists():
self.fields["provider_service"].initial = VPNService.get_service_objects().all()[
0]