From d3eb54ad46c8c9fb9b28cdb22ea35f47c9c09d30 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 24 Sep 2020 00:04:31 +0200 Subject: [PATCH 1/4] No need to savagely restart php-fpm ... this dates back from the era were hotspot was run using admin --- conf/ynh-hotspot | 6 ------ 1 file changed, 6 deletions(-) diff --git a/conf/ynh-hotspot b/conf/ynh-hotspot index b3b2a9a..beb16a4 100644 --- a/conf/ynh-hotspot +++ b/conf/ynh-hotspot @@ -289,12 +289,6 @@ devfromid() { if [ "$1" != restart ]; then - # Restart php7.0-fpm at the first start (it needs to be restarted after the slapd start) - if [ ! -e /tmp/.ynh-hotspot-boot ]; then - touch /tmp/.ynh-hotspot-boot - systemctl restart php__PHPVERSION__-fpm - fi - # Variables echo -n "Retrieving Yunohost settings... " From 34abf5216239853b1066b7cebc75c2469db6d4ad Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 24 Sep 2020 00:05:30 +0200 Subject: [PATCH 2/4] No need to reload nginx/php-fpm, the helpers already handle it --- scripts/install | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/install b/scripts/install index b4e80cd..b20a680 100644 --- a/scripts/install +++ b/scripts/install @@ -323,14 +323,6 @@ else ynh_systemd_action --service_name=$service_name --action="start" --log_path=systemd #--line_match="Started YunoHost Wifi Hotspot" fi -#================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading nginx web server..." - -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From b6ba4307162bc6a200f655536631f511c5f62c40 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 24 Sep 2020 00:07:43 +0200 Subject: [PATCH 3/4] No need to go further if no wifi device defined --- conf/ynh-hotspot | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf/ynh-hotspot b/conf/ynh-hotspot index b3b2a9a..66af079 100644 --- a/conf/ynh-hotspot +++ b/conf/ynh-hotspot @@ -337,6 +337,12 @@ case "$1" in elif [ "${ynh_service_enabled}" != "enabled" ]; then echo "Disabled service" else + + if [ -z "${ynh_wifi_device}" ]; then + echo "[ERR] No wifi device selected. Make sure your wifi antenna is plugged-in / available and select it in the Hotspot admin" + exitcode=1 + fi + echo "[hotspot] Starting..." touch /tmp/.ynh-hotspot-started @@ -488,6 +494,11 @@ case "$1" in exitcode=1 fi + if [ -z "${ynh_wifi_device}" ]; then + echo "[ERR] No wifi device selected. Make sure your wifi antenna is plugged-in / available and select it in the Hotspot admin" + exitcode=1 + fi + echo "[INFO] Autodetected internet interface: ${new_internet_device} (last start: ${old_internet_device})" if is_nat_set "${new_internet_device}"; then From d8003bf3ba6e4a43358bfe6a86e9e99362a6fe39 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 2 Nov 2020 19:54:21 +0100 Subject: [PATCH 4/4] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b20a680..dad2fe0 100644 --- a/scripts/install +++ b/scripts/install @@ -144,7 +144,7 @@ fi #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Creating a MySQL database..." +ynh_script_progression --message="Installing dependencies" ynh_install_app_dependencies "$pkg_dependencies" "$packages"