Article 586TA Services start order

Services start order

by
NtPal
from LinuxQuestions.org on (#586TA)
Hello, folks. I'm learning slackware. Want to see it on my desktop and r-pi. After years of using systemd I'm a bit frustrated with one problem - how to make particular service in slackware run after another one.

I'd like to:

1) apply nftables rules AFTER I get openvpn tunnel up and running, because there are some 'oif tun0/iif tun0' statements in nftables.conf. I don't want to use iif(oif)name.

2) start dnscrypt-proxy AFTER I get openvpn tunnel up and running.

I added to /etc/rc.d/rc.local

Code:run_nftables() {
if [ -f /etc/nftables.conf ] && [ -e /dev/net/tun ]; then
/usr/sbin/nft -f /etc/nftables.conf
else
sleep 10
run_nftables
fi
}

run_nftables &

run_dnscrypt() {
if [ -x /etc/rc.d/rc.dnscrypt-proxy ] && [ -e /dev/net/tun ]; then
/etc/rc.d/rc.dnscrypt-proxy start
else
sleep 10
run_dnscrypt
fi
}

run_dnscrypt &I'm not a shell expert (yet? :)). If my script is correct I don't understand, why it doesn't work as I expect. After I login in tty I don't see any nftables rules applied. Dnscrypt also doesn't start. After about a minute or so the situation doesn't change. Am I on the wrong path?latest?d=yIl2AUoC8zA latest?i=BHiv-FvAd9U:tPETynK1jAw:F7zBnMy latest?i=BHiv-FvAd9U:tPETynK1jAw:V_sGLiP latest?d=qj6IDK7rITs latest?i=BHiv-FvAd9U:tPETynK1jAw:gIN9vFwBHiv-FvAd9U
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments