Browse Source

Fix start/restart of the service during config panel operation, we have to use 'yunohost service' otherwise the lock is not transferred

Alexandre Aubin 1 year ago
parent
commit
7127e3b3a1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      scripts/config

+ 2 - 2
scripts/config

@@ -199,7 +199,7 @@ ynh_app_config_apply() {
 
 
     # Stop vpn client
     # Stop vpn client
     ynh_print_info --message="Stopping hotspot in order to edit files"
     ynh_print_info --message="Stopping hotspot in order to edit files"
-    systemctl stop ${service_name}
+    yunohost service stop $service_name
 
 
     _ynh_app_config_apply
     _ynh_app_config_apply
 
 
@@ -209,7 +209,7 @@ ynh_app_config_apply() {
 
 
         # Start hotspot
         # Start hotspot
         ynh_print_info --message="Starting hotspot service if needed"
         ynh_print_info --message="Starting hotspot service if needed"
-        systemctl start ${service_name}
+        yunohost service start $service_name
     else
     else
         ynh_print_info --message="Cleanup hotspot config files"
         ynh_print_info --message="Cleanup hotspot config files"
         ynh_secure_remove --file="/etc/hostapd/$app/hostapd.conf"
         ynh_secure_remove --file="/etc/hostapd/$app/hostapd.conf"