mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
Update upgrade
This commit is contained in:
parent
2f8a1f4714
commit
e3a8b64a79
1 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,11 @@ is_public=$(sudo yunohost app setting $app is_public)
|
|||
port=$(sudo yunohost app setting $app port)
|
||||
always_encrypt=$(sudo yunohost app setting $app always_encrypt)
|
||||
|
||||
# Vérifie l'absence du / en fin de path
|
||||
pathRslash=$(echo "$path" | sed 's@/$@@')
|
||||
# Modifie le domaine pour qu'il passe dans une regex
|
||||
domain_regex=$(echo "$domain" | sed 's@-@.@g')
|
||||
|
||||
# Copy files to right place
|
||||
final_path=/var/www/$app
|
||||
# Décompresse la source
|
||||
|
@ -49,7 +54,7 @@ sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/cron.d/$app
|
|||
sudo yunohost app setting $app skipped_uris -v "/"
|
||||
if [ "$is_public" = "No" ];
|
||||
then # Si l'app est privée, seul le visionnage des images reste public
|
||||
sudo yunohost app setting $app protected_regex -v "$path/stats$","$path/manifest.webapp$","$path/$","$path/d/.*$","$path/m/.*$"
|
||||
sudo yunohost app setting $app protected_regex -v "$domain_regex$pathRslash/stats$","$domain_regex$pathRslash/manifest.webapp$","$domain_regex$pathRslash/$","$domain_regex$pathRslash/d/.*$","$domain_regex$pathRslash/m/.*$"
|
||||
fi
|
||||
|
||||
# Set right permissions
|
||||
|
|
Loading…
Reference in a new issue