diff --git a/conf/activate_plugins.sql b/conf/activate_plugins.sql deleted file mode 100644 index 93ea301..0000000 --- a/conf/activate_plugins.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `yourls_options` ( `option_name`, `option_value`) VALUES -('active_plugins', 'a:1:{i:0;s:29:"yourls-ldap-plugin/plugin.php";}'); - diff --git a/conf/nginx.conf b/conf/nginx.conf index 8feb87d..c9a86e3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,20 +1,21 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - + + # Path to source alias __FINALPATH__/; - try_files $uri $uri/ __FINALPATH__/yourls-loader.php; - index index.php index.html index.htm; + try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php__PHPVERSION__-fpm-__NAME__.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; } # Include SSOWAT user panel. diff --git a/conf/remove_sso_conf.py b/conf/remove_sso_conf.py deleted file mode 100644 index 4237b7d..0000000 --- a/conf/remove_sso_conf.py +++ /dev/null @@ -1,8 +0,0 @@ -import json - -with open("/etc/ssowat/conf.json.persistent", "r", encoding='utf-8') as jsonFile: - data = json.load(jsonFile) - data["protected_urls"].remove("__DOMAIN____PATH__/admin") - -with open("/etc/ssowat/conf.json.persistent", "w", encoding='utf-8') as jsonFile: - jsonFile.write(json.dumps(data, indent=4, sort_keys=True)) diff --git a/scripts/install b/scripts/install index ba11ac0..dee95ce 100644 --- a/scripts/install +++ b/scripts/install @@ -106,7 +106,7 @@ ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # copy index file -cp ../conf/index.php $final_path/ +#cp ../conf/index.php $final_path/ #================================================= #================================================= @@ -128,16 +128,20 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 ynh_permission_update --permission="main" --add="visitors" #================================================= -# RELOAD NGINX +# SETUP APPLICATION WITH CURL #================================================= -#ynh_script_progression --message="Reloading NGINX web server..." --weight=3 -#ynh_systemd_action --service_name=nginx --action=reload -#sleep 10 +# # Set the app as temporarily public for curl call +# ynh_script_progression --message="Configuring SSOwat..." --weight=1 +# # Making the app public for curl +# ynh_permission_update --permission="main" --add="visitors" -# Start YOURLS install (database table creation) -#ynh_local_curl "admin/install.php" "install=dummy" -#sleep 10 +# # Installation with curl +# ynh_script_progression --message="Finalizing installation..." --weight=1 +# ynh_local_curl "admin/install.php" "install=dummy" + +# # Remove the public access +# ynh_permission_update --permission="main" --remove="visitors" #================================================= # RELOAD NGINX