I am facing an issue that everytime I hard restart my server (maybe went bananas due to out of memory, ddosed etc) supervisor fails to run. And the reason for that is identified and simply /var/run/supervisor directory is deleted.
I learned that /var/run folders are deleted on hard reboot (via ec2 panel for instance force stop then start), so my humble question is:
How can I execute this mkdir /var/run/supervisor
after every hard reboot ?
Where is the perfect place to add such logic. I guess it is not /etc/profile for sure
(the rest works fine, supervisor is configured as service + uses unix sock at var/run/supervisor/supervisor.sock)
My ubuntu version:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal