mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
changed main username from vesta to admin
This commit is contained in:
parent
64def78645
commit
b9c9170f69
11 changed files with 18 additions and 18 deletions
|
@ -18,7 +18,7 @@
|
|||
ip=$1
|
||||
mask=$2
|
||||
interface="${3-eth0}"
|
||||
user="${4-vesta}"
|
||||
user="${4-admin}"
|
||||
ip_status="${5-shared}"
|
||||
ip_name=$6
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 - )
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=${1-vesta}
|
||||
user=${1-admin}
|
||||
ip_status=${2-shared}
|
||||
|
||||
# Importing variables
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue