MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.34k stars 396 forks source link

🐛 | Poweroff_Command is ignored #1675

Open passuff opened 2 years ago

passuff commented 2 years ago

Bug

What I did

Edited settings\Poweroff_Command file and pressed "shutdown" in web view.

What happened

File is ignored, Raspberry still using default sudo poweroff

I expected this to happen

Execution of my commands.

Further information that might help

I think that the setting from global.conf is used :

POWEROFFCMD="sudo poweroff"

Software

Base image and version

Bullseye

Branch / Release

fresh development install

Installscript

Custom Bullseye Install Script

How do I need to change global.conf to use the Poweroff_Command content?

passuff commented 2 years ago

Just confirmed it with buster and a fresh development install. Will try with stable now...

passuff commented 2 years ago

same for stable release - Poweroff_Command file is still ignored.

taulpi commented 2 years ago

Settings seem to be transfered to global.conf by scripts/inc.writeGlobalConfig.sh, which is not run automatically when you make changes to settings files. You could try running it manually or making your change in both global.conf and Poweroff_Command for now

s-martin commented 1 year ago

Can you check, if the issue still persists with current 2.4 version?

passuff commented 1 year ago

I'm not having access to a working system as I switched to Mupibox project.

s-martin commented 1 year ago

Settings seem to be transfered to global.conf by scripts/inc.writeGlobalConfig.sh, which is not run automatically when you make changes to settings files. You could try running it manually or making your change in both global.conf and Poweroff_Command for now

I agree. As far is I can see, POWEROFFCMD is only written here: https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/96a2a5f884d9746bc60f53479d3b4ad50569103f/scripts/inc.writeGlobalConfig.sh#L221

I need to check, if we have documented how to change settings correctly. As far as I see this is valid for all the other settings as well.