When we need to run a command immediately after a DAB built Appliance OpenVZ container has fully booted, where do we place it?
If we place it in /etc/init.d/ folder and symlink it into the rcX.d folders with update-rc.d command, it doesn't go well for some programs like stunnel4.
Using the update-rc.d stunnel4 defaults 20 (or 80) and booting the container and executing ps aux | grep stunnel4 we get:
The port redirections do not work well.
If we then execute /etc/init.d/stunnel4 restart, the output of ps aux | grep stunnel4 is:
The port redirections now work as desired.
If we place it in /etc/init.d/ folder and symlink it into the rcX.d folders with update-rc.d command, it doesn't go well for some programs like stunnel4.
Using the update-rc.d stunnel4 defaults 20 (or 80) and booting the container and executing ps aux | grep stunnel4 we get:
Code:
# ps aux | grep stunnel4
stunnel4 711 0.0 0.0 3836 964 ? Ss 11:27 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 810 0.0 0.0 1720 516 pts/0 S+ 11:28 0:00 grep stunnel4
If we then execute /etc/init.d/stunnel4 restart, the output of ps aux | grep stunnel4 is:
Code:
# ps aux | grep stunnel4
root 898 0.0 0.0 3716 644 pts/0 S 10:38 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 899 0.0 0.0 3716 408 pts/0 S 10:38 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 900 0.0 0.0 3716 408 pts/0 S 10:38 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 901 0.0 0.0 3716 408 pts/0 S 10:38 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 902 0.0 0.0 3716 408 pts/0 S 10:38 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
stunnel4 903 0.0 0.1 4068 2064 ? Ss 10:38 0:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 933 0.0 0.0 1720 504 pts/0 R+ 11:23 0:00 grep stunnel4
Last edited: