mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
Correction bug dans upgrade
This commit is contained in:
parent
91f0aecc8f
commit
3b07fd242d
1 changed files with 12 additions and 8 deletions
|
@ -33,16 +33,20 @@ db_name=$app
|
|||
CHECK_MD5_CONFIG "connect.php" "$final_path/config/connect.php" # Created a backup of the config file if it was changed.
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
sed -i "s@__PATHTOCHANGE__@$app@g" ../conf/nginx.conf*
|
||||
sed -i "s@__FINALPATH__@$final_path/@g" ../conf/nginx.conf*
|
||||
sudo sed -i "s@__PATHTOCHANGE__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
sudo sed -i "s@__NAMETOCHANGE__@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
||||
# If app is public, add url to SSOWat conf as skipped_uris
|
||||
if [ $is_public = "Yes" ];
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
else
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
sudo sed -i "s@#--PRIVATE--@@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
fi
|
||||
|
||||
# Setup SSOwat
|
||||
ynh_app_setting_set "$app" is_public "$is_public"
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
||||
fi
|
||||
|
||||
# Reload Nginx
|
||||
|
|
Loading…
Add table
Reference in a new issue