mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-22 15:02:23 +00:00
14 lines
339 B
Plaintext
14 lines
339 B
Plaintext
|
#!/bin/bash
|
||
|
while true; do
|
||
|
if [ `jq ".uuid | length" $CONFIG_PATH` -eq 0 ]; then
|
||
|
echo "UUID missing from config file, VPN cannot connect"
|
||
|
sleep 2
|
||
|
else
|
||
|
read uuid api_key <<<$(jq -r '.uuid,.apiKey' $CONFIG_PATH)
|
||
|
mkdir -p /var/volatile/
|
||
|
echo $uuid > /var/volatile/vpnfile
|
||
|
echo $api_key >> /var/volatile/vpnfile
|
||
|
break
|
||
|
fi
|
||
|
done
|