bundles/pppd: restart nftables if it isn't running
This commit is contained in:
parent
1fbc08f74b
commit
8d21e15106
2 changed files with 12 additions and 2 deletions
|
@ -3,4 +3,9 @@
|
|||
rm /etc/nftables-rules.d/90-pppd
|
||||
rm /etc/sysctl.d/90-pppd.conf
|
||||
|
||||
if systemctl is-active nftables;
|
||||
then
|
||||
systemctl reload nftables
|
||||
else
|
||||
systemctl restart nftables
|
||||
fi
|
||||
|
|
|
@ -5,6 +5,11 @@ INTERFACE=$1
|
|||
echo "add rule nat postrouting oif $INTERFACE masquerade" > /etc/nftables-rules.d/90-pppd
|
||||
echo "net.ipv6.conf.$INTERFACE.accept_ra=2" > /etc/sysctl.d/90-pppd.conf
|
||||
|
||||
if systemctl is-active nftables;
|
||||
then
|
||||
systemctl reload nftables
|
||||
else
|
||||
systemctl restart nftables
|
||||
fi
|
||||
|
||||
rdisc6 $INTERFACE
|
||||
|
|
Loading…
Reference in a new issue