Browse Source

At the end of the upgrade, restart vpnclient only if it's already active

Alexandre Aubin 6 years ago
parent
commit
2f04d16d4f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      scripts/upgrade

+ 4 - 1
scripts/upgrade

@@ -86,4 +86,7 @@ sudo rm -rf ${tmpdir}
 ynh_systemctl reload php5-fpm
 ynh_systemctl reload nginx
 
-ynh_systemctl restart ynh-vpnclient
+if systemctl is-active ynh-vpnclient >/dev/null;
+then
+    ynh_systemctl restart ynh-vpnclient
+fi