Przeglądaj źródła

Stop writing unnecessary data to stdout when rebuilding web domains

Reported in #793
Robert Zollner 5 lat temu
rodzic
commit
b96db11b1e
1 zmienionych plików z 7 dodań i 7 usunięć
  1. 7 7
      func/rebuild.sh

+ 7 - 7
func/rebuild.sh

@@ -298,15 +298,15 @@ rebuild_web_domain_conf() {
         if [ ! -z "$STATS_USER" ]; then
             stats_dir="$HOMEDIR/$user/web/$domain/stats"
             if [ "$WEB_SYSTEM" = 'nginx' ]; then
-                echo "auth_basic \"Web Statistics\";"               |user_exec tee    $stats_dir/auth.conf
-                echo "auth_basic_user_file $stats_dir/.htpasswd;"   |user_exec tee -a $stats_dir/auth.conf
+                echo "auth_basic \"Web Statistics\";"               |user_exec tee    $stats_dir/auth.conf > /dev/null
+                echo "auth_basic_user_file $stats_dir/.htpasswd;"   |user_exec tee -a $stats_dir/auth.conf > /dev/null
             else
-                echo "AuthUserFile $stats_dir/.htpasswd"    |user_exec tee    $stats_dir/.htaccess
-                echo "AuthName \"Web Statistics\""          |user_exec tee -a $stats_dir/.htaccess
-                echo "AuthType Basic"                       |user_exec tee -a $stats_dir/.htaccess
-                echo "Require valid-user"                   |user_exec tee -a $stats_dir/.htaccess
+                echo "AuthUserFile $stats_dir/.htpasswd"    |user_exec tee    $stats_dir/.htaccess > /dev/null
+                echo "AuthName \"Web Statistics\""          |user_exec tee -a $stats_dir/.htaccess > /dev/null
+                echo "AuthType Basic"                       |user_exec tee -a $stats_dir/.htaccess > /dev/null
+                echo "Require valid-user"                   |user_exec tee -a $stats_dir/.htaccess > /dev/null
             fi
-            echo "$STATS_USER:$STATS_CRYPT" |user_exec tee $stats_dir/.htpasswd
+            echo "$STATS_USER:$STATS_CRYPT" |user_exec tee $stats_dir/.htpasswd > /dev/null
         fi
     fi