mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Don't prompt for token
This commit is contained in:
parent
9de74886b6
commit
b3d81d2f43
1 changed files with 3 additions and 7 deletions
|
|
@ -95,17 +95,13 @@ main() {
|
||||||
|
|
||||||
# Check if we're running as root
|
# Check if we're running as root
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
error "Root privileges required. Please run with sudo: sudo sh $0 --token <TOKEN>"
|
error "Root privileges required. Please re-run with sudo, e.g.: curl -fsSL <url> | sudo sh -s -- --token <TOKEN>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prompt for token if not provided via CLI
|
# Check if token is provided via command argument
|
||||||
if [ -z "$TOKEN" ]; then
|
|
||||||
printf "Enter your Aikido endpoint token: "
|
|
||||||
read -r TOKEN
|
|
||||||
if [ -z "$TOKEN" ]; then
|
if [ -z "$TOKEN" ]; then
|
||||||
error "Token is required. Pass it with --token <TOKEN> or enter it when prompted."
|
error "Token is required. Pass it with --token <TOKEN> or enter it when prompted."
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# 2. Download and verify checksum
|
# 2. Download and verify checksum
|
||||||
PKG_FILE=$(mktemp /tmp/SafeChainUltimate.XXXXXX.pkg)
|
PKG_FILE=$(mktemp /tmp/SafeChainUltimate.XXXXXX.pkg)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue