Parcourir la source

restart ynh-vpnclient service with ynh_systemd_action

HgO il y a 1 an
Parent
commit
79c0ed6e8e
1 fichiers modifiés avec 1 ajouts et 5 suppressions
  1. 1 5
      scripts/upgrade

+ 1 - 5
scripts/upgrade

@@ -156,11 +156,7 @@ fi
 ynh_print_info "Restart services..."
 
 # this is meant to propagate the new files and configs
-yunohost service restart $service_name
-
-# Not sure if these are really necessary ...
-systemctl -q is-active $service_checker_name       && systemctl restart $service_checker_name
-systemctl -q is-active $service_checker_name.timer && systemctl restart $service_checker_name.timer
+ynh_systemd_action --action=restart --service=$service_name
 
 #=================================================
 # END OF SCRIPT