5 ms·
BTW - a clue for budding writers of UDEV scripts - you can't run daemons directly (udevdaemon will kill them when the scripts that started them exit) - you can
by Taniwha 7y ago
BTW - a clue for budding writers of UDEV scripts - you can't run daemons directly (udevdaemon will kill them when the scripts that started them exit) - you can use "at now" (after you install at of course) to start a secondary script that will be allowed to start your daemon for you
(that way you can write code that works with all init systems, largely by avoiding them)
- CameronNemo 7y agoI maintain a fork of Upstart that I call startup. It integrates with udev (or busybox's uevent, or any other event source) so you can start daemons based on device events and then supervise those daemons. systemd has something similar where you can place a SYSTEMD_WANTS stanza in a udev rule and it will pull in a systemd unit, but I really dislike that model because it is hard to discover the policy that led to a unit being activated. With startup/Upstart, the policy is in the job configuration itself. Source for startup: https://gitlab.com/chinstrap/startup https://gitlab.com/chinstrap/startup Example of the udev events in action: https://gitlab.com/chinstrap/pinebook-pro/blob/master/etc/startup/setfont.conf https://gitlab.com/chinstrap/pinebook-pro/blob/master/etc/st...