From 6c8f9ddd0cb4277f2d48d36ca9db414a2662ffc9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Oct 2022 21:31:17 +0200 Subject: [PATCH] Fix --- conf/nginx.conf | 2 +- scripts/install | 6 ++++++ scripts/restore | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b26a6dc..a930064 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + alias __FINALPATH__/; index index.php; diff --git a/scripts/install b/scripts/install index 69b9a07..20ea80a 100755 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # CREATE A MYSQL DATABASE @@ -108,6 +109,8 @@ chown $app:$app "$final_path/conf/config.php" #================================================= # SETUP APPLICATION WITH CURL #================================================= +# Set the app as temporarily public for curl call +ynh_script_progression --message="Configuring SSOwat..." --weight=1 ynh_permission_update --permission="main" --add="visitors" @@ -122,6 +125,9 @@ ynh_local_curl "/install.php" # Supprimer install.php ynh_secure_remove --file=$final_path/install.php +# Remove the public access +ynh_permission_update --permission="main" --remove="visitors" + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index 690d517..706d047 100755 --- a/scripts/restore +++ b/scripts/restore @@ -92,7 +92,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload