Fix #1631. Add --follow-symlinks to sed in (add|del)-alias.

This commit is contained in:
Victor LABORIE 2015-08-28 12:29:26 +02:00
parent 738932510f
commit 63a2f16b27
1 changed files with 2 additions and 2 deletions

View File

@ -439,7 +439,7 @@ op_aliasadd() {
vhost=$1
alias=$2
[ -f $VHOST_PATH/$vhost ] && sed -i -e "s/\(ServerName .*\)/\1\n\tServerAlias $alias/" $VHOST_PATH/$vhost
[ -f $VHOST_PATH/$vhost ] && sed -i -e "s/\(ServerName .*\)/\1\n\tServerAlias $alias/" $VHOST_PATH/$vhost --follow-symlinks
apache2ctl configtest 2>/dev/null
/etc/init.d/apache2 force-reload >/dev/null
@ -453,7 +453,7 @@ op_aliasdel() {
vhost=$1
alias=$2
[ -f $VHOST_PATH/$vhost ] && sed -i -e "/ServerAlias $alias/d" $VHOST_PATH/$vhost
[ -f $VHOST_PATH/$vhost ] && sed -i -e "/ServerAlias $alias/d" $VHOST_PATH/$vhost --follow-symlinks
apache2ctl configtest 2>/dev/null
/etc/init.d/apache2 force-reload >/dev/null