diff --git a/server.md b/server.md index 6ece0b5..ae409a4 100644 --- a/server.md +++ b/server.md @@ -1,5 +1,10 @@ -only reboot if rsync isnt working +only reboot if vpn isn't used ```bash -if [[ $(ps ax | grep rsync | grep | wc -l) -lt 2 ]]; then shutdown --reboot now; fi +if [ $(ifstat -i tun0 1s 1 | awk 'NR==3 {print $1}' | sed 's#\..*##') -eq 0 ]; then systemctl reboot; fi +``` + +fix routing +> replace `` by the IP +```bash +if [ $(ip route | grep | wc -l) -ne 1 ]; then /root/openvpn/routing.sh; fi ``` -* penser à remplacer `` \ No newline at end of file