fixed ip addres assigment

This commit is contained in:
Serghey Rodin 2012-01-19 15:27:50 +02:00
commit f2d10e286b

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# info: update system ip # info: update system ip
# options: [owner] [ip_status] # options: [user] [ip_status]
# #
# The function scans configured ip in the system and register them with vesta # The function scans configured ip in the system and register them with vesta
# internal database. This call is intended for use on vps servers, where ip is # internal database. This call is intended for use on vps servers, where ip is
@ -12,7 +12,7 @@
#----------------------------------------------------------# #----------------------------------------------------------#
# Argument defenition # Argument defenition
owner=${1-vesta} user=${1-vesta}
ip_status=${2-shared} ip_status=${2-shared}
# Importing variables # Importing variables
@ -28,12 +28,12 @@ source $V_FUNC/domain.func
#----------------------------------------------------------# #----------------------------------------------------------#
# Checking arg number # Checking arg number
check_args '0' "$#" '[owner] [ip_status]' check_args '0' "$#" '[user] [ip_status]'
# Checking owner # Checking user
if [ ! -z "$1" ]; then if [ ! -z "$1" ]; then
format_validation 'owner' format_validation 'user'
is_user_valid "$owner" is_user_valid "$user"
fi fi
# Checking ip_status # Checking ip_status
@ -92,10 +92,7 @@ done
#----------------------------------------------------------# #----------------------------------------------------------#
# Updating user conf # Updating user conf
if [ ! -z "$owner" ]; then increase_user_value "$user" '$IP_OWNED'
user="$owner"
increase_user_value "$user" '$IP_OWNED'
fi
# Adding task to the vesta pipe # Adding task to the vesta pipe
if [ "$web_restart" = 'yes' ]; then if [ "$web_restart" = 'yes' ]; then