Skip to content

Commit 42b8ac3

Browse files
committed
trigger firewall update on ip functions
1 parent ebe8173 commit 42b8ac3

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

bin/v-add-sys-ip

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,23 @@ else
159159
increase_user_value 'admin' '$IP_AVAIL'
160160
fi
161161

162-
# Restart web server
162+
# Restarting web server
163163
$BIN/v-restart-web
164164
if [ $? -ne 0 ]; then
165165
exit $E_RESTART
166166
fi
167-
$BIN/v-restart-proxy
168-
if [ $? -ne 0 ]; then
169-
exit $E_RESTART
167+
168+
# Restarting proxy server
169+
if [ ! -z "$PROXY_SYSTEM" ]; then
170+
$BIN/v-restart-proxy
171+
if [ $? -ne 0 ]; then
172+
exit $E_RESTART
173+
fi
174+
fi
175+
176+
# Restarting firewall
177+
if [ ! -z "$FIREWALL_SYSTEM" ];
178+
$BIN/v-update-firewall
170179
fi
171180

172181
# Logging

bin/v-delete-sys-ip

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,23 @@ else
121121
decrease_user_value "$OWNER" '$IP_AVAIL'
122122
fi
123123

124-
# Adding task to the vesta pipe
124+
# Restarting web server
125125
$BIN/v-restart-web
126126
if [ $? -ne 0 ]; then
127127
exit $E_RESTART
128128
fi
129129

130-
$BIN/v-restart-proxy
131-
if [ $? -ne 0 ]; then
132-
exit $E_RESTART
130+
# Restarting proxy server
131+
if [ ! -z "$PROXY_SYSTEM" ]; then
132+
$BIN/v-restart-proxy
133+
if [ $? -ne 0 ]; then
134+
exit $E_RESTART
135+
fi
136+
fi
137+
138+
# Restarting firewall
139+
if [ ! -z "$FIREWALL_SYSTEM" ];
140+
$BIN/v-update-firewall
133141
fi
134142

135143
# Logging

bin/v-update-sys-ip

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,19 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
6565
$BIN/v-rebuild-web-domains $user no
6666
done
6767
fi
68+
69+
# Restarting web server
6870
$BIN/v-restart-web
69-
$BIN/v-restart-proxy
71+
72+
# Restarting proxy server
73+
if [ ! -z "$PROXY_SYSTEM" ]; then
74+
$BIN/v-restart-proxy
75+
fi
76+
77+
# Restarting firewall
78+
if [ ! -z "$FIREWALL_SYSTEM" ];
79+
$BIN/v-update-firewall
80+
fi
7081

7182
if [ ! -z "$DNS_SYSTEM" ]; then
7283
# Rebuild dns domains
@@ -98,7 +109,6 @@ for ip in $ip_list; do
98109
done
99110

100111

101-
102112
#----------------------------------------------------------#
103113
# Vesta #
104114
#----------------------------------------------------------#

0 commit comments

Comments
 (0)