changed main username from vesta to admin

This commit is contained in:
Serghey Rodin 2012-02-18 22:12:16 +02:00
commit b9c9170f69
11 changed files with 18 additions and 18 deletions

View file

@ -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

View file

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

View file

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

View file

@ -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

View file

@ -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 - )

View file

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

View file

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

View file

@ -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

View file

@ -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))

View file

@ -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'

View file

@ -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