瀏覽代碼

Script to mount music on external USB stick

Bob Mottram 10 年之前
父節點
當前提交
0c9bb21c94
共有 1 個檔案被更改,包括 18 行新增1 行删除
  1. 18
    1
      beaglebone.txt

+ 18
- 1
beaglebone.txt 查看文件

7182
 So with the USB stick plugged in and logged into the BBB as root via ssh:
7182
 So with the USB stick plugged in and logged into the BBB as root via ssh:
7183
 
7183
 
7184
 #+BEGIN_SRC: bash
7184
 #+BEGIN_SRC: bash
7185
+editor /usr/bin/attach-music
7186
+#+END_SRC
7187
+
7188
+Add the following:
7189
+
7190
+#+BEGIN_SRC: bash
7191
+#!/bin/bash
7185
 mount /dev/sda1 /var/music
7192
 mount /dev/sda1 /var/music
7186
-chown -R subsonic:subsonic /var/music
7193
+chown -R root:root /var/music
7194
+chown -R subsonic:subsonic /var/music/*
7187
 #+END_SRC
7195
 #+END_SRC
7188
 
7196
 
7197
+Save and exit
7198
+
7199
+#+BEGIN_SRC: bash
7200
+chmod +x /usr/bin/attach-music
7201
+#+END_SRC
7202
+
7203
+Then just typing "attach-music" on the command line will mount the USB drive.
7204
+
7189
 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.
7205
 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.
7206
+
7190
 *** Android App
7207
 *** Android App
7191
 Within [[https://f-droid.org/][F-Droid]] search for *Dsub* and install it.
7208
 Within [[https://f-droid.org/][F-Droid]] search for *Dsub* and install it.
7192
 
7209