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

Update update.sh

This commit is contained in:
Valentin
2023-09-16 17:19:53 +02:00
committed by GitHub
parent bcafc8d41b
commit 552d7949d2

View File

@@ -9,10 +9,19 @@ then
isDifferent=false isDifferent=false
curl -o $tmp_file -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server/users curl -o $tmp_file -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server/users
touch $old_file 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 then
echo "oazioajslkvklxjgklfxgjcfklgjfxklgjxklfgk"
for x in $(head $old_file) for x in $(head $old_file)
do do
deluser $x deluser $x
@@ -38,5 +47,3 @@ else
mkdir -p /$user/.ssh/ 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 curl -o /$user/.ssh/authorized_keys -X GET -H 'Content-Type: application/json' -d '{"secret": "'$secret'"}' $url/endpoint/update/$server/allKeys
fi