mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
[enh] Use ynh_replace_string instead of sed in upgrade
This commit is contained in:
parent
8030e7a9b3
commit
ed3c73348b
1 changed files with 4 additions and 4 deletions
|
@ -137,11 +137,11 @@ fi
|
|||
|
||||
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
|
||||
if [ $path_url = "/" ]; then
|
||||
sed -i "s@__LOCATION_HACK__@@g" ../conf/nginx.conf
|
||||
sed -i "s@__PATH_HACK__@/@g" ../conf/nginx.conf
|
||||
ynh_replace_string "__LOCATION_HACK__" "" "../conf/nginx.conf"
|
||||
ynh_replace_string "__PATH_HACK__" "/" "../conf/nginx.conf"
|
||||
else
|
||||
sed -i "s@__LOCATION_HACK__@$path_url@g" ../conf/nginx.conf
|
||||
sed -i "s@__PATH_HACK__@$path_url$path_url@g" ../conf/nginx.conf
|
||||
ynh_replace_string "__LOCATION_HACK__" "$path_url" "../conf/nginx.conf"
|
||||
ynh_replace_string "__PATH_HACK__" "$path_url$path_url" "../conf/nginx.conf"
|
||||
fi
|
||||
|
||||
# Create a dedicated nginx config
|
||||
|
|
Loading…
Reference in a new issue