mirror of https://github.com/itsmrval/accessGate
Update update.sh
parent
552d7949d2
commit
0f64bda547
|
|
@ -11,17 +11,9 @@ then
|
||||||
touch $old_file
|
touch $old_file
|
||||||
cmp --silent $old_file $tmp_file || isDifferent="true"
|
cmp --silent $old_file $tmp_file || isDifferent="true"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "$isDifferent"
|
|
||||||
|
|
||||||
if [ "$isDifferent" = "true" ]
|
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
|
||||||
|
|
@ -47,3 +39,4 @@ 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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue