-
-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
Thanks a lot! |
Yes, sounds like a good idea! |
Should I add rsync to |
Yes, please. One thing to think about, at least needs documentation: |
Okay done :)
This information could be read from the config file if I'm correct, so if someone got free time they could write a function that parses it out of there. |
Thanks, yeah it needs a note in the FAQ too until it's read out. But would be good to have it in this PR too. Should have some time to take a look in about 2 weeks if no one is faster :) |
Sounds good to me, sadly I don't have the nerve to write some parser from PHP to JSON. |
I did not take a very close look but on a first glance, that sounds like a problem maybe solved already. Have a look here and think through if this could be reapplied in yours photobooth/src/js/remotebuzzer_server.js Lines 27 to 31 in 71c6fd0
And maybe this allows to move away from |
@jacques42 Sounds good, I'll give it a try and come back once it's all nice and working! |
Worked out fine as far as I can tell. Thanks a lot @jacques42 :) Only thing that caught my attention is PHP needing sudo privileges because the script isn't called from www-data user. |
Cron job is setup as root via install scrip, so shouldn't be a problem. Problems might appear if the cron job is setup as user pi or www-data user? Or they're able to detect the device? The config could also be written to an own array config with different rights on that file. |
Correct. I've tried setting up the cronjob with www-data but it doesn't work. It currently doesn't have the rights to mount drives with
As far as I can tell the script should work for every user that can execute
If you mean creating a (JSON) file from the config-API that would mean the script could be run from any user that has access to the config file and the above mentioned rights. (Which could in theory be the pi user or a newly created user that has just the needed rights) |
Whoops, just noticed I've got permissions to commit to your fork... |
No problem, that just happens :P I've done some testing and been trying some stuff and finally came to a result that wouldn't do much more effort (writing extra files, etc.). This is the rule I've come up with:
Sadly the Additionally I've experimented with adding the cronjob to the www-data user but I still need to test that a little more. |
f2fb2a6
to
e672daf
Compare
Just did, your commits are now gone, lost in the history of git :p |
Thanks :) Sadly I won't have time for about 1-2 weeks to test this, but will do once I am able to. If there's enough positive feedback we can merge earlier. Again thanks a lot for your contribution! |
No problem, one can't take all the time without giving back :P Sadly I can't do the UI for the admin panel myself so for testing the steps above need to to :s |
Sure, I'll take a look at it once I am able to boot a PC. |
Hey @thatonedude3470 - thanks for pulling all this together, that's really great and I like it a lot. When I was looking at the conversation about the need for cron, I wondered why not to do a "forever loop" in the node script itself. That avoids having to schedule via cron. The loop could be timebased using And to ensure the script is active, similar to Maybe you considered all that and for good reasons it was not the right thing to do. And I don't want to get in the way at all. But I'd be happy to help and give it a shot if that's something you would consider to be an improvement. Just let me know. I'll anyways do some testing and report back what I find. Edit: One early on finding, I run a pretty recent headless Raspberry Pi OS 10 (Buster), where the |
…, other small things
Rewrite to eliminate cron, integrate with Admin GUI and settings
Thanks to all the help from @jacques42 !! |
After two installations I can say:
|
Hey @thatonedude3470 - thanks for that, I very much appreciate it. The error on the admin is due to two commits I submitted to Andi only after your fork was created. In anticipation of those commits, I already now added a setting in your fork in a way that the admin panel options will only show on linux, but not windows. Once merged to dev, this error will be gone. I am somewhat speechless - I totally forgot to test the most common and basic use-case we have oml. So thanks for highlighting. I did enhance the services scripts even more, to yet be more robust. I am trying to make sure there is no stale process / no stale PID files hanging out there at any point. And last I added a small bug fix in the writeFileSync() for the PID file as I believe the parameter was meant to be |
@andi34 I did not want to leave this feature incomplete, as I really like it. So I took the time and effort to finalize into a base version which is fully functional, robust and rebased to latest |
Prerequisites checklist
What is the purpose of this pull request? (put an "x" next to an item)
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?
Currently there is no UI for selecting which drives to copy to. I don't code in PHP, someone else would have to do this
This pull request resolves #113