From d7ee428baa06ce428705d793246f720c347442cb Mon Sep 17 00:00:00 2001 From: Purple Date: Fri, 7 Feb 2025 19:03:18 +0000 Subject: [PATCH] added message if not run as sudo --- Mac/tstools.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mac/tstools.sh b/Mac/tstools.sh index 7dbf08c..f59cada 100755 --- a/Mac/tstools.sh +++ b/Mac/tstools.sh @@ -22,12 +22,19 @@ # tstools.sh - Must be run with Sudo or MDM # Last Updated by Purple, 05/02/2025 #################################################################################################### + +if [ "$EUID" -ne 0 ] +then printf "\033[1;31mError: Please run: sudo tstools\033[0m\n" +exit +fi + + SYMLINK="/usr/local/bin/tstools" TARGET="/Library/Application Support/Purple/tstools.sh" mkdir -p "/Library/Application Support/Purple/" DA=$(date +%s) sudo curl -fsSL -o /tmp/tailscale-$DA.sh https://prpl.uk/tailscalesh -# sudo curl -fsSL -o $TARGET https://prpl.uk/tailscaletools +sudo curl -fsSL -o $TARGET https://prpl.uk/tailscaletools source /tmp/tailscale-$DA.sh