kolejne zmiany, dużo, zebrało się
This commit is contained in:
32
bin/wireguard-cynarski.sh
Executable file
32
bin/wireguard-cynarski.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
IPS=( "3.71.86.69" )
|
||||
GW="10.0.200.2"
|
||||
|
||||
MODE=$1
|
||||
|
||||
function r_up() {
|
||||
for host in "${IPS[@]}"
|
||||
do
|
||||
ip r a ${host} via ${GW}
|
||||
done
|
||||
}
|
||||
|
||||
function r_down() {
|
||||
for host in "${IPS[@]}"
|
||||
do
|
||||
ip r d ${host} via ${GW}
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
case ${MODE} in
|
||||
up)
|
||||
r_up
|
||||
;;
|
||||
down)
|
||||
r_down
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user