diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-10-02 19:51:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-10-02 19:51:26 -0300 |
commit | fda68481bfcb2119788006f47dc0dd3d096109f7 (patch) | |
tree | 3e5cd708375c60835119e3da117b27de25ce91d5 /files | |
parent | 53621683b7e7c09967f488e122f2231fd772483b (diff) | |
download | puppet-backup-fda68481bfcb2119788006f47dc0dd3d096109f7.tar.gz puppet-backup-fda68481bfcb2119788006f47dc0dd3d096109f7.tar.bz2 |
More fixes into sync-media
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 |