diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/sync-media | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/files/sync-media b/files/sync-media index 27ca5af..6cdbc00 100644 --- a/files/sync-media +++ b/files/sync-media @@ -149,7 +149,7 @@ if [ -d "$CACHE" ]; then cd $VOLUME/$MEDIA echo "Initializing $VOLUME/$MEDIA/$folder..." git clone $CACHE/$folder && cd $folder && sync_media_identity && git annex init $DRIVE && \ - cd $CACHE/$folder && git remote add $DRIVE $VOLUME/$MEDIA/$folder + git remote rename origin $HOST && cd $CACHE/$folder && git remote add $DRIVE $VOLUME/$MEDIA/$folder ) fi elif [ ! -d "$VOLUME/$MEDIA/$folder" ]; then @@ -181,6 +181,14 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then git remote add $HOST $CACHE/$folder fi + # 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 + find playlists -type f -exec sudo chmod 664 {} \; + find playlists -type d -exec sudo chmod 775 {} \; + fi + sync_media_identity sync_media_add git annex sync |