S
S
Smoke User2021-11-16 13:05:57
FreeBSD
Smoke User, 2021-11-16 13:05:57

How to make in openvpn, when routing changes, it restarted?

Good day!

Guys, this is the challenge.
When the routing table was changed, the
OpenVPN Service accepted and rebooted.
How can it be done with a script?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2021-11-16
@fox_12

Get the routing table, write it to a file
In the crontab, add a script to run every - how many minutes you need there, which:
1. Reads the routing table.
2. Compares with the previously created file.
3. If there are changes - writes a new file with routing, restarts openvpn, if not - ends the script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question