summaryrefslogtreecommitdiff
path: root/Push
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2016-11-26 17:51:33 +0100
committerPeter Palfrader <peter@palfrader.org>2016-11-26 17:51:33 +0100
commit28923965fedd8735ac0b71b83f852b5f35185f96 (patch)
tree779921b48c0f77e13cda1e907b68fc801beec906 /Push
parenta0f4a778178cb0005d0062d452fb510995fc61a8 (diff)
daemon-reload and service
Diffstat (limited to 'Push')
-rwxr-xr-xPush6
1 files changed, 4 insertions, 2 deletions
diff --git a/Push b/Push
index 644bf54..42963f6 100755
--- a/Push
+++ b/Push
@@ -109,8 +109,10 @@ hosts.each{ |hostname|
commands = []
commands << "sh ./#{do_iptables} &&\n" if do_iptables
commands << "sh ./#{do_ip6tables} &&\n" if do_ip6tables
- commands << "/etc/init.d/openvpn stop "+stop.join(' ')+" &&\n" if stop.size > 0
- commands << "/etc/init.d/openvpn restart "+restart.join(' ')+" && \n" if restart.size > 0
+ #commands << "/etc/init.d/openvpn stop "+stop.join(' ')+" &&\n" if stop.size > 0
+ #commands << "/etc/init.d/openvpn restart "+restart.join(' ')+" && \n" if restart.size > 0
+ commands << "(systemctl daemon-reload || true ) && \n"
+ commands << "service openvpn restart && \n" if restart.size > 0 or stop.size > 0
commands << "rm "+delete.join(' ')+" &&\n" if delete.size > 0
command = "cd /etc/openvpn && \n";
command << commands.join('')