Skip to content

Commit f2d10e2

Browse files
committed
fixed ip addres assigment
1 parent 8f5b68b commit f2d10e2

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

bin/v_update_sys_ip

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# info: update system ip
3-
# options: [owner] [ip_status]
3+
# options: [user] [ip_status]
44
#
55
# The function scans configured ip in the system and register them with vesta
66
# internal database. This call is intended for use on vps servers, where ip is
@@ -12,7 +12,7 @@
1212
#----------------------------------------------------------#
1313

1414
# Argument defenition
15-
owner=${1-vesta}
15+
user=${1-vesta}
1616
ip_status=${2-shared}
1717

1818
# Importing variables
@@ -28,12 +28,12 @@ source $V_FUNC/domain.func
2828
#----------------------------------------------------------#
2929

3030
# Checking arg number
31-
check_args '0' "$#" '[owner] [ip_status]'
31+
check_args '0' "$#" '[user] [ip_status]'
3232

33-
# Checking owner
33+
# Checking user
3434
if [ ! -z "$1" ]; then
35-
format_validation 'owner'
36-
is_user_valid "$owner"
35+
format_validation 'user'
36+
is_user_valid "$user"
3737
fi
3838

3939
# Checking ip_status
@@ -92,10 +92,7 @@ done
9292
#----------------------------------------------------------#
9393

9494
# Updating user conf
95-
if [ ! -z "$owner" ]; then
96-
user="$owner"
97-
increase_user_value "$user" '$IP_OWNED'
98-
fi
95+
increase_user_value "$user" '$IP_OWNED'
9996

10097
# Adding task to the vesta pipe
10198
if [ "$web_restart" = 'yes' ]; then

0 commit comments

Comments
 (0)