# Information question on how to usefully use runit.



## Alain De Vos (Apr 22, 2020)

I installed runit. But now what ? Meaning which packages use it in advantage way. And how do I use it in an advantage way ?


----------



## Sevendogsbsd (Apr 22, 2020)

Isn't runit an init system?


----------



## 20-100-2fe (Apr 22, 2020)

Yes, it is used by Void Linux


----------



## Sevendogsbsd (Apr 22, 2020)

That's what I thought because I've used Void Linux. What purpose would it serve in FreeBSD? FreeBSD has an init system. I suppose you could replace it but I am not knowledgeable enough to know why you would want to.


----------



## ctaranotte (Apr 22, 2020)

We are all locked down so why not?

There are two (2) runit:

sysutils/runit : said to be a "Replacement for DJB daemontools" (hereafter referred to as "runit")

and  

sysutils/runit-faster : said to be a "Runit based init replacement for FreeBSD" (hereafter referred to as "runit-faster")

runit-faster (that's your wild goose) is directly based on the Void Linux Init system. You will find a how-to here, complemented with that.

However, before you start your chase, please read this.

My two cents.


----------



## Sevendogsbsd (Apr 22, 2020)

Ah ok, did not know that. I have no interest in mucking with FreeBSD base as it works perfectly for my use case. Thank you though.


----------



## zirias@ (Apr 22, 2020)

I never tried it, but I have to ask: what should this accomplish, and how does it integrate with an ecosystem where all the init-scripts are written in the "mewburn" way? Does it come with replacements for all the scripts in /etc/rc.d? And what about ports installing their scripts to /usr/local/etc/rc.d?


----------



## ctaranotte (Apr 22, 2020)

Zirias said:


> I never tried it, but I have to ask: what should this accomplish, and how does it integrate with an ecosystem where all the init-scripts are written in the "mewburn" way? Does it come with replacements for all the scripts in /etc/rc.d? And what about ports installing their scripts to /usr/local/etc/rc.d?



System initialization is explained in the SYSTEM INITIALIZATION section of this document: RUNIT-FASTER (7) - FreeBSD Miscellaneous Information Manual.

While the SERVICE TEMPLATES section of the same document explains how to start a service.

With this information, you should be able to create a script to start a service.


----------



## 20-100-2fe (Apr 23, 2020)

Besides FreeBSD, I also use Void. Runit is simple and that's fine, but it has the strange habit of automatically starting services. You don't appreciate this initiative when you want to replace the display manager, for instance. When you administer a machine, the less things getting in your way, the better.

That said, the interest of runit (or openrc and friends) is obvious in the systemd-parasited Linux world, but frankly, I can't see any advantage of using it on FreeBSD.

Moreover, if you change FreeBSD's init system, besides having more work and less help, you deprive yourself of a considerable amount of helpful (and mostly very good) existing documentation.

The only reason I could understand to change FreeBSD's init system is to use it as on occasion of learning about an aspect of how an OS works.


----------



## malaizhichun (May 8, 2020)

Maybe you should take a look at android , it worked on init.rc ,  it is closer to Unix style than ios/systemd/Linux.


----------



## 20-100-2fe (May 8, 2020)

LOL!


----------

