added message if not run as sudo

This commit is contained in:
Purple
2025-02-07 19:03:18 +00:00
parent 9073e5cd41
commit d7ee428baa

View File

@@ -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