Starting Services without Systemd?
17,589
There is an excellent project -- docker-systemctl-replacement where you can get alternative systemctl
command to start/stop services without systemd.
systemctl
replacement is not a complete re-implementation of original systemctl
but it works fairly well in practice.
It can be installed as follows:
wget https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -O /usr/local/bin/systemctl
Related videos on Youtube
Author by
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
Is it possible to start services on and post startup in CentOS/Fedora distributions without using systemd (systemctl)? If yes, how?
Systemd does not work in non-privileged docker containers; consequently at this point I can only start services within privileged containers, which I'd prefer not to do.
Thanks.
-
Admin over 9 yearsYou could use a cronjob with the
@reboot
trigger if yourcron
supports that feature. -
Admin over 9 yearsOr you can do something in the login shell:
pgrep somed || somed
... This obviously only works if you login with a shell, though...
-
-
keineahnung2345 over 3 yearsFor newer system(which uses Python3 as default, like Ubuntu 20.04), use
systemctl3.py
instead ofsystemctl.py
. -
NYCeyes over 3 years@onlyjob I was facing the same need. This answer and the above comment (about python3) saved my life. Thank you! =:)