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
systemctl edit --full supervisord.servicebecause nothing was found with supervisor to ```[Unit] Description=Supervisor daemon Documentation=http://supervisord.org After=network.target[Service] ExecStart=/usr/local/bin/supervisord -n -c /etc/supervisord.conf ExecStop=/usr/local/bin/supervisorctl $OPTIONS shutdown ExecReload=/usr/local/bin/supervisorctl $OPTIONS reload KillMode=process Restart=on-failure RestartSec=42s RuntimeDirectory=supervisor
[Install] WantedBy=multi-user.target Alias=supervisord.service
– Kristi Jorgji Mar 31 '22 at 09:08