This commit is contained in:
Adolfo Delorenzo 2024-01-03 18:20:55 -06:00
parent e4ba069fa7
commit 2cc8ed2bb1
1 changed files with 2 additions and 1 deletions

View File

@ -28,5 +28,6 @@ $1
vpn_port=`python3 /opt/thekube/ports.py`
lxc config device add $random-vpn-server udp$vpn_port proxy listen=udp:0.0.0.0:$vpn_port connect=udp:127.0.0.1:51820
curl --silent -X PUT --user "adelorenzo:dimi2014" https://couchdb.oe74.cloud/kk_users/${random}/${random} -d "{"_id":"$random"}"
#random_rev=`curl --silent -X GET https://adelorenzo:dimi2014@couchdb.oe74.cloud/kk_users/$random | jq -c '._rev' | sed 's/^.//' | sed 's/.$//'`
random_rev=`curl --silent -X GET https://adelorenzo:dimi2014@couchdb.oe74.cloud/kk_users/$random | jq -c '._rev' | sed 's/^.//' | sed 's/.$//'`
curl --silent -X GET --user "adelorenzo:dimi2014" https://couchdb.oe74.cloud/kk_users/$random | jq '(.["port"] = '$udp_port"')' > $random-port.temp
#curl --silent -H "Content-Type: text/x-yaml" -X PUT --data-binary @${random}-wg_server.yaml --user "adelorenzo:dimi2014" "https://couchdb.oe74.cloud/kk_users/${random}/${random}-wg_server.yaml?rev=$random_rev" > /dev/null