From 552d7949d2adf04d14bf2c76f074c95a164421cb Mon Sep 17 00:00:00 2001 From: Valentin <43043885+itsmrval@users.noreply.github.com> Date: Sat, 16 Sep 2023 17:19:53 +0200 Subject: [PATCH] Update update.sh --- update.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index 643bab1..979eedc 100644 --- a/update.sh +++ b/update.sh @@ -9,10 +9,19 @@ then isDifferent=false 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 + cmp --silent $old_file $tmp_file || isDifferent="true" - if [ isDifferent = "true" ] + + + + + echo "$isDifferent" + + if [ "$isDifferent" = "true" ] then + + echo "oazioajslkvklxjgklfxgjcfklgjfxklgjxklfgk" + for x in $(head $old_file) do deluser $x @@ -38,5 +47,3 @@ 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