mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
Update install
This commit is contained in:
parent
a2d03ca5fa
commit
449c83c3f3
1 changed files with 8 additions and 4 deletions
|
@ -15,8 +15,12 @@ if [[ ! $? -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Vérifie la présence du / en début de path
|
||||||
|
if [ $(echo $path | cut -c1) != "/" ]; then
|
||||||
|
path="/$path"
|
||||||
|
fi
|
||||||
# Vérifie l'absence du / en fin de path
|
# Vérifie l'absence du / en fin de path
|
||||||
path=$(echo "$path" | sed 's@/$@@')
|
pathRslash=$(echo "$path" | sed 's@/$@@')
|
||||||
|
|
||||||
# Check domain/path availability
|
# Check domain/path availability
|
||||||
sudo yunohost app checkurl $domain$path -a $app
|
sudo yunohost app checkurl $domain$path -a $app
|
||||||
|
@ -68,7 +72,7 @@ sudo apt-get install perlmagick -qy
|
||||||
## Copie et configuration du fichier de conf.
|
## Copie et configuration du fichier de conf.
|
||||||
sudo cp ../conf/lutim.conf.template "$final_path/lutim.conf"
|
sudo cp ../conf/lutim.conf.template "$final_path/lutim.conf"
|
||||||
sudo sed -i "s@__DOMAIN__@$domain@g" "$final_path/lutim.conf"
|
sudo sed -i "s@__DOMAIN__@$domain@g" "$final_path/lutim.conf"
|
||||||
sudo sed -i "s@__PATH__@$path@g" "$final_path/lutim.conf"
|
sudo sed -i "s@__PATH__@$pathRslash@g" "$final_path/lutim.conf"
|
||||||
sudo sed -i "s@__PORT__@$port@g" "$final_path/lutim.conf"
|
sudo sed -i "s@__PORT__@$port@g" "$final_path/lutim.conf"
|
||||||
if [ "$always_encrypt" = "No" ]; then
|
if [ "$always_encrypt" = "No" ]; then
|
||||||
always_encrypt=0
|
always_encrypt=0
|
||||||
|
@ -101,14 +105,14 @@ sudo update-rc.d lutim defaults
|
||||||
# sudo update-rc.d -f lutim remove
|
# sudo update-rc.d -f lutim remove
|
||||||
|
|
||||||
# Change variables in nginx configuration
|
# Change variables in nginx configuration
|
||||||
sudo sed -i "s@__PATH__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo sed -i "s@__PATH__@$pathRslash@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sudo sed -i "s@__PORT__@$port@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo sed -i "s@__PORT__@$port@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
# Make app public or private
|
# Make app public or private
|
||||||
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 "$pathRslash/stats$","$pathRslash/manifest.webapp$","$pathRslash/$","$pathRslash/d/.*$","$pathRslash/m/.*$"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Making log symbolic link to /var/log
|
# Making log symbolic link to /var/log
|
||||||
|
|
Loading…
Reference in a new issue