xorbit / LiFePO4wered-Pi

Access library, command line tool and daemon for the LiFePO4wered/Pi module
GNU General Public License v2.0
132 stars 31 forks source link

lifepo4wered-daemon with openrc functions (Gentoo-Player) #61

Closed Maikeleg closed 1 year ago

Maikeleg commented 1 year ago

Hi Patrick, I would like to use the Gentoo-Player linux Gentoo distribution. This is working without Systemd so running make as su and changing USE_SYSTEMD ?= 0 instead of 1 in Makefile is finishing the build process as it seems. Also defaulting and restarting the service seems to work after edit;

enable-init-0: # sysvinit
        ##update-rc.d lifepo4wered-daemon defaults
        /sbin/rc-update add lifepo4wered-daemon default
        ##service lifepo4wered-daemon restart
        /etc/init.d/lifepo4wered-daemon restart

However the daemon uses /lib/lsb/init-funtions but supposedly I need to use openrc (https://github.com/OpenRC/openrc/blob/master/service-script-guide.md) Do you by any change have experience with Gentoo and could you rewrite this to use the openrc method (if I understand it correctly)?

xorbit commented 1 year ago

Hi Maikel, No I have no experience with Gentoo or OpenRC. To be honest, I know little about init systems in general, the systemd parts of the daemon were mostly contributed by another user. I am currently out on vacation until mid-July. If you manage to figure it out, I do accept pull requests. :)

Maikeleg commented 1 year ago

Hi Maikel, No I have no experience with Gentoo or OpenRC. To be honest, I know little about init systems in general, the systemd parts of the daemon were mostly contributed by another user. I am currently out on vacation until mid-July. If you manage to figure it out, I do accept pull requests. :)

Hi Patrick, Thanks for your reply. I didn't go through gentooplayer because of horrible user-experience, I wouldn't advise them I however did manage to get it to work successfully on ArchLinux (rAudio), I'll try to make a pull request (1st timer)