Artix Linux Forum

Artix Linux => Software development => Topic started by: christmaswreath on 04 February 2025, 23:39:08

Title: Can someone help me convert an OpenRC/SystemD service to a Dinit service?
Post by: christmaswreath on 04 February 2025, 23:39:08
I don't know how to write Dinit services and I looked online and found nothing that could help me, can someone help me convert these services to a Dinit service? Thanks!

EmixamPP/linux-enable-ir-emitter/boot_service
(https://github.com/EmixamPP/linux-enable-ir-emitter/tree/master/boot_service)
Title: Re: Can someone help me convert an OpenRC/SystemD service to a Dinit service?
Post by: Ogis on 05 February 2025, 16:15:41
Hello.

Please check this (https://github.com/davmac314/dinit/blob/master/doc/getting_started.md)
Title: Re: Can someone help me convert an OpenRC/SystemD service to a Dinit service?
Post by: christmaswreath on 06 February 2025, 01:28:18
Hello.

Please check this (https://github.com/davmac314/dinit/blob/master/doc/getting_started.md)

Is there a way to trigger the service when exiting out of a state eg. Suspend?
Title: Re: Can someone help me convert an OpenRC/SystemD service to a Dinit service?
Post by: gripped on 06 February 2025, 13:11:44
If whatever this ir-emitter is, is failing to work after returning from suspend a script in /etc/elogind/system-sleep/ should in theory allow you to start it again.
https://wiki.gentoo.org/wiki/Elogind#Suspend.2FHibernate_Resume.2FThaw_hook_scripts
https://wiki.artixlinux.org/Main/Elogind#Execute_a_script_at_suspend

I say in theory because I've never done it. I just know it's supposed to work.

You'd want post) not pre(