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
Share:
17,589

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    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
      Admin over 9 years
      You could use a cronjob with the @reboot trigger if your cron supports that feature.
    • Admin
      Admin over 9 years
      Or you can do something in the login shell: pgrep somed || somed... This obviously only works if you login with a shell, though...
  • keineahnung2345
    keineahnung2345 over 3 years
    For newer system(which uses Python3 as default, like Ubuntu 20.04), usesystemctl3.py instead of systemctl.py .
  • NYCeyes
    NYCeyes over 3 years
    @onlyjob I was facing the same need. This answer and the above comment (about python3) saved my life. Thank you! =:)