mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-28 02:18:50 +00:00
Fix WireGuard script
This commit is contained in:
@@ -15,10 +15,10 @@ setup_interface()
|
||||
ip link add ${WIREGUARD_INTERFACE_NAME} type wireguard
|
||||
fi
|
||||
|
||||
if [[ $WIREGUARD_IPV4_ENABLED -eq "true" ]]; then
|
||||
if [ $WIREGUARD_IPV4_ENABLED = "true" ]; then
|
||||
ip address replace ${WIREGUARD_IPV4_ADDRESS} dev ${WIREGUARD_INTERFACE_NAME}
|
||||
fi
|
||||
if [[ $WIREGUARD_IPV6_ENABLED -eq "true" ]]; then
|
||||
if [ $WIREGUARD_IPV6_ENABLED = "true" ]; then
|
||||
ip -6 address replace ${WIREGUARD_IPV6_ADDRESS} dev ${WIREGUARD_INTERFACE_NAME}
|
||||
fi
|
||||
ip link set mtu ${WIREGUARD_INTERFACE_MTU} up dev ${WIREGUARD_INTERFACE_NAME}
|
||||
@@ -28,10 +28,10 @@ setup_interface()
|
||||
|
||||
add_routes()
|
||||
{
|
||||
if [[ $WIREGUARD_IPV4_ENABLED -eq "true" ]]; then
|
||||
if [ $WIREGUARD_IPV4_ENABLED = "true" ]; then
|
||||
ip route add ${WIREGUARD_IPV4_NETWORK} dev ${WIREGUARD_INTERFACE_NAME}
|
||||
fi
|
||||
if [[ $WIREGUARD_IPV6_ENABLED -eq "true" ]]; then
|
||||
if [ $WIREGUARD_IPV6_ENABLED = "true" ]; then
|
||||
ip -6 route add ${WIREGUARD_IPV6_NETWORK} dev ${WIREGUARD_INTERFACE_NAME}
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user