update_libseccomp2.sh 822 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. function error {
  3. echo -e "\\e[91m$1\\e[39m"
  4. exit 1
  5. }
  6. function check_internet() {
  7. printf "Checking if you are online..."
  8. wget -q --spider http://github.com
  9. if [ $? -eq 0 ]; then
  10. echo "Online. Continuing."
  11. else
  12. error "Offline. Go connect to the internet then run the script again."
  13. fi
  14. }
  15. check_internet
  16. echo "Libseccomp2 upgrade needed if you run rpi 32bit. Check version with 'dpkg-query -W libseccomp'. if the version is 2.3 or below, this script is necessary."
  17. wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.4-1+b1_armhf.deb || error "Failed to download libseccomp2.deb"
  18. sudo dpkg -i libseccomp2_2.5.4-1+b1_armhf.deb || error "Failed to install libseccomp2.deb"
  19. rm -f libseccomp2_2.5.4-1+b1_armhf.deb
  20. echo "Updating the libseccomp2 file is complete."