Это - место, где связывание монтирования сделает то, что Вы хотите.
It seems to me you're trying to bind postgres to an IP associated with the tunnel. If that's the case, the ip_nonlocal_bind
is the solution to your problems. Setting the ip_nonlocal_bind allows you to bind to any IP, even one not associated with your computer, which is exactly what you want when you want to bind to an IP you don't yet have - for instance when using virtual IP's that floats between active and passive nodes.
Assuming this is ipv4 only;
echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind
Or throw it into /etc/sysctl.conf
net.ipv4.ip_nonlocal_bind
Это мой обходной путь, который я использовал много времени в таких ситуациях: отредактируйте сценарий запуска postresql rc.d и добавьте задержку с помощью sleep
команда bash. Я знаю, что это не так чисто, может быть, у кого-нибудь есть лучшее решение.
Scrap the 2 separate startup scripts, and just make one that calls both of them in the right sequence, with whatever depending logic you like