Skip to content

Commit ae754f9

Browse files
committed
Make sure awstats symlink points to the correct config file
Fixes hestiacp#596
1 parent 0aed60f commit ae754f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

func/rebuild.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,11 @@ rebuild_web_domain_conf() {
278278
-e "s|%alias_idn%|${aliases_idn//,/ }|g" \
279279
> $HOMEDIR/$user/conf/web/$domain/$STATS.conf
280280
if [ "$STATS" == 'awstats' ]; then
281-
if [ ! -e "/etc/awstats/$STATS.$domain_idn.conf" ]; then
282-
ln -f -s $HOMEDIR/$user/conf/web/$domain/$STATS.conf \
283-
/etc/awstats/$STATS.$domain_idn.conf
281+
if [ -e "/etc/awstats/$STATS.$domain_idn.conf" ]; then
282+
rm -f "/etc/awstats/$STATS.$domain_idn.conf"
284283
fi
284+
ln -f -s $HOMEDIR/$user/conf/web/$domain/$STATS.conf \
285+
/etc/awstats/$STATS.$domain_idn.conf
285286
fi
286287

287288
webstats="$BIN/v-update-web-domain-stat $user $domain"

0 commit comments

Comments
 (0)