Revert "Fix error"
This reverts commit 049d2a37affd1732c409f113412670a732ce95c5.
diff --git a/containers/xos/Dockerfile.devel b/containers/xos/Dockerfile.devel
index b227778..55dcdee 100644
--- a/containers/xos/Dockerfile.devel
+++ b/containers/xos/Dockerfile.devel
@@ -101,3 +101,6 @@
RUN git -C /opt/openvpn pull origin master
RUN echo 'set_var EASYRSA "/opt/openvpn/easyrsa3"' | tee /opt/openvpn/vars
RUN echo 'set_var EASYRSA_BATCH "true"' | tee -a /opt/openvpn/vars
+RUN /opt/openvpn/easyrsa3/easyrsa --pki-dir="/opt/openvpn/init_pki" --vars=/opt/openvpn/vars init-pki
+RUN /opt/openvpn/easyrsa3/easyrsa --pki-dir="/opt/openvpn/init_pki" --vars=/opt/openvpn/vars gen-dh
+RUN chmod 777 /opt/openvpn/init_pki/dh.pem
diff --git a/xos/synchronizers/vpn/steps/sync_vpntenant.py b/xos/synchronizers/vpn/steps/sync_vpntenant.py
index 01385b3..fc1e695 100644
--- a/xos/synchronizers/vpn/steps/sync_vpntenant.py
+++ b/xos/synchronizers/vpn/steps/sync_vpntenant.py
@@ -21,7 +21,7 @@
def sync_fields(self, tenant, fields):
tenant.pki_dir = (
- VPNService.OPENVPN_PREFIX + "server-" + str(tenant.id))
+ VPNService.OPENVPN_PREFIX + "server-" + str(result.id))
if (not os.path.isdir(tenant.pki_dir)):
VPNService.execute_easyrsa_command(