1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yourls_ynh.git synced 2024-09-03 20:35:59 +02:00
This commit is contained in:
ericgaspar 2022-02-26 20:35:40 +01:00
parent 734b863fdd
commit 1aebdeff19
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 23 additions and 29 deletions

View file

@ -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";}');

View file

@ -1,20 +1,21 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
# Path to source
alias __FINALPATH__/; alias __FINALPATH__/;
try_files $uri $uri/ __FINALPATH__/yourls-loader.php;
index index.php index.html index.htm; index index.php index.html index.htm;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params; fastcgi_index index.php;
fastcgi_param REMOTE_USER $remote_user; include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param REMOTE_USER $remote_user;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
} }
# Include SSOWAT user panel. # Include SSOWAT user panel.

View file

@ -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))

View file

@ -106,7 +106,7 @@ ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# copy index file # 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" 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 # # Set the app as temporarily public for curl call
#sleep 10 # 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) # # Installation with curl
#ynh_local_curl "admin/install.php" "install=dummy" # ynh_script_progression --message="Finalizing installation..." --weight=1
#sleep 10 # ynh_local_curl "admin/install.php" "install=dummy"
# # Remove the public access
# ynh_permission_update --permission="main" --remove="visitors"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX