Update update.sh

scripts
Valentin 2023-09-16 19:54:41 +02:00 committed by GitHub
parent 552d7949d2
commit 0f64bda547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -10,18 +10,10 @@ then
curl -o $tmp_file -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server/users
touch $old_file
cmp --silent $old_file $tmp_file || isDifferent="true"
echo "$isDifferent"
if [ "$isDifferent" = "true" ]
then
echo "oazioajslkvklxjgklfxgjcfklgjfxklgjxklfgk"
for x in $(head $old_file)
do
deluser $x
@ -47,3 +39,4 @@ else
mkdir -p /$user/.ssh/
curl -o /$user/.ssh/authorized_keys -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server/allKeys
fi