openRC generic handling daemon #532
Replies: 7 comments 14 replies
-
|
the systemd implementation is pretty terrible in this work (the library I use requires re-compiling and headers) - so might be better to just PR it and I can look to fix whatever breaks |
Beta Was this translation helpful? Give feedback.
-
|
I probably should have done a better Feature List: ✅ SIGTERM/SIGINT signal handling for clean shutdown This will allow mpp-solar to run properly as a daemon on OpenRC systems (like Alpine Linux, Gentoo) while maintaining backward compatibility with systemd systems. |
Beta Was this translation helpful? Give feedback.
-
|
I did find a couple things to clean up, so let me now when you plan to push a release so I can get you another PR. I have added the option of --pidfile since depending on the user running the service, may not have permission to write either /run or /var/run an I also added more checks and balances and sensible log and messages. |
Beta Was this translation helpful? Give feedback.
-
|
the release can wait if that suits - its pretty easy to do, so I dont mind either way |
Beta Was this translation helpful? Give feedback.
-
|
Here is where I am currently, the fork happens very early (this code is in my openrc-dev branch and is current). I'll add some logging into the dummy daemon, as that's where it should be headed an update my branch. I should also mention it exits correctly: I can easily accommodate the child in the daemon, it is just a quest to know why we have a child at this point just to be sure there is not something that needs looked at. Rather tackle sooner than later. as you can see, the second process crashes likely due to contention on the serial port, though it's never reported except once in a great while, I suspect because frequently it's the child process that is not in time for the port. |
Beta Was this translation helpful? Give feedback.
-
|
I have done allot though I was hoping to get better behavior out of pyinstaller elf, though it is a little more complicated than I thought, so the code is there to work on, though disable and noted in mppsolar/init.py Let me know if you would like me to change anything.. |
Beta Was this translation helpful? Give feedback.
-
|
@jblance So I cleaned this patch up a ton, honestly I was excited about pyinstaller packaged being functional, though this patch has the pyinstaller code commented out so it's not currently used in this patch, as there are some quarks I need to iron so that little errors like the comport being busy seems to be a roulette game where most the time it continues on, though occationally it does not. It's noted in init and anyone can just uncomment that section if they want to work on it. so the good thing is there is working openrc integration, and you accepting my mess, forced me to accelerate doing it right, an thus you have it sooner than you might have as the pressure was on so that your code is clean on the repo. :) I can put some time into MQTT for commands if you wish. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@jblance I have a openRC implementation in addition to your systemd, though I have no idea how this may affect your CI, and as such I'm messaging you here rather than a PR.
Let me know how you would like me to forward it too you. It's tested out in alpine, in docker - alpine, platforms: x86_64, armhf, arm64(aarch64), and I have working builds in all aforementioned in standalone executable s.
It's stubbed out in my repo under openrc-dev.
Beta Was this translation helpful? Give feedback.
All reactions