Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

57 linhas
2.1 KiB

  1. #!/bin/bash -e
  2. install -v -o 1000 -g 1000 -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  3. install -v -o 1000 -g 1000 -m 755 targets/enable.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  4. install -v -o 1000 -g 1000 -m 755 targets/disable.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  5. install -v -o 1000 -g 1000 -m 755 targets/configure_rbfeeder.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  6. install -v -o 1000 -g 1000 -m 755 targets/configure_fr24feed.sh "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090/"
  7. install -v -o 1000 -g 1000 -m 755 targets/readsb-set-location "${ROOTFS_DIR}/usr/local/bin/"
  8. install -v -o 1000 -g 1000 -m 755 targets/readsb-gain "${ROOTFS_DIR}/usr/local/bin/"
  9. on_chroot << EOF
  10. cd "/home/${FIRST_USER_NAME}/PiSDR/Software/dump1090"
  11. mkdir -p /usr/local/share/adsb-wiki/readsb-install
  12. apt-get update
  13. apt-get install --no-install-recommends --no-install-suggests -y git build-essential debhelper libusb-1.0-0-dev \
  14. pkg-config dh-systemd libncurses5-dev lighttpd zlib1g-dev zlib1g unzip
  15. rm -rf /usr/local/share/adsb-wiki/readsb-install/git
  16. if ! git clone --branch stale --depth 1 https://github.com/wiedehopf/readsb.git "/usr/local/share/adsb-wiki/readsb-install/git"
  17. then
  18. echo "Unable to git clone the repository"
  19. exit 1
  20. fi
  21. rm -rf /usr/local/share/adsb-wiki/readsb-install/readsb*.deb
  22. cd /usr/local/share/adsb-wiki/readsb-install/git
  23. sed -i 's/librtlsdr0, librtlsdr-dev, //g' debian/control
  24. export DEB_BUILD_OPTIONS=noddebs
  25. if ! dpkg-buildpackage -b -Prtlsdr -ui -uc -us
  26. then
  27. echo "Something went wrong building the debian package, exiting!"
  28. exit 1
  29. fi
  30. echo "Installing the Package"
  31. if ! dpkg -i ../readsb_*.deb
  32. then
  33. echo "Something went wrong installing the debian package, exiting!"
  34. exit 1
  35. fi
  36. echo "Package installed!"
  37. cp -n debian/lighttpd/* /etc/lighttpd/conf-available
  38. echo "[PiSDR] Disabling services. To enable them, run 'bash enable.sh'."
  39. systemctl disable --now readsb || true
  40. systemctl disable --now tar1090 || true
  41. systemctl disable --now lighttpd || true
  42. EOF