Removing 'trimed' stuff

This commit is contained in:
Alexandre Aubin 2017-03-29 16:52:08 -04:00
parent ddce191fdb
commit adbf1b741d

View file

@ -6,18 +6,15 @@ number=$YNH_APP_INSTANCE_NUMBER
# Retrieve arguments
old_domain=$YNH_APP_OLD_DOMAIN
old_path=$YNH_APP_OLD_PATH
old_path_trimed=$YNH_APP_OLD_PATH_TRIMED
new_domain=$YNH_APP_NEW_DOMAIN
new_path=$YNH_APP_NEW_PATH
new_path_trimed=$YNH_APP_NEW_PATH_TRIMED
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
if [[ "$new_path" == "" ]]; then
sudo sed -i "s@location .\+ {@location / {@g" $nginx_conf_path
else
sudo sed -i "s@location .\+ {@location $new_path_trimed {@g" $nginx_conf_path
sudo sed -i "s@location .\+ {@location $new_path {@g" $nginx_conf_path
fi
if [ $old_domain != $new_domain ]; then