1
0
Fork 0
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:
Maniack Crudelis 2015-03-27 23:26:10 +01:00
parent 2f8a1f4714
commit e3a8b64a79

View file

@ -9,6 +9,11 @@ is_public=$(sudo yunohost app setting $app is_public)
port=$(sudo yunohost app setting $app port) port=$(sudo yunohost app setting $app port)
always_encrypt=$(sudo yunohost app setting $app always_encrypt) 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 # Copy files to right place
final_path=/var/www/$app final_path=/var/www/$app
# Décompresse la source # 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 "/" sudo yunohost app setting $app skipped_uris -v "/"
if [ "$is_public" = "No" ]; if [ "$is_public" = "No" ];
then # Si l'app est privée, seul le visionnage des images reste public 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 fi
# Set right permissions # Set right permissions