remove nginx config if it is not used

This commit is contained in:
Serghey Rodin 2013-10-23 21:25:52 +03:00
commit 0157c7ff5b

View file

@ -111,6 +111,10 @@ else
if [ -z "$proxy_include" ]; then
echo "include $conf;" >> $proxy_conf
fi
else
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
fi
# Checking SSL proxy
@ -122,6 +126,11 @@ else
if [ -z "$proxy_include" ]; then
echo "include $conf;" >> $proxy_conf
fi
else
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
fi
fi