airtime-nuke.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. if [[ $EUID -ne 0 ]]; then
  3. echo "This script must be run as root." 1>&2
  4. exit 1
  5. fi
  6. echo "This script deletes all traces of Airtime from your system,"
  7. echo "including files uploaded through the web interface."
  8. echo "It will delete files from all known versions of Airtime."
  9. echo
  10. echo "Are you sure you want to do this? Press Enter to continue..."
  11. read
  12. service airtime-playout stop >/dev/null 2>&1
  13. service airtime-liquidsoap stop >/dev/null 2>&1
  14. service airtime-media-monitor stop >/dev/null 2>&1
  15. service airtime-show-recorder stop >/dev/null 2>&1
  16. airtime-pypo-stop >/dev/null 2>&1
  17. airtime-show-recorder-stop >/dev/null 2>&1
  18. killall liquidsoap
  19. rm -rf "/etc/airtime"
  20. rm -rf "/var/log/airtime"
  21. rm -rf "/etc/service/pypo"
  22. rm -rf "/etc/service/pypo-liquidsoap"
  23. rm -rf "/etc/service/recorder"
  24. rm -rf "/usr/share/airtime"
  25. rm -rf "/var/tmp/airtime"
  26. rm -rf "/var/www/airtime"
  27. rm -rf "/usr/bin/airtime-*"
  28. rm -rf "/usr/lib/airtime"
  29. rm -rf "/var/lib/airtime"
  30. rm -rf "/var/tmp/airtime"
  31. rm -rf "/opt/pypo"
  32. rm -rf "/opt/recorder"
  33. rm -rf "/srv/airtime"
  34. rm -rf "/etc/monit/conf.d/airtime-monit.cfg"
  35. rm -rf /etc/monit/conf.d/monit-airtime-*
  36. echo "DROP DATABASE AIRTIME;" | su postgres -c psql
  37. echo "DROP LANGUAGE plpgsql;" | su postgres -c psql
  38. echo "DROP USER AIRTIME;" | su postgres -c psql