Am 16.03.22 03:09 schrieb i...@tutanota.com: > >> I was thinking that since Go by default doesn't run a webserver on > >> port 80 or 443 > > > What does it even mean. Go is a programming language. If you want to > > build and run a webserver with it and have it listen on whatever port > > you want, you can. Go doesnæ„’ have any opinion as to what ports you > > should or shouldn't use. And the default ports por an http/https > > server ARE 80 and 443. > > What I meant was that you cannot code the webserver to run on port 80 > or 443 unless it runs as root (for obvious reasons). What I wanted to > avoid is a change in privileges, as in starting it as root and then > change to www. The easy way it seems to be to just run on something > like port 8888 and then use PF to redirect. > > >> I can run it like this: [...] > >> But that wouldn't keep it running after a reboot. > > > There you go: > > https://man.openbsd.org/afterboot.8#System_command_scripts > > Is there something to restart it if it crashes?
Just a one liner can do this: check if it's running. If not restart. But why would it crash??? Most likely because something was going wrong? So do you really want your system restart something that is going to be wrong? I must admit I have NO full 30 years expierence of sysadmin stuff (like you posted in another thread) but I would prefer to fix the problem and restart it manually only when its fixed. ...other way sounds a little bit like systemd(1) to me ;-)