mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
Use 'yunohost service start' instead of 'ynh_systemd_action' such that yunohost properly gives the lock to the 'yunohost tools regen-conf' inside the service
This commit is contained in:
parent
cf03447866
commit
1d9844f997
3 changed files with 4 additions and 5 deletions
|
@ -217,7 +217,7 @@ ynh_script_progression --message="Starting a systemd service..."
|
||||||
if [[ $wifi_device == "" ]]; then
|
if [[ $wifi_device == "" ]]; then
|
||||||
echo "WARNING: Wifi Hotspot is not started because no wifi device was found (please, check the web admin)" >&2
|
echo "WARNING: Wifi Hotspot is not started because no wifi device was found (please, check the web admin)" >&2
|
||||||
else
|
else
|
||||||
ynh_systemd_action --service_name=$service_name --action="start" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot"
|
yunohost service start $service_name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -126,7 +126,7 @@ fi
|
||||||
if [[ $wifi_device == "" ]]; then
|
if [[ $wifi_device == "" ]]; then
|
||||||
echo "WARNING: Wifi Hotspot is not started because no wifi device was found (please, check the web admin)" >&2
|
echo "WARNING: Wifi Hotspot is not started because no wifi device was found (please, check the web admin)" >&2
|
||||||
else
|
else
|
||||||
ynh_systemd_action --service_name=$service_name --action="start" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot"
|
yunohost service start $service_name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -58,8 +58,7 @@ ynh_abort_if_errors
|
||||||
# STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping the hotspot service ... (this may take some time)"
|
ynh_script_progression --message="Stopping the hotspot service ... (this may take some time)"
|
||||||
|
yunohost service stop $service_name
|
||||||
ynh_systemd_action --service_name=$service_name --action="stop" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
@ -269,7 +268,7 @@ fi
|
||||||
if [[ $wifi_device == "" ]]; then
|
if [[ $wifi_device == "" ]]; then
|
||||||
echo "WARNING: Wifi Hotspot is not started because no wifi device was found (please, check the web admin)" >&2
|
echo "WARNING: Wifi Hotspot is not started because no wifi device was found (please, check the web admin)" >&2
|
||||||
else
|
else
|
||||||
ynh_systemd_action --service_name=$service_name --action="start" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot"
|
yunohost service start $service_name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue