CC-3265: Move airtime-nuke.sh to utils. Done. Also added user message explaining what the script does and prevent non-root users from executing the script.

This commit is contained in:
paul.baranowski 2012-02-11 19:27:20 +01:00
parent 941da1fe44
commit 7e223aebae
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,15 @@
#!/bin/bash
echo "Are you sure? Press Enter to continue..."
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." 1>&2
exit 1
fi
echo "This script deletes all traces of Airtime from your system,"
echo "including files uploaded through the web interface."
echo "It will delete files from all known versions of Airtime."
echo
echo "Are you sure you want to do this? Press Enter to continue..."
read
service airtime-playout stop >/dev/null 2>&1