DEV-5029: Remove iptable and firewall reference from script. #4
33
migrate
33
migrate
@ -186,25 +186,10 @@ function check_source() {
|
||||
|
||||
# Make sure the target host can access this one
|
||||
#
|
||||
if which bondingadmin-nftables >/dev/null ; then
|
||||
nft_file=/etc/bondingadmin/nftables/filter-input-bondingadmin-migrate.nft
|
||||
if [ ! -f $nft_file ] ; then
|
||||
echo "ip saddr $(get_var target_ip) accept" > $nft_file
|
||||
bondingadmin-nftables start
|
||||
fi
|
||||
else
|
||||
manthan marked this conversation as resolved
Outdated
|
||||
known_ips=/etc/firewall.d/known_ips
|
||||
target_ip_present=false
|
||||
target_ip=$(get_var target_ip)
|
||||
if [ -f $known_ips ] ; then
|
||||
if grep -q $target_ip $known_ips ; then
|
||||
target_ip_present=true
|
||||
fi
|
||||
fi
|
||||
if [ $target_ip_present = "false" ] ; then
|
||||
echo "iptables -A \$CHAIN -s $target_ip -j ACCEPT" >> $known_ips
|
||||
systemctl restart firewall
|
||||
fi
|
||||
nft_file=/etc/bondingadmin/nftables/filter-input-bondingadmin-migrate.nft
|
||||
if [ ! -f $nft_file ] ; then
|
||||
echo "ip saddr $(get_var target_ip) accept" > $nft_file
|
||||
bondingadmin-nftables start
|
||||
fi
|
||||
|
||||
# Check TTL of hostname
|
||||
@ -568,13 +553,9 @@ function action_target_post() {
|
||||
echo -e "Running remotebackup"
|
||||
ba remotebackup
|
||||
|
||||
if -f /usr/sbin/bondingadmin-nftables ; then
|
||||
echo -e "Restarting nftables service"
|
||||
systemctl restart bondingadmin-nftables
|
||||
else
|
||||
manthan marked this conversation as resolved
Outdated
jfunk
commented
Same here. Same here.
|
||||
echo -e "Restarting firewall service"
|
||||
systemctl restart firewall
|
||||
fi
|
||||
echo -e "Restarting nftables service"
|
||||
systemctl restart bondingadmin-nftables
|
||||
|
||||
|
||||
# Migrate influxDB
|
||||
echo -ne "Migrating influxDB "
|
||||
|
Loading…
x
Reference in New Issue
Block a user
Also the
if which bondingadmin-nftables >/dev/null ; then
and always do the stuff inside that clause since that's always the case now.