From 7e223aebae67a2c55bc36ac3aa7af4a92b5dbdff Mon Sep 17 00:00:00 2001 From: "paul.baranowski" Date: Sat, 11 Feb 2012 19:27:20 +0100 Subject: [PATCH] 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. --- {dev_tools => utils}/airtime-nuke.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) rename {dev_tools => utils}/airtime-nuke.sh (71%) diff --git a/dev_tools/airtime-nuke.sh b/utils/airtime-nuke.sh similarity index 71% rename from dev_tools/airtime-nuke.sh rename to utils/airtime-nuke.sh index d0d199a53..9befaad38 100755 --- a/dev_tools/airtime-nuke.sh +++ b/utils/airtime-nuke.sh @@ -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