How can i convert a systemd system file to a runit one?
How can i make a runit runsv?
How do i configure a runit runsv to run under a specific user?
---
Manual pages/docs, or anyting that cloud help me understand runit
Create a folder at
/etc/runit/sv named after your service (eg:
/etc/runit/sv/mydaemon)
Inside that folder, create a file named
run. The simplest systemd files map to run file like this:
mydaemon.service[Unit]
Description=My daemon
[Service]
Type=simple
ExecStart=/usr/bin/mydaemon --option
/etc/runit/sv/mydaemon/run#!/bin/sh
exec /usr/bin/mydaemon --option
Then you enable with
rsm, do the
ln -s stuff, etc.
This will work only for very simple systemd units, and afaik there's nothing like http://openrc.run for runit, so you'll have to tell us what service you're trying to convert so we can help you make a proper, equivalent run file.
I bet it is this one (https://forum.artixlinux.org/index.php/topic,2661.msg17521/topicseen.html#msg17521). There was no need to create a separate thread, IMHO.
If that's the case, here's a tentative, untested run file:
#!/bin/sh
[ -r /etc/default/tailscaled ] && . /etc/default/tailscaled
/usr/sbin/tailscaled --cleanup
exec /usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state \
--socket=/run/tailscale/tailscaled.sock --port "$PORT" $FLAGS
But we have a problem. It's a type notify service, which means it tells systemd when it's ready using a systemd-specific API. Though my testing suggests it just falls back to not notifying systemd (or the fact that I have elogind tricks it).
I think it could be a s6/suite66 service (if it requires notification), though. They have notify services.
I was thinking of using from the aur so... I whanted to know how...
ly
I will leave the source for this one, but i want to know where to find these infos
[Unit]
Description=TUI display manager
After=systemd-user-sessions.service plymouth-quit-wait.service
[email protected]
[Service]
Type=idle
ExecStart=/usr/bin/ly
StandardInput=tty
TTYPath=/dev/tty2
TTYReset=yes
TTYVHangup=yes
[Install]
Alias=display-manager.service
Also check out (if you haven't seen it):
https://wiki.archlinux.org/title/Xinit#Autostart_X_at_login
I'm using something like that. Basically, it is skipping the use of display manager in general.
I wanted to setup ly but i think i can live without it, as only i am on here. But i wanted to know how to setup it.