From a63c3e2bb55fba5150d4826d5090334d29914246 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 15 Jan 2013 15:29:08 +0200 Subject: [PATCH] empty stats file (related to #59) --- bin/v-list-user-stats | 3 +++ bin/v-list-users-stats | 3 +++ install/vst-install.sh | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/v-list-user-stats b/bin/v-list-user-stats index b93fa50b3..8126fa2ea 100755 --- a/bin/v-list-user-stats +++ b/bin/v-list-user-stats @@ -32,6 +32,9 @@ is_object_valid 'user' 'USER' "$user" # Defining config conf=$USER_DATA/stats.log +if [ ! -e "$conf" ]; then + touch $conf +fi # Defining fileds to select fields="\$DATE \$TIME \$PACKAGE \$IP_OWNED \$DISK_QUOTA \$U_DISK \$U_DISK_DIRS" diff --git a/bin/v-list-users-stats b/bin/v-list-users-stats index 8b9af2a89..5416da7b8 100755 --- a/bin/v-list-users-stats +++ b/bin/v-list-users-stats @@ -29,6 +29,9 @@ check_args '0' "$#" '[FORMAT]' # Defining config conf=$VESTA/data/users/admin/overall_stats.log +if [ ! -e "$conf" ]; then + touch $conf +fi # Defining fileds to select fields="\$DATE \$TIME \$PACKAGE \$IP_OWNED \$DISK_QUOTA \$U_DISK \$U_DISK_DIRS" diff --git a/install/vst-install.sh b/install/vst-install.sh index 7b5cf1764..f8e8c0e93 100644 --- a/install/vst-install.sh +++ b/install/vst-install.sh @@ -548,7 +548,7 @@ $VESTA/bin/v-add-cron-job 'admin' '*/30' '*' '*' '*' '*' "$command" command='sudo /usr/local/vesta/bin/v-backup-users' $VESTA/bin/v-add-cron-job 'admin' '10' '05' '*' '*' '*' "$command" command='sudo /usr/local/vesta/bin/v-update-user-stats' -$VESTA/bin/v-add-cron-job 'admin' '20' '00' '01' '*' '*' "$command" +$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command" command='sudo /usr/local/vesta/bin/v-update-sys-rrd' $VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"