Pearl1594 commented on code in PR #12422:
URL: https://github.com/apache/cloudstack/pull/12422#discussion_r2694136348


##########
systemvm/debian/opt/cloud/bin/configure.py:
##########
@@ -1233,17 +1233,21 @@ def process(self):
                 CsHelper.start_if_stopped("ipsec")
 
                 logging.debug("Remote accessvpn  data bag %s",  self.dbag)
+                config_changed = False
                 if not self.config.has_public_network():
                     interface = 
self.config.address().get_guest_if_by_network_id()
                     if interface:
-                        self.configure_l2tpIpsec(interface.get_ip(), 
self.dbag[public_ip])
+                        config_changed = 
self.configure_l2tpIpsec(interface.get_ip(), self.dbag[public_ip])
                         self.remoteaccessvpn_iptables(interface.get_device(), 
interface.get_ip(), self.dbag[public_ip])
                 else:
-                    self.configure_l2tpIpsec(public_ip, self.dbag[public_ip])
+                    config_changed = self.configure_l2tpIpsec(public_ip, 
self.dbag[public_ip])
                     
self.remoteaccessvpn_iptables(self.dbag[public_ip]['public_interface'], 
public_ip, self.dbag[public_ip])
 
                 CsHelper.execute("ipsec update")
-                CsHelper.execute("systemctl start xl2tpd")
+                if config_changed:

Review Comment:
   can we just not use `systemctl restart x12tpd`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to