Update update.sh

scripts
Valentin 2023-09-13 15:25:46 +02:00 committed by GitHub
parent 8ec8d1db10
commit 49e954c648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,11 @@
#! /bin/bash #! /bin/bash
. /opt/accessgate/config.txt . /opt/accessgate/config.txt
curl -o /root/.ssh/authorized_keys -s -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server
if [ $user != "root" ]
then
user="home/$user"
fi
curl -o /$user/.ssh/authorized_keys -s -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server