RH /etc/init.d/functions tooling
RH /etc/init.d/functions tooling
Posted Feb 4, 2019 22:05 UTC (Mon) by jccleaver (guest, #127418)In reply to: Not a "bloated, monolithic system"? by Cyberax
Parent article: Systemd as tragedy
> So now it's 25 lines for deps, then another 1k lines for cgroups manipulation in Bash. Noted.
cgroup *definition* is out of scope. To *assign* this process to a cgroup just set
CGROUP_DAEMON="cpu,memory:test1" (or whatever) in /etc/sysconfig/foo
> Incorrect. This doesn't have PID file management, for starters.
Incorrect. You can see in the start/stop sections that it's recommended to use the 'daemon' and 'killproc' functions, which handle PID file management for you and fall back to looking for the process's exec if not found. If your daemon does something weird in launch, you can have your daemon make the pidfile and pass that file name into the functions with -p.
The default 'status' function handles pid files automatically too.
All of this is in /etc/init.d/functions.
I'm sorry that you don't appear to be using a RedHat system, which is clearly the better distribution.