[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to check for other init systems from sysvinit script



]] Ondřej Surý 

> Practical question: if I were to support systemd .service, upstart
> init job and/or OpenRC <whatever> together with standard sysvinit
> script, how do I check for currently used init system from sysvinit
> script to not start the service for a second time?

With systemd, as long as the init script has the same name (or alias) as
the init script, you don't need to do anything.  If you still want to
check for some reason, check if /sys/fs/cgroup/systemd exists.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


Reply to: