0

I have systems that ensures that their services are running by runit instead of rc.d or systemd on Debian, and I am trying to use Rex to start building a coherent setup across my systems.

I would like to know how I can:

  1. keep the package as up-to-date as possible (considering the fact I intend to deploy a repository with only validated packages);
  2. disable the Debian's official and automatic rc.d daemon;
  3. upload the run script;
  4. create the link for the run script;
  5. ensure that the daemon is automatically started;
  6. ensure that it's logger is also running;

For points 1 to 4, I could just fix the problem with a package built to install the run-scripts of specific daemons and use it instead of rc.d (like the package getty-run), but AFAIK, it won't stop Rex to use rc.d interface (according to what I understood in source code: /etc/init.d/%s [start|restart|stop|etc]).

MacMartin
  • 338
  • 1
  • 4
  • 17
  • Calling the `/etc/init.d/*` scripts is deprecated. You should be using `systemctl` instead, even if there is still a script present there, because they will be removed in the future. Of course, you also should be moving away from runit, but that's another discussion... – Michael Hampton Jan 29 '19 at 14:41
  • Actually, when I do things manually on a standard Debian install, I use the command '/usr/sbin/service' which is, in theory, generic enough. The stuff about /etc/init.d/* is what I think Rex does after having read (parts of) the code. Stuff in init.d will probably only be removed if/when rc.d support is removed, and I do not remember reading things about it (but, would be probable in few versions, I think). – user3459474 Jan 29 '19 at 14:52
  • The `service` command is also deprecated, for the same reason. – Michael Hampton Jan 29 '19 at 15:00
  • Sounds strange, according to apt-file, systemctl is only included by the package systemd in stretch, which does support both systemd (default) and sysvinit. SysVinit supporting rc.d and, since stretch, providing runit-sysv (and runit-systemd) packages, that does the glue to allow the use of runit without manually hacking around inittab/systemd units. Are you sure that support for everything not systemd is to be removed soon in Debian? – user3459474 Jan 29 '19 at 15:08
  • You can look at testing and unstable to see what's coming up, but yes, these will eventually be removed entirely, as every other Linux distribution has already done. – Michael Hampton Jan 29 '19 at 15:09
  • Well, runit-sysv and runit-systemd are present in stable, testing and unstable for now. But, yes, I know that sysV+rc.d will probably not last long (not a bad thing). Which does not means that systemctl will replace it everywhere. I doubt distros like openwrt, voidlinux or gentoo intend to only support systemd (for various reasons depending on the distro). Anyway, I would like to use Rex to manage daemons. What is uses under the hood should not affect things much, it should be an implementation detail, and my question is related to this, not about init systems. – user3459474 Jan 29 '19 at 15:19

0 Answers0