diff --git a/bin/v_add_sys_ip b/bin/v_add_sys_ip index b92b9eef1..b80c412d4 100755 --- a/bin/v_add_sys_ip +++ b/bin/v_add_sys_ip @@ -18,7 +18,7 @@ ip=$1 mask=$2 interface="${3-eth0}" -user="${4-vesta}" +user="${4-admin}" ip_status="${5-shared}" ip_name=$6 diff --git a/bin/v_backup_user b/bin/v_backup_user index f3a79edaa..26c80fde0 100755 --- a/bin/v_backup_user +++ b/bin/v_backup_user @@ -89,9 +89,9 @@ echo -e "$(date "+%F %T") user.conf" cp -r $V_USERS/$user/user.conf $tmpdir/vesta/ -if [ -e "$V_USERS/$user/billing.log" ]; then - echo -e "$(date "+%F %T") billing.log" - cp -r $V_USERS/$user/billing.log $tmpdir/vesta/ +if [ -e "$V_USERS/$user/stats.log" ]; then + echo -e "$(date "+%F %T") stats.log" + cp -r $V_USERS/$user/stats.log $tmpdir/vesta/ fi if [ -e "$V_USERS/$user/history.log" ]; then diff --git a/bin/v_delete_user b/bin/v_delete_user index cc17cf76b..6c1623b7a 100755 --- a/bin/v_delete_user +++ b/bin/v_delete_user @@ -38,8 +38,8 @@ is_user_valid # Checking user is active is_user_suspended -# Checking user vesta -if [ "$user" = 'vesta' ]; then +# Checking user admin +if [ "$user" = 'admin' ]; then exit fi diff --git a/bin/v_delete_user_ips b/bin/v_delete_user_ips index 9edfca041..7643435ea 100755 --- a/bin/v_delete_user_ips +++ b/bin/v_delete_user_ips @@ -36,7 +36,7 @@ is_user_valid is_user_suspended # Checking user vesta -if [ "$user" = 'vesta' ]; then +if [ "$user" = 'admin' ]; then exit fi @@ -55,7 +55,7 @@ for ip in $ip_list; do is_ip_key_empty '$U_SYS_USERS' # Assig ip to main account - update_sys_ip_value '$OWNER' 'vesta' + update_sys_ip_value '$OWNER' 'admin' update_sys_ip_value '$STATUS' 'exclusive' done diff --git a/bin/v_list_user_ips b/bin/v_list_user_ips index 08e0d79d8..205e1b24b 100755 --- a/bin/v_list_user_ips +++ b/bin/v_list_user_ips @@ -23,7 +23,7 @@ json_list_user_ips() { echo '{' owned_ips=$(grep -l "OWNER='$user'" $V_IPS/*) - shared_ips=$(grep -H -A5 "OWNER='vesta'" $V_IPS/* |\ + shared_ips=$(grep -H -A5 "OWNER='admin'" $V_IPS/* |\ grep "STATUS='shared'"|\ cut -f 1 -d - ) @@ -75,7 +75,7 @@ json_list_user_ips() { # Shell function shell_list_user_ips() { owned_ips=$(grep -l "OWNER='$user'" $V_IPS/*) - shared_ips=$(grep -H -A5 "OWNER='vesta'" $V_IPS/* |\ + shared_ips=$(grep -H -A5 "OWNER='admin'" $V_IPS/* |\ grep "STATUS='shared'"|\ cut -f 1 -d - ) diff --git a/bin/v_suspend_user b/bin/v_suspend_user index 475de314f..e1251e597 100755 --- a/bin/v_suspend_user +++ b/bin/v_suspend_user @@ -34,8 +34,8 @@ is_user_valid # Checking user status is_user_suspended -# Checking user vesta -if [ "$user" = 'vesta' ]; then +# Checking user admin +if [ "$user" = 'admin' ]; then exit fi diff --git a/bin/v_unsuspend_user b/bin/v_unsuspend_user index a37aee177..62eb49817 100755 --- a/bin/v_unsuspend_user +++ b/bin/v_unsuspend_user @@ -31,8 +31,8 @@ format_validation 'user' # Checking user is_user_valid -# Checking user vesta -if [ "$user" = 'vesta' ]; then +# Checking user admin +if [ "$user" = 'admin' ]; then exit fi diff --git a/bin/v_update_sys_ip b/bin/v_update_sys_ip index 0877b4456..d92808b43 100755 --- a/bin/v_update_sys_ip +++ b/bin/v_update_sys_ip @@ -12,7 +12,7 @@ #----------------------------------------------------------# # Argument defenition -user=${1-vesta} +user=${1-admin} ip_status=${2-shared} # Importing variables diff --git a/bin/v_update_user_counters b/bin/v_update_user_counters index f68e37561..443618fa4 100755 --- a/bin/v_update_user_counters +++ b/bin/v_update_user_counters @@ -82,7 +82,7 @@ for user in $user_list; do IFS=$'\n' # Checking users - if [ "$user" = 'vesta' ]; then + if [ "$user" = 'admin' ]; then SUSPENDED_USERS=$(grep "SUSPENDED='yes'" $V_USERS/*/user.conf|wc -l) U_USERS=$(ls $V_USERS/|wc -l) U_USERS=$((U_USERS - 1)) diff --git a/func/ip.func b/func/ip.func index 0df59e154..622f5d36e 100644 --- a/func/ip.func +++ b/func/ip.func @@ -102,7 +102,7 @@ is_ip_avalable() { ip_status=$(echo "$ip_data" | grep 'STATUS=' | cut -f 2 -d \' ) # Parsing user data - if [ 'vesta' = "$ip_owner" ] && [ "$ip_status" = 'shared' ]; then + if [ 'admin' = "$ip_owner" ] && [ "$ip_status" = 'shared' ]; then ip_shared='yes' else ip_shared='no' diff --git a/func/shared.func b/func/shared.func index f5eec2713..db55be4ca 100644 --- a/func/shared.func +++ b/func/shared.func @@ -153,7 +153,7 @@ format_validation() { if [ -z "$check_at" ] ||\ [ -z "$check_dt" ] ||\ [ "${#check_dt}" -lt 2 ] &&\ - [ "$val" != 'vesta@localhost' ]; then + [ "$val" != 'admin@localhost' ]; then echo "Error: email format is wrong" log_event 'debug' "$E_INVALID $V_EVENT" exit $E_INVALID