Script to mount music on external USB stick

This commit is contained in:
Bob Mottram 2014-09-14 20:44:42 +01:00
parent 1ce7e39176
commit 0c9bb21c94
1 changed files with 19 additions and 2 deletions

View File

@ -7182,11 +7182,28 @@ The easiest way to add your music is to obtain a large capacity USB stick, copy
So with the USB stick plugged in and logged into the BBB as root via ssh:
#+BEGIN_SRC: bash
mount /dev/sda1 /var/music
chown -R subsonic:subsonic /var/music
editor /usr/bin/attach-music
#+END_SRC
Add the following:
#+BEGIN_SRC: bash
#!/bin/bash
mount /dev/sda1 /var/music
chown -R root:root /var/music
chown -R subsonic:subsonic /var/music/*
#+END_SRC
Save and exit
#+BEGIN_SRC: bash
chmod +x /usr/bin/attach-music
#+END_SRC
Then just typing "attach-music" on the command line will mount the USB drive.
Then within a browser go to your Subsonic domain name, log in as the administrator, select *settings*, then *Media folders* then *Scan media folders now*. Depending upon how much music you have this could take a while, so don't be too impatient. WHen It's complete you can log out and log back in as a user.
*** Android App
Within [[https://f-droid.org/][F-Droid]] search for *Dsub* and install it.