diff --git a/add.sh b/add.sh new file mode 100644 index 0000000..d161310 --- /dev/null +++ b/add.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +while [[ ! "$subdomain" =~ ^[a-zA-Z0-9-]+$ ]]; do + echo + echo "Enter the name of the subdomain where your Nightscout will be available:" + read subdomain +done +secret=$(cat /proc/sys/kernel/random/uuid) + +cat >> docker-compose.yml <> .env echo -echo Now enter domain name you Nightscout will be hosted at: -echo Введите имя домена, на котором ваш Nightscout будет доступен: +echo Now enter the domain name you Nightscout will be hosted at, excluding the subdomain: read domain echo "NS_DOMAIN=$domain" >> .env echo -secret=$(cat /proc/sys/kernel/random/uuid) -echo "NS_SECRET=$secret" >> .env - curl https://raw.githubusercontent.com/justmara/ns-setup/main/docker-compose.yml --output docker-compose.yml -sudo docker compose up -d - -echo "Your secret for Nightscout access (write it down!):" -echo "Ваш секретный ключ для доступа к Nightscout (запишите!):" -echo "secret: $secret" -echo "email: $email" -echo "domain: $domain" \ No newline at end of file +bash <(wget -qO- https://raw.githubusercontent.com/justmara/ns-setup/main/add.sh)