diff --git a/doc/4-SETUP.rst b/doc/4-SETUP.rst index fca1a75..4a0401f 100644 --- a/doc/4-SETUP.rst +++ b/doc/4-SETUP.rst @@ -141,7 +141,14 @@ The following options are available : Run --- -To start the server, just run ``./be-server``, or ``sudo systemctl start be-server.service`` if the server has been daemonized_. +To test the server, the location of KArchive binary is required to run the program correctly:: + + $ export LD_LIBRARY_PATH=:/usr/local/lib/arm-linux-gnueabihf/ + $ ./be-server + +Or, if the server has been daemonized_ (you can't give arguments to the command in that case):: + + $ sudo systemctl start be-server.service The following options are available : diff --git a/share/99-usbMusique.rules b/share/99-usbMusique.rules deleted file mode 100644 index ae4575d..0000000 --- a/share/99-usbMusique.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd[a-z]1", RUN +="/bin/mount -o dmask=777,fmask=777 /dev/%k /media/song_usb", RUN+="/usr/local/bin/musique.sh" diff --git a/share/musique.sh b/share/musique.sh index ce4e68f..035dee4 100755 --- a/share/musique.sh +++ b/share/musique.sh @@ -1,17 +1,22 @@ #!/bin/bash ###### -# Chercher tous les fichiers .song sur la clef USB -# Les copiers dans /home/ubuntu/songs +# Copy the $extension files from the root folder (/) +# of a USB key to the $destination folder +# +# $1 : USB key's kernel name ###### +extension="song" +destination="/home/pi/songs" + #export DISPLAY=":0" #notify-send "Copying new songs... Please wait." gpio mode 5 out gpio write 5 1 -cp -n /media/song_usb/*.song /home/ubuntu/songs +cp -n /dev/$1/*.$extension $destination sync umount /media/song_usb