aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-18 14:17:12 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-18 14:17:12 -0300
commit9db66cf8a336b080677c4b119d5c83f79e8d7329 (patch)
tree72a1910b8c67a027d9d412e5c0eafdcd7765b295
parentdfc22eff6a7296d62164da0577725a51d31ee18d (diff)
downloadpuppet-backup-9db66cf8a336b080677c4b119d5c83f79e8d7329.tar.gz
puppet-backup-9db66cf8a336b080677c4b119d5c83f79e8d7329.tar.bz2
If there is a playlists folder, make sure mpd user can write to it on sync-media
-rw-r--r--files/sync-media8
1 files changed, 8 insertions, 0 deletions
diff --git a/files/sync-media b/files/sync-media
index dfeabeb..331294f 100644
--- a/files/sync-media
+++ b/files/sync-media
@@ -89,6 +89,14 @@ if [ -d "$CACHE" ]; then
(
cd $CACHE/$folder
echo "Syncing $CACHE/$folder..."
+
+ # If there is a playlists folder, make sure mpd user can write to it
+ if [ -d "playlists" ]; then
+ $sudo chmod 775 playlists
+ $sudo chown -R mpd.audio playlists
+ $sudo chmod 664 playlists/*
+ fi
+
sync_media_identity
sync_media_add
git annex sync