mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
do not change the nginx template conf, replace #sub_path_only and #root_path_only after ynh_add_config, otherwise it breaks the change_url script
This commit is contained in:
parent
ee29d2e476
commit
30e926f92c
1 changed files with 5 additions and 3 deletions
|
@ -20,13 +20,15 @@ ynh_add_nginx_config() {
|
||||||
|
|
||||||
local finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf"
|
local finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
ynh_add_config --template="$YNH_APP_BASEDIR/conf/nginx.conf" --destination="$finalnginxconf"
|
||||||
|
|
||||||
if [ "${path_url:-}" != "/" ]; then
|
if [ "${path_url:-}" != "/" ]; then
|
||||||
ynh_replace_string --match_string="^#sub_path_only" --replace_string="" --target_file="$YNH_APP_BASEDIR/conf/nginx.conf"
|
ynh_replace_string --match_string="^#sub_path_only" --replace_string="" --target_file="$finalnginxconf"
|
||||||
else
|
else
|
||||||
ynh_replace_string --match_string="^#root_path_only" --replace_string="" --target_file="$YNH_APP_BASEDIR/conf/nginx.conf"
|
ynh_replace_string --match_string="^#root_path_only" --replace_string="" --target_file="$finalnginxconf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_add_config --template="$YNH_APP_BASEDIR/conf/nginx.conf" --destination="$finalnginxconf"
|
ynh_store_file_checksum --file="$finalnginxconf"
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue