mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
Solving App is broken #17 3
* Correct restore script `ynh_package_install_from_equivs` * Change in each script `#! /bin/bash` with `#!/bin/bash` * Correct `pathluaregex` in case of a installation on root
This commit is contained in:
parent
4584047561
commit
16ef7053e6
5 changed files with 8 additions and 7 deletions
|
@ -126,7 +126,7 @@ 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)
|
||||
domainluaregex=$(echo "$domain" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
pathluaregex=$(echo "$path" | sed -e 's/[]().%+*?[^$[]/\%&/g' | sed -e 's/\-/\%&/g')
|
||||
pathluaregex=$([ "$path" == "/" ] || 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/.*$"
|
||||
ynh_app_setting_set "$app" unprotected_regex "$regexList"
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
|
@ -39,7 +39,8 @@ sudo yunohost app checkurl $domain$path -a $app \
|
|||
You should safely delete it before restoring this app."
|
||||
|
||||
# add required packages
|
||||
ynh_package_install_from_equivs ../conf/${app}-deps.control || ynh_die "Unable to install dependencies"
|
||||
ynh_package_is_installed "php5-curl" || ynh_package_install "php5-curl"
|
||||
ynh_package_is_installed "php5-gd" || ynh_package_install "php5-gd"
|
||||
|
||||
# restore sources & data
|
||||
sudo cp -a ./www "$final_path"
|
||||
|
|
Loading…
Reference in a new issue