Skip to content
Snippets Groups Projects
Commit c67f2c9e authored by Bob Mottram's avatar Bob Mottram
Browse files

Create music directory if needed

parent 6d375ff8
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,9 @@ function mpd_nextcloud_integration {
read_config_param MY_USERNAME
mpd_nextcloud_dir="/var/www/$NEXTCLOUD_DOMAIN_NAME/data/$MY_USERNAME/files"
if [ -d "$mpd_nextcloud_dir" ]; then
if [ ! -d "${mpd_nextcloud_dir}/Music" ]; then
mkdir "${mpd_nextcloud_dir}/Music"
fi
if ! grep -q "${mpd_nextcloud_dir}/Music" /etc/mpd.conf; then
sed -i "s|music_directory.*|music_directory \"${mpd_nextcloud_dir}/Music\"|g" /etc/mpd.conf
systemctl restart mpd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment