Jail: Start a service only after another service has been started

Krieg

Cadet
Joined
Dec 5, 2022
Messages
3
I want the service "tailscaled" to be started after the service "openvpn" is started. I have actually managed to do it but I do not like my solution. In /usr/local/etc/rc.d/tailscaled I have added openvpn as a requirement, like this:

#!/bin/sh # PROVIDE: tailscaled # REQUIRE: NETWORKING [B]openvpn[/B] # KEYWORD: shutdown

But I do not like changing the files inside /usr/local/etc/rc.d becuase they might be overwritten during upgrades. I would prefer a cleaner solution directly in /etc/rc.conf but I can't find a way to add dependencies in /etc/rc.conf, maybe there is no way? If anyone knows a cleverer way without changing system files I would appreciate it.

Thanks
 
Top