You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so the script fails out of the box for almost everyone who hasn't gone through and done the server- or system-level (i.e., /etc/ file permissions or group permissions, e.g., .rw-rw---- 13,631 mpd media 6 Mar 23:48 /etc/mpd.conf)...
Incidentally, this is one of the main things I was warning about on my repo in the NB at the beginning of the README.md...the other was modifying the permissions and the group settings on the logs and probably how mpd is running so that the user can modify the logs.
I started keeping my config files in ~/.config and i think that's a reasonable place for a .config or, more probably a series of .config files depending on how it's set up. I think that it would make sense for there to be a user-editable .config file that stores some of the key things that are being grabbed from the /etc/mpd.conf like the password, the log and music dir locations, etc.
let's come up with some ideas on how to execute that?
The text was updated successfully, but these errors were encountered:
Making an update-mpd-extended-cfg.py. It will be called by install.sh during install. It can also be used later to update the MPD settings from the mpd.conf to the mpd-extended.cfg. This config file will be used by mpdignore and the scripts in this project. Thus the default mpd-extended.cfg will only have the MPD section. Project/script specific python files will add the MPDIGNORE or MPD-SCRIPTS sections as needed. Seems like the cleanest way, that won't confuse users that aren't using both.
Workflow for update-mpd-extended-cfg.py
Check MPD Installation: The script checks if MPD (Music Player Daemon) is installed on the system.
Search for mpd.conf: It looks for the mpd.conf file in default locations such as /etc/mpd.conf, ~/.mpd/mpd.conf, and ~/.config/mpd/mpd.conf.
Prompt for mpd.conf Path: If the script doesn't find mpd.conf in the default locations, it prompts the user with a yes/no confirmation to manually enter the path to the mpd.conf file.
If the user chooses "Yes," they will be prompted to enter the path to the mpd.conf file.
If the user chooses "No," the script exits gracefully.
Extract Configuration Values: The script extracts relevant configuration values from mpd.conf, including music_directory, playlist_directory, log_file, port, and password.
Update mpd-extended.cfg: It updates the mpd-extended.cfg file located at ~/.config/mpd/mpd-extended.cfg with the extracted configuration values. If any value is missing or cannot be extracted, appropriate warnings are displayed.
Completion Message: Once the update is completed, a message is displayed indicating successful completion.
Manual Intervention: If the script encounters errors or cannot find mpd.conf, it prompts the user for manual intervention, allowing them to enter the correct path if they select yes. If they select no, then the script exits gracefully as they cannot provide the required information.
Run Again for Updates: Users can run the script again in the future to update mpd-extended.cfg if any changes are made to mpd.conf.
So I ran this on my laptop and Kellerman has mpd install the default mpd.conf with permissions:
so the script fails out of the box for almost everyone who hasn't gone through and done the server- or system-level (i.e., /etc/ file permissions or group permissions, e.g.,
.rw-rw---- 13,631 mpd media 6 Mar 23:48 /etc/mpd.conf
)...Incidentally, this is one of the main things I was warning about on my repo in the NB at the beginning of the README.md...the other was modifying the permissions and the group settings on the logs and probably how mpd is running so that the user can modify the logs.
I started keeping my config files in ~/.config and i think that's a reasonable place for a .config or, more probably a series of .config files depending on how it's set up. I think that it would make sense for there to be a user-editable .config file that stores some of the key things that are being grabbed from the
/etc/mpd.conf
like the password, the log and music dir locations, etc.let's come up with some ideas on how to execute that?
The text was updated successfully, but these errors were encountered: