Over my time using Artix (which has been awhile), I've made several of my own services for various things I use. I figured it was time to contribute and asked on the IRC how I should share these and was told to post a topic here, so here is the topic.
Some of these are slightly incomplete, only have a system service or a user service (where they could have both), and may need some minor corrections, but they should be something at the least.
cdemu-daemon-dinit (depends on
extra/cdemu-daemon)
user/cdemu-daemon
type = process
load-options = sub-vars
command = /usr/bin/cdemu-daemon
restart = true
smooth-recovery = true
depends-on = dbus
log-type = buffer
icecast-dinit (depends on icecast (https://aur.archlinux.org/packages/icecast))
icecast
type = process
command = /usr/bin/icecast -c /etc/icecast.xml
run-as = icecast
smooth-recovery = true
logfile = /var/log/dinit/icecast.log
depends-on = network.target
Icecast is not in the Arch or Artix repositories. Requesting packaging, please.
inspircd-dinit (depends on inspircd (https://aur.archlinux.org/packages/inspircd))
inspircd-pre
type = scripted
command = /usr/bin/install -dm0755 -o inspircd -g inspircd /run/inspircd
after = pseudofs
inspircd
type = process
command = /usr/bin/inspircd --runasroot --nofork
smooth-recovery = true
logfile = /var/log/dinit/inspircd.log
depends-on = inspircd-pre
depends-on = network.target
Inspircd is not in the Arch or Artix repositories. Requesting packaging, please.
jellyfin-dinit (depends on
extra/jellyfin-server)
user/jellyfin
type = process
command = /usr/bin/jellyfin
smooth-recovery = true
log-type = buffer
This could also be a system service and it is meant to be one, but I run it as a user.
monero-dinit (depends on
extra/monero)
monerod
type = process
command = /usr/bin/monerod --config-file /etc/monerod.conf --non-interactive
run-as = monero
smooth-recovery = yes
restart = yes
after = login.target
user/monerod
type = process
command = /usr/bin/monerod --non-interactive
smooth-recovery = yes
restart = yes
opendkim-dinit (depends on
extra/opendkim)
opendkim-pre
type = scripted
command = /usr/bin/install -dm0775 -o opendkim -g opendkim /run/opendkim
depends-on = root-rw
opendkim
type = bgprocess
command = /usr/bin/opendkim -x /etc/opendkim/opendkim.conf -u opendkim -f
pid-file = /run/opendkim/opendkim.pid
smooth-recovery = true
logfile = /var/log/dinit/opendkim.log
depends-on = opendkim-pre
depends-on = network.target
run-as = opendkim
opendmarc-dinit (depends on
extra/opendmarc)
opendmarc-pre
type = scripted
command = /usr/bin/install -dm0755 -o opendmarc -g opendmarc /run/opendmarc
depends-on = root-rw
opendmarc
type = process
command = /usr/bin/opendmarc -c /etc/opendmarc/opendmarc.conf -f
smooth-recovery = true
logfile = /var/log/dinit/opendmarc.log
depends-on = network.target
depends-on = opendmarc-pre
run-as = opendmarc
wivrn-dinit (depends on wivrn-server (https://aur.archlinux.org/packages/wivrn-server))
user/wivrnd
type = process
command = /usr/bin/wivrn-server
smooth-recovery = yes
restart = yes
log-type = buffer
WiVRn is not in the Arch or Artix repositories. Requesting packaging of wivrn-server (https://aur.archlinux.org/packages/wivrn-server) (and optionally wivrn-dashboard (https://aur.archlinux.org/packages/wivrn-dashboard)), please.
yggdrasil-dinit (depends on
extra/yggdrasil)
yggdrasil
type = process
command = /usr/bin/yggdrasil -useconffile /etc/yggdrasil.conf
pid-file = /run/yggdrasil.pid
smooth-recovery = true
logfile = /var/log/dinit/yggdrasil.log
after = network.target
Hopefully most if not all of these are adequate, as well as some of my packaging requests. If not, at the very least hope these help somebody. Thanks!
Looks like a great thread, and I'd like to contribute.
I've been using Artix (dinit) as my daily driver for over a year.
I also like to use Windows XP and 7 as virtual machines, because that's where I migrated from.
NOTE: Please do not allow these operating systems that lack security updates to be connected the internet.I use VMware Workstation from the AUR, since it has better support for these operating systems than VirtualBox.
If you try to use VMware on Artix (non OpenRC, OpenRC has a dedicated package vmware-workstation-openrc (https://aur.archlinux.org/packages/vmware-workstation-openrc)), you'll likely run into connectivity issues for network and USB.
The following service description files will enable the use of networking and USB connectivity on Linux systems using dinit as the init system.
vmware-workstation-dinit (depends on vmware-workstation (https://aur.archlinux.org/packages/vmware-workstation))
/etc/dinit.d/vmware-networks-configurationbefore = login.target
command = /usr/bin/vmware-networks --postinstall vmware-player,0,1
depends-on = vmware-networks-pre
type = process
/etc/dinit.d/vmware-networks-precommand = /usr/bin/modprobe vmnet
depends-on = network.target
type = scripted
/etc/dinit.d/vmware-networksbefore = login.target
command = /usr/bin/vmware-networks --start
depends-on = vmware-networks-pre
stop-command = /usr/bin/vmware-networks --stop
type = process
waits-for = vmware-networks-configuration
/etc/dinit.d/vmware-usbarbitratorbefore = login.target
command = /usr/bin/vmware-usbarbitrator
depends-on = local.target
stop-command = /usr/bin/vmware-usbarbitrator --kill
type = scripted
Installation procedure:
Everything should work immediately, but you may reboot again to be sure.
I created these scripts with my extremely limited knowledge of dinit and Linux, so they may not be optimal but I have validated that they do work.
A little summary of what they do and alternatives to create a working configuration:
- vmware-networks-configuration creates a base network configuration file (/etc/vmware/networking) for VMware to use, if not already present.
- Alternatively, the network configuration file can be placed manually, since there is no merit to a use-once service (a no-op on following system starts) other than recovering from a corrupted state.
- vmware-networks-pre forces the vmnet kernel module to be loaded. This module performs all networking related operations.
- Alternatively, a .conf file with the content vmnet can be placed manually inside /etc/modules-load.d, eliminating the need for another service.
- vmware-networks starts the helper responsible for configuring and managing the network settings to be run in conjunction with the kernel module.
- vmware-usbarbitrator starts the USB arbitration service that handles external device connectivity to the VMs.
I hope these help someone to run VMware on
any Linux system using dinit, or at least help them understand how to write init scripts for VMware on any other init system.
But I would love to see VMware as a native package for Artix, if possible.