Hardware: same ol lenovo core2duo thinkcentre YunoHost version: currently 11.0.9.14 stable but bug has been there for a while I have access to my server : SSH
Description of my issue
I have noticed that nginx does not start automatically on boot and has to be started manually. It has to be done from a command line through SSH, because no nginx means no web access to the admin or anything else. Logs seem fine (i can paste them if you’d like) and nginx -t showes no configuration issue. My question is : how to start it using cron ? I know you can add the @reboot string and use the sleep argument to delay it a few minutes, but if i use the admin cron list would it do the trick ? Or is there another way ? Thanks !
Mon serveur YunoHost
Matériel: vieux core2duo thinkcentre Version de YunoHost: 11.0.9.14 en ce moment mais le problème date J’ai accès à mon serveur : SSH
Description du problème
J’ai remarqué il y a un moment que nginx ne démarrait pas automatiquement au boot. Il faut le démarrer manuellement via ligne de commande en SSH parce que pas de nginx pas de webadmin… Les logs ont l’air ok mais je peux les poster si ça vous dit et nginx -t me dit que tout va bien… Ma question : peut on démarrer nginx via cron ? Avec @reboot et sleep dans le cronjob pour attendre quelques minutes après le boot au cas où, si j’utilise la list cron de admin ça ferait le boulot ? Ou y’a une autre façon de faire ? Merci !
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Sun 2022-09-18 10:07:31 CEST; 1min 3s ago
Docs: man:nginx(8)
Cntrl PID: 789
Tasks: 1 (limit: 8858)
Memory: 13.5M
CPU: 142ms
CGroup: /system.slice/nginx.service
└─789 /usr/sbin/nginx -t -q -g daemon on; master_process on;
Warning: some journal files were not opened due to insufficient permissions.
Zblerg this was supposed to be ran as root, or with sudo … :
sudo systemctl status nginx
We can see however that the service is “activating” from like 1 min ago … which is puzzling because nginx is not supposed to take a super long time just to “activate” itself @_@