Skip to content

Commit b96db11

Browse files
committed
Stop writing unnecessary data to stdout when rebuilding web domains
Reported in hestiacp#793
1 parent 080f489 commit b96db11

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

func/rebuild.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,15 @@ rebuild_web_domain_conf() {
298298
if [ ! -z "$STATS_USER" ]; then
299299
stats_dir="$HOMEDIR/$user/web/$domain/stats"
300300
if [ "$WEB_SYSTEM" = 'nginx' ]; then
301-
echo "auth_basic \"Web Statistics\";" |user_exec tee $stats_dir/auth.conf
302-
echo "auth_basic_user_file $stats_dir/.htpasswd;" |user_exec tee -a $stats_dir/auth.conf
301+
echo "auth_basic \"Web Statistics\";" |user_exec tee $stats_dir/auth.conf > /dev/null
302+
echo "auth_basic_user_file $stats_dir/.htpasswd;" |user_exec tee -a $stats_dir/auth.conf > /dev/null
303303
else
304-
echo "AuthUserFile $stats_dir/.htpasswd" |user_exec tee $stats_dir/.htaccess
305-
echo "AuthName \"Web Statistics\"" |user_exec tee -a $stats_dir/.htaccess
306-
echo "AuthType Basic" |user_exec tee -a $stats_dir/.htaccess
307-
echo "Require valid-user" |user_exec tee -a $stats_dir/.htaccess
304+
echo "AuthUserFile $stats_dir/.htpasswd" |user_exec tee $stats_dir/.htaccess > /dev/null
305+
echo "AuthName \"Web Statistics\"" |user_exec tee -a $stats_dir/.htaccess > /dev/null
306+
echo "AuthType Basic" |user_exec tee -a $stats_dir/.htaccess > /dev/null
307+
echo "Require valid-user" |user_exec tee -a $stats_dir/.htaccess > /dev/null
308308
fi
309-
echo "$STATS_USER:$STATS_CRYPT" |user_exec tee $stats_dir/.htpasswd
309+
echo "$STATS_USER:$STATS_CRYPT" |user_exec tee $stats_dir/.htpasswd > /dev/null
310310
fi
311311
fi
312312

0 commit comments

Comments
 (0)