mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
update
This commit is contained in:
parent
f43d99b7ad
commit
21fc085531
3 changed files with 8 additions and 14 deletions
|
@ -110,7 +110,7 @@ then
|
||||||
# escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html)
|
# escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html)
|
||||||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||||
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||||
regexList=${domainluaregex}${pathluaregex}/index.php%?f=.+$","${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$","${domainluaregex}${pathluaregex}/private/temp/.+%.zip$","${domainluaregex}${pathluaregex}/core/js/.*$","${domainluaregex}${pathluaregex}/templates/.*$"
|
regexList="${domainluaregex}${pathluaregex}/index.php%?f=.+$","${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$","${domainluaregex}${pathluaregex}/private/temp/.+%.zip$","${domainluaregex}${pathluaregex}/core/js/.*$","${domainluaregex}${pathluaregex}/templates/.*$"
|
||||||
ynh_app_setting_set "$app" unprotected_regex "$regexList"
|
ynh_app_setting_set "$app" unprotected_regex "$regexList"
|
||||||
sudo yunohost app ssowatconf
|
sudo yunohost app ssowatconf
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -27,9 +27,7 @@ if [ -e "/home/yunohost.app/${app}" ]; then
|
||||||
sudo rm -rf /home/yunohost.app/${app}
|
sudo rm -rf /home/yunohost.app/${app}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove app dependencies
|
|
||||||
ynh_package_autoremove "${app}-deps" || true
|
|
||||||
|
|
||||||
# Restart services
|
# Restart services
|
||||||
sudo service php5-fpm restart || true
|
sudo service php5-fpm restart || true
|
||||||
sudo service nginx restart || true
|
sudo service nginx reload || true
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
|
@ -55,19 +55,15 @@ sudo chmod 644 "$phpfpm_conf"
|
||||||
# if app is private, remove url to SSOWat conf from skipped_uris
|
# if app is private, remove url to SSOWat conf from skipped_uris
|
||||||
if [ "$is_public" = "No" ];
|
if [ "$is_public" = "No" ];
|
||||||
then
|
then
|
||||||
|
ynh_app_setting_delete "$app" unprotected_uris
|
||||||
# escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html)
|
# escape magic chars in vars (lua magic chars are ().%+-*?[^$ according to https://www.lua.org/pil/20.2.html)
|
||||||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||||
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||||
# redirect to SSOwat login in
|
regexList="${domainluaregex}${pathluaregex}/index.php%?f=.+$","${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$","${domainluaregex}${pathluaregex}/private/temp/.+%.zip$","${domainluaregex}${pathluaregex}/core/js/.*$","${domainluaregex}${pathluaregex}/templates/.*$"
|
||||||
ynh_app_setting_delete "$app" unprotected_uris
|
ynh_app_setting_set "$app" unprotected_regex "$regexList"
|
||||||
ynh_app_setting_set "$app" unprotected_regex \
|
sudo yunohost app ssowatconf
|
||||||
"${domainluaregex}${pathluaregex}/index.php%?f=.+$", \
|
|
||||||
"${domainluaregex}${pathluaregex}/index.php%?zipfolder=.+$", \
|
|
||||||
"${domainluaregex}${pathluaregex}/private/temp/.+%.zip$", \
|
|
||||||
"${domainluaregex}${pathluaregex}/core/js/.*$", \
|
|
||||||
"${domainluaregex}${pathluaregex}/templates/.*$"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart services
|
# Restart services
|
||||||
sudo service php5-fpm restart || true
|
sudo service php5-fpm restart || true
|
||||||
sudo service nginx restart || true
|
sudo service nginx reload || true
|
||||||
|
|
Loading…
Reference in a new issue