Просмотр исходного кода

changed main username from vesta to admin

Serghey Rodin 14 лет назад
Родитель
Сommit
b9c9170f69

+ 1 - 1
bin/v_add_sys_ip

@@ -18,7 +18,7 @@
 ip=$1
 ip=$1
 mask=$2
 mask=$2
 interface="${3-eth0}"
 interface="${3-eth0}"
-user="${4-vesta}"
+user="${4-admin}"
 ip_status="${5-shared}"
 ip_status="${5-shared}"
 ip_name=$6
 ip_name=$6
 
 

+ 3 - 3
bin/v_backup_user

@@ -89,9 +89,9 @@ echo -e "$(date "+%F %T") user.conf"
 
 
 cp -r $V_USERS/$user/user.conf $tmpdir/vesta/
 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
 fi
 
 
 if [ -e "$V_USERS/$user/history.log" ]; then
 if [ -e "$V_USERS/$user/history.log" ]; then

+ 2 - 2
bin/v_delete_user

@@ -38,8 +38,8 @@ is_user_valid
 # Checking user is active
 # Checking user is active
 is_user_suspended
 is_user_suspended
 
 
-# Checking user vesta
-if [ "$user" = 'vesta' ]; then
+# Checking user admin
+if [ "$user" = 'admin' ]; then
     exit
     exit
 fi
 fi
 
 

+ 2 - 2
bin/v_delete_user_ips

@@ -36,7 +36,7 @@ is_user_valid
 is_user_suspended
 is_user_suspended
 
 
 # Checking user vesta
 # Checking user vesta
-if [ "$user" = 'vesta' ]; then
+if [ "$user" = 'admin' ]; then
     exit
     exit
 fi
 fi
 
 
@@ -55,7 +55,7 @@ for ip in $ip_list; do
     is_ip_key_empty '$U_SYS_USERS'
     is_ip_key_empty '$U_SYS_USERS'
 
 
     # Assig ip to main account
     # Assig ip to main account
-    update_sys_ip_value '$OWNER' 'vesta'
+    update_sys_ip_value '$OWNER' 'admin'
     update_sys_ip_value '$STATUS' 'exclusive'
     update_sys_ip_value '$STATUS' 'exclusive'
 
 
 done
 done

+ 2 - 2
bin/v_list_user_ips

@@ -23,7 +23,7 @@ json_list_user_ips() {
     echo '{'
     echo '{'
 
 
     owned_ips=$(grep -l "OWNER='$user'" $V_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'"|\
                     grep "STATUS='shared'"|\
                     cut -f 1 -d - )
                     cut -f 1 -d - )
 
 
@@ -75,7 +75,7 @@ json_list_user_ips() {
 # Shell function
 # Shell function
 shell_list_user_ips() {
 shell_list_user_ips() {
     owned_ips=$(grep -l "OWNER='$user'" $V_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'"|\
                     grep "STATUS='shared'"|\
                     cut -f 1 -d - )
                     cut -f 1 -d - )
 
 

+ 2 - 2
bin/v_suspend_user

@@ -34,8 +34,8 @@ is_user_valid
 # Checking user status
 # Checking user status
 is_user_suspended
 is_user_suspended
 
 
-# Checking user vesta
-if [ "$user" = 'vesta' ]; then
+# Checking user admin
+if [ "$user" = 'admin' ]; then
     exit
     exit
 fi
 fi
 
 

+ 2 - 2
bin/v_unsuspend_user

@@ -31,8 +31,8 @@ format_validation 'user'
 # Checking user
 # Checking user
 is_user_valid
 is_user_valid
 
 
-# Checking user vesta
-if [ "$user" = 'vesta' ]; then
+# Checking user admin
+if [ "$user" = 'admin' ]; then
     exit
     exit
 fi
 fi
 
 

+ 1 - 1
bin/v_update_sys_ip

@@ -12,7 +12,7 @@
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Argument defenition
 # Argument defenition
-user=${1-vesta}
+user=${1-admin}
 ip_status=${2-shared}
 ip_status=${2-shared}
 
 
 # Importing variables
 # Importing variables

+ 1 - 1
bin/v_update_user_counters

@@ -82,7 +82,7 @@ for user in $user_list; do
     IFS=$'\n'
     IFS=$'\n'
 
 
     # Checking users
     # Checking users
-    if [ "$user" = 'vesta' ]; then
+    if [ "$user" = 'admin' ]; then
         SUSPENDED_USERS=$(grep "SUSPENDED='yes'" $V_USERS/*/user.conf|wc -l)
         SUSPENDED_USERS=$(grep "SUSPENDED='yes'" $V_USERS/*/user.conf|wc -l)
         U_USERS=$(ls $V_USERS/|wc -l)
         U_USERS=$(ls $V_USERS/|wc -l)
         U_USERS=$((U_USERS - 1))
         U_USERS=$((U_USERS - 1))

+ 1 - 1
func/ip.func

@@ -102,7 +102,7 @@ is_ip_avalable() {
     ip_status=$(echo "$ip_data" | grep 'STATUS=' | cut -f 2 -d \' )
     ip_status=$(echo "$ip_data" | grep 'STATUS=' | cut -f 2 -d \' )
 
 
     # Parsing user data
     # Parsing user data
-    if [ 'vesta' = "$ip_owner" ] && [ "$ip_status" = 'shared' ]; then
+    if [ 'admin' = "$ip_owner" ] && [ "$ip_status" = 'shared' ]; then
         ip_shared='yes'
         ip_shared='yes'
     else
     else
         ip_shared='no'
         ip_shared='no'

+ 1 - 1
func/shared.func

@@ -153,7 +153,7 @@ format_validation() {
         if [ -z "$check_at" ] ||\
         if [ -z "$check_at" ] ||\
            [ -z "$check_dt" ] ||\
            [ -z "$check_dt" ] ||\
            [ "${#check_dt}" -lt 2 ] &&\
            [ "${#check_dt}" -lt 2 ] &&\
-           [ "$val" != 'vesta@localhost' ]; then
+           [ "$val" != 'admin@localhost' ]; then
             echo "Error: email format is wrong"
             echo "Error: email format is wrong"
             log_event 'debug' "$E_INVALID $V_EVENT"
             log_event 'debug' "$E_INVALID $V_EVENT"
             exit $E_INVALID
             exit $E_INVALID