1
0
mirror of synced 2025-12-28 00:23:25 +00:00

Update update.sh

This commit is contained in:
Valentin
2023-09-13 15:25:46 +02:00
committed by GitHub
parent 8ec8d1db10
commit 49e954c648

View File

@@ -1,4 +1,11 @@
#! /bin/bash
. /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