From 3525bf21b7c14ba359504eca63b8d61cc88d0c8b Mon Sep 17 00:00:00 2001 From: Valentin <43043885+itsmrval@users.noreply.github.com> Date: Thu, 14 Sep 2023 23:13:01 +0200 Subject: [PATCH] Update agent.sh --- agent.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent.sh b/agent.sh index cf3fa60..252a9f8 100644 --- a/agent.sh +++ b/agent.sh @@ -4,7 +4,7 @@ url=$1 server=$2 secret=$3 user=$4 -rootpath="/opt/accessgate" +rootpath="/opt/accessgate_agent" updateScriptUrl=https://raw.githubusercontent.com/itsmrval/accessgate/scripts/update.sh @@ -32,7 +32,7 @@ echo -ne "✓\n" echo -ne "[INFO] Testing parameters.. " -secretRequest=$(curl -s -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server) +secretRequest=$(curl -s -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server/users) if [ "$secretRequest" = "invalid request" ] then @@ -60,7 +60,7 @@ echo -ne "✓\n" echo -n "[INFO] Creating crontab entry.. " -(crontab -u root -l; echo "* * * * * /bin/sh /opt/accessgate/update.sh" ) | crontab -u root - +(crontab -u root -l; echo "* * * * * /bin/sh /opt/accessgate_agent/update.sh" ) | crontab -u root - sleep 0.5 echo -ne "✓\n"