#!/bin/sh echo "Docker" rm -f /var/lib/pacman/sync/* pacman -Syy pacman --noconfirm -S git pacman --noconfirm -S docker-compose pacman --noconfirm -S docker systemctl daemon-reload systemctl start docker.service systemctl enable docker.service if [ -e /etc/systemd/system/tidal.service ]; then systemctl disable tidal.service rm -f /etc/systemd/system/tidal.service fi echo "Clone Source" git clone https://github.com/GioF71/tidal-connect.git cd /tmp wget https://raw.githubusercontent.com/lovehifi/tidal-raudio-pi4/main/entrypoint.sh wget https://raw.githubusercontent.com/lovehifi/tidal-raudio-pi4/main/tidal.service wget https://raw.githubusercontent.com/lovehifi/tidal-raudio-pi4/main/env wget https://raw.githubusercontent.com/lovehifi/tidal-raudio-pi4/main/docker-compose.yaml chmod -R 755 /tmp/entrypoint.sh chmod -R 755 /tmp/tidal.service cp -f /tmp/entrypoint.sh /root/tidal-connect/bin/ cp -f /tmp/tidal.service /etc/systemd/system/ cp -f /tmp/env /root/tidal-connect/.env cp -f /tmp/docker-compose.yaml /root/tidal-connect/ cd /root/tidal-connect git pull echo "Build Docker" docker-compose up -d #docker-compose up -d --force-recreate sleep 1 echo "Remove the text ipv6.disable=1 in /boot/cmdline.txt" cp /boot/cmdline.txt /boot/cmdline.txt.backup && sed -i '0,/ipv6.disable=1/{s/ipv6.disable=1//}' /boot/cmdline.txt sleep 1 if grep -q "dtparam=audio=on" /boot/config.txt; then sudo sed -i '/dtparam=audio=on/d' /boot/config.txt else echo "No dtparam=audio=on" fi echo "Off the sound onboard" grep -q "dtparam=audio=off" /boot/config.txt if [ $? -eq 0 ]; then echo "onboard off" else echo "dtparam=audio=off" | sudo tee -a /boot/config.txt echo "onboard to off" fi systemctl daemon-reload systemctl enable tidal.service systemctl restart tidal.service #reboot