From c9ea11779e3e9ccde8c0863d15cd3ceadcbda1c1 Mon Sep 17 00:00:00 2001 From: Markus Prochaska <–3446968+ProchaskaMarkus@users.noreply.github.com> Date: Thu, 2 Jul 2020 19:06:49 +0200 Subject: [PATCH] Added Multi REader registration to buster-install-default.sh as extra option --- .../installscripts/buster-install-default.sh | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/installscripts/buster-install-default.sh b/scripts/installscripts/buster-install-default.sh index 744ce54d9..26241e901 100755 --- a/scripts/installscripts/buster-install-default.sh +++ b/scripts/installscripts/buster-install-default.sh @@ -1107,19 +1107,34 @@ finish_installation() { [nN][oO]|[nN]) ;; *) - echo 'Please select an option to install RFID readers' - options=("Auto configure USB (e.g. Neuftech), RC522 or PN532 raders" "Manual configuration") + echo 'Please select the RFID reader you want to use' + options=("USB-Reader (e.g. Neuftech)" "RC522" "PN532" "Manual configuration" "Multiple RFID reader") select opt in "${options[@]}"; do case $opt in - "Auto configure USB (e.g. Neuftech), RC522 or PN532 raders") + "USB-Reader (e.g. Neuftech)") cd "${jukebox_dir}"/scripts/ || exit - sudo python3 RegisterDevice.py.Multi + python3 RegisterDevice.py + sudo chown pi:www-data "${jukebox_dir}"/scripts/deviceName.txt + sudo chmod 644 "${jukebox_dir}"/scripts/deviceName.txt + break + ;; + "RC522") + bash "${jukebox_dir}"/components/rfid-reader/RC522/setup_rc522.sh + break + ;; + "PN532") + bash "${jukebox_dir}"/components/rfid-reader/PN532/setup_pn532.sh break ;; "Manual configuration") echo "Please configure your reader manually." break ;; + "Multiple RFID reader") + cd "${jukebox_dir}"/scripts/ || exit + sudo python3 RegisterDevice.py.Multi + break + ;; *) echo "This is not a number" ;;