3 ms·
> various bad things happening to it when, for example, you logged out (which often would deliver a SIGHUP to it) And thus, `nohup`. Quite a few of my self ho
by r3trohack3r 2y ago
> various bad things happening to it when, for example, you logged out (which often would deliver a SIGHUP to it)
And thus, `nohup`.
Quite a few of my self hosted things are spawned using `nohup ./foobar &` and happily run for months at a time.
--
Edit: TIL `daemonize`, I have a new go to!
https://software.clapper.org/daemonize/ https://software.clapper.org/daemonize/
- klysm 2y agoI just bang out a quick systemd service and let it do all the lifting
- guestbest 2y agoWould you give a short explanation of how you would try that?
- pjmlp 2y agoYou configure it as a service, https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html https://www.freedesktop.org/software/systemd/man/latest/syst... A random tutorial, https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6 https://medium.com/@benmorel/creating-a-linux-service-with-s...
- guestbest 2y agoThanks. I’ll look it over
- fasa99 2y agoI'll do a system d but a problem is (1) system environment, and (2) machine specs. To normalize machine specs I will run it in a VM on the cloud. To normalize system environment I run in docker. I also like to run on Java for code safety and consistency. So what I have is a VM (Java) running on a VM (Docker) running a VM, running a VM (cloud compute), running on system D. I don't think it's abstracted enough though so I'm looking to find ways to add more VMs to the equation, so as to ensure consistency. Figure if I add a few more VMs, good luck hacking that!
- kunley 2y agoWorth to mention runit - bit bigger thing but still smaller than systemd