3 ms·
Is it that there is no way to “just” run a small custom built daemon script on a Linux box, not just in terms of camera apps but in general? Like I have this 1
by numpad0 6y ago
Is it that there is no way to “just” run a small custom built daemon script on a Linux box, not just in terms of camera apps but in general?
Like I have this 10 line bash script, that I want it to run for a few years, with no maintenance, that don’t get corrupted from power loss, or lock up from memory leaks, that auto restarts when necessary, but not bring down network either.
And it requires 10+ years of experience in managing and developing on GNU/Linux, a few notable certificates maybe, a bit of embedded background being a plus, to do it right enough, in about 0.25-1.0 man-month.
I’ve tried something like that on Alpine Linux, and it didn’t work always. Mostly due to proficiency issues on me, but it definitely was unnecessarily hard.
- stevepike 6y agoThere are fancier modern things but https://cr.yp.to/daemontools.html https://cr.yp.to/daemontools.html still works great for keeping a simple script running.
- mschuster91 6y agoIf I had to do that, I'd go for a read-only rootfs (which IIRC the latest raspbian/raspi-config version supports to set up for you) combined with a systemd unit file that takes care of auto restarts. The only thing I don't know how to deal with is a memory leak but as long as it's an easy simple script and no Java app, there should not be anything running that could leak memory.
- johnchristopher 6y agoSomething like that ? [Unit] Description=auto start script After=multi-user.target [Service] Type=simple ExecStart=/home/pi/script.sh User=pi WorkingDirectory=/home/pi Restart=on-failure [Install] WantedBy=multi-user.target