From bd7ee8238cbee6157227d4aa9b8c532a04b35aca Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 24 Aug 2011 09:25:28 +0300 Subject: [PATCH] backup for all users --- bin/v_backup_sys_users | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 bin/v_backup_sys_users diff --git a/bin/v_backup_sys_users b/bin/v_backup_sys_users new file mode 100755 index 000000000..24f58f673 --- /dev/null +++ b/bin/v_backup_sys_users @@ -0,0 +1,36 @@ +#!/bin/bash +# info: updating montly billing user report + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + + +# Importing system enviroment as we run this script +# mostly by cron wich not read it by itself +source /etc/profile.d/vesta.sh + +# Importing variables +source $VESTA/conf/vars.conf +source $V_FUNC/shared_func.sh + + +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + +user_list=$(ls $V_USERS/) + +# Updating user billing +for user in $user_list; do + $V_BIN/v_backup_sys_user $user >> $V_LOG/backup.log 2>> $V_LOG/backup.log +done + +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event 'system' "$V_EVENT" + +exit $OK