[IDEA] write protection for mpd.conf - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: [IDEA] write protection for mpd.conf (/showthread.php?tid=6159) |
write protection for mpd.conf - shiri1999 - 01-17-2024 Dear all, situation: - moodeaudio player in the LAN - additional central mpd db server along with a NAS hosting music (e.g. OMV and r/o nfs) problem: - inserting values pointing out the central db server in mpd.conf leads to those changes being overwritten by the webUI sooner than later and the old db file entry is back (along with all other possible manually changes) note: - if a central db server is used all clients MUST stick to the same paths where the music is stored, otherwise it won't work temporary solution: - using "chattr +i /etc/mpd.conf" because a "chmod 444 /etc/mpd.conf" was not sufficient - works but is not very elegant possible solutions: 1- add a dev mode that just protects the mpd.conf (and maybe remove the mpd.conf entry completely from webUI) along with a note "you are on your own - risk - if you change mpd.conf manually") 2- add a dev mode as above but write into a different file so that those changes can be written back later if the dev mode is removed along with a note above that states what is actually done, so removing the dev mode results in searching for this temporary file and using it to overwrite mpd.conf and backup the manually dev-created/-changed mpd.conf. 3- add for the db issue (central or locally) a switch that uses either a file or a central server along with a note about the db server requiring identical paths on all clients. Although this won't be that much effort, other possible changes in mpd.conf are still not possible, so a dev mode may be more efficient for those who want to change the mpd.conf manually. Probably not that much people use it that way, but the speed of a central db mpd server based on SSD along with music is pretty nice and not that difficult to set up. experiences: - I use that approach (manually writing mpd.conf, protecting it with 'chattr +i') along with a central db server and central NAS for a long time and it works pretty well. The central mpd server can also be used from different clients (e.g. the libreelec people were so nice to add mpd server after request so one has a lot of possiblities for a multiroom approach). best wishes RE: write protection for mpd.conf - Tim Curtis - 01-17-2024 Try the dev tweaks feature https://moodeaudio.org/forum/showthread.php?tid=5706&pid=47753#pid47753 A past post from @cprogrammer on MPD satellite mode https://moodeaudio.org/forum/showthread.php?tid=3992&pid=36745#pid36745 Another from @cprogrammer on sticker database https://moodeaudio.org/forum/showthread.php?tid=2674&pid=36747#pid36747 RE: write protection for mpd.conf - bitlab - 01-17-2024 See https://github.com/moode-player/moode/issues/156 for more information about the use of this option. |