initscript was designed to allow setting things like ulimits and such so that
even services that were not PAM enabled could start with certain limits in
place. Many large scale software packages desire these types of things mainly
though it’s certainly a “hammer” style solution.
So… since initscript is a sysvinit feature, how do we accomplish the same with
systemd such that, for example, a ulimit change is applied to everything that is
started. Again, not talking about using something that only works for PAM
enabled things, talking about a solution that works universally for every init
thing like we used to do with initscript.
I would think what you’re asking for might depend on what is being run…
If you’re spawning multiple instances of the same thing, unlike sysVinit, systemd instantiates multiple copies of the same thing, sharing the same basecode. Each instance automatically is configured the same as every other instance.
I don’t know for sure but would expect that if you created a “Parent” or “Master” unit file that limits the CGroup it instantiates, then all other processes invoked by this systemd Unit file running within that CGroup would live within the same overall limited environment. But, this is only what seems logical to me and requires further investigation to verify.