Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeDNS #24

Merged
merged 81 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
8fb02e6
Merge pull request #1 from nightscout/master
samihusseingit Nov 3, 2019
0b12d17
Merge pull request #2 from nightscout/dev
samihusseingit May 6, 2020
50110ee
Merge pull request #4 from nightscout/master
samihusseingit Oct 15, 2020
10e7b09
Merge pull request #7 from nightscout/master
samihusseingit Nov 28, 2021
1ad4867
prep development area post 14.2.5 release
bewest Dec 10, 2021
c09616c
Add Arabic as an option to translations
sulkaharo Dec 11, 2021
4b38e32
obscure private device provenance
bewest Dec 14, 2021
a2f2751
de facto standard LOW and HIGH values
bewest Dec 15, 2021
6b98e01
ensure obfuscation only affects rendered values
bewest Dec 15, 2021
0de4b94
Merge branch 'dev' into wip/bewest/obscure-provenance
bewest Dec 15, 2021
4b96124
ensre that objects from api/v2 are also obscured
bewest Dec 15, 2021
4e91c91
Merge branch 'wip/bewest/obscure-provenance' of github.com:nightscout…
bewest Dec 15, 2021
5ceb82d
Merge pull request #7249 from nightscout/wip/bewest/obscure-provenance
bewest Dec 15, 2021
aca8d5a
Fixes an issue where treatment units were all rewritten on load, rega…
sulkaharo Jan 5, 2022
4625050
Change deduping interval
MilosKozak Jan 7, 2022
6dc2b2b
mark compatible with node 14 and node 16
bewest Feb 16, 2022
fabd798
add node 16 to supported list
bewest Feb 16, 2022
9ccba7e
Merge pull request #7285 from nightscout/MilosKozak-patch-2
MilosKozak Feb 20, 2022
ded6fa9
Test against nodejs 16.x
viq Mar 2, 2022
5a96281
Fix expiration time on remote notifications for Loop
ps2 Mar 15, 2022
1a356a0
Special reservoir handling for both Eros and DASH
ps2 Mar 18, 2022
47d1831
reservoir level override
ps2 Mar 19, 2022
74495b1
reservoir level override
ps2 Mar 19, 2022
28bf9e1
reservoir level override
ps2 Mar 19, 2022
6f02d51
Remove debug print
ps2 Mar 21, 2022
c8a1a9c
Show automatic bolus decisions from enacted field
ps2 Mar 28, 2022
9ce3920
fix typo
ps2 Mar 28, 2022
ad1bcbf
Merge pull request #7380 from ps2/omnipod-reservoir
bewest Apr 19, 2022
eb8b71c
Merge branch 'dev' into automatic-bolus
bewest Apr 19, 2022
537ed5e
Add sent-at time to notification payload
ps2 Apr 20, 2022
d080b95
Merge remote-tracking branch 'origin/dev' into fix-apns-expiration
ps2 Apr 20, 2022
d53f574
Merge pull request #7375 from ps2/fix-apns-expiration
bewest Apr 21, 2022
555f699
Merge pull request #7385 from ps2/automatic-bolus
bewest Apr 30, 2022
06012e5
Merge branch 'dev' into wip/bewest/upgrade-node
bewest Apr 30, 2022
30cc5ca
Merge pull request #8 from nightscout/master
samihusseingit Jun 27, 2022
38c9a21
Results could be null and crash the website
samihusseingit Jun 29, 2022
e601717
Merge branch 'dev' into master
sulkaharo Jun 29, 2022
a1a2e74
npm install share2nightscout-bridge@^0.2.9
bewest Jun 30, 2022
5cf72ce
npm install minimed-connect-to-nightscout@^1.5.3
bewest Jun 30, 2022
3e2520b
Merge branch 'viq-patch-2' into wip/bewest/upgrade-node
bewest Jun 30, 2022
e715cd2
give automated tests more time to finish
bewest Jun 30, 2022
e72924c
Merge pull request #7468 from samihusseingit/master
bewest Jun 30, 2022
cef684e
Merge branch 'dev' into wip/bewest/upgrade-node
bewest Jun 30, 2022
ead83e0
npm audit fix
bewest Jun 30, 2022
08e2225
Merge branch 'wip/bewest/upgrade-node' of github.com:nightscout/cgm-r…
bewest Jun 30, 2022
0d1aed7
Revert "npm audit fix" due to test failure
bewest Jun 30, 2022
40b7cbf
Merge pull request #7343 from nightscout/wip/bewest/upgrade-node
bewest Jun 30, 2022
27a882f
rm package-lock.json && npm install
bewest Jul 18, 2022
5d0d320
npm install --no-optional
bewest Jul 18, 2022
39936b9
Fix incorrect appending for loop enacted status
ps2 Jul 18, 2022
cd5c983
Merge pull request #7488 from ps2/loop-enacted-fixes
bewest Jul 18, 2022
3e1f459
Merge branch 'dev' into wip/bewest/issue-7475
bewest Jul 18, 2022
c9f3a12
n 10; rm package-lock.json && npm install
bewest Aug 8, 2022
a9dfc76
Merge branch 'wip/bewest/issue-7475' of github.com:nightscout/cgm-rem…
bewest Aug 8, 2022
4172a67
Include remote carb created date
gestrich Aug 13, 2022
b15e436
make github tested workflows and node entines match
bewest Aug 14, 2022
a5c67b5
Merge pull request #7487 from nightscout/wip/bewest/issue-7475
bewest Aug 14, 2022
755bdc9
Merge branch 'dev' into bugfix/remote-carb-created-date
bewest Aug 14, 2022
df85fd2
Merge pull request #7512 from gestrich/bugfix/remote-carb-created-date
bewest Aug 14, 2022
3d9a60d
Build Docker image for arm64 architecture (#7043)
p5nbTgip0r Sep 13, 2022
0bf616b
Merge pull request #7237 from nightscout/dev
bewest Sep 30, 2022
bbbaa62
Merge pull request #33 from jamorham/vps-1
Navid200 Nov 17, 2022
7799744
Merge branch 'nightscout:master' into Navid_2022_11_16_Test
Navid200 Nov 17, 2022
64ceea0
Update run_server_linux.sh
Navid200 Nov 17, 2022
e375f89
Update ConfigureFreedns.sh
Navid200 Nov 17, 2022
134cb7d
Update NS_Install.sh
Navid200 Nov 17, 2022
20dca73
Update NS_Install2.sh
Navid200 Nov 17, 2022
6fd305d
Update Status.sh
Navid200 Nov 17, 2022
7fffd64
Update bootstrap.sh
Navid200 Nov 17, 2022
a98c07f
Update clone_nightscout.sh
Navid200 Nov 17, 2022
a588d54
Update menu.sh
Navid200 Nov 17, 2022
6ce1af5
Update update_nightscout.sh
Navid200 Nov 17, 2022
9fad7fe
Update update_scripts.sh
Navid200 Nov 17, 2022
c184729
Create varserver.sh
Navid200 Nov 17, 2022
7e4d265
Update bootstrap.sh
Navid200 Nov 17, 2022
904419b
Update NS_Install.sh
Navid200 Nov 17, 2022
b8a92df
Update update_scripts.sh
Navid200 Nov 17, 2022
6d33a62
Add files via upload
Navid200 Nov 17, 2022
2d859b0
Add files via upload
Navid200 Nov 17, 2022
9ec0ca7
Merge pull request #35 from Navid200/Navid_2022_11_16_Test
Navid200 Nov 17, 2022
529f991
Update NS_Install2.sh
Navid200 Nov 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 31 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [12.x, 14.x, 16.x]
mongodb-version: [4.2, 4.4]

steps:
Expand All @@ -40,14 +40,19 @@ jobs:
- name: Send Coverage
run: npm run-script coverage

publish_dev:
name: Publish dev branch to Docker Hub
publish:
name: Publish to Docker Hub
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev' && github.repository_owner == 'nightscout'
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.repository_owner == 'nightscout'
env:
DOCKER_IMAGE: nightscout/cgm-remote-monitor
PLATFORMS: linux/amd64,linux/arm64
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
Expand All @@ -57,37 +62,29 @@ jobs:
if: success()
uses: actions/checkout@v2
- name: Build, tag and push the dev Docker image
if: success()
run: |
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} .
docker image push ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }}
docker tag ${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }} ${{ env.DOCKER_IMAGE }}:latest_dev
docker image push ${{ env.DOCKER_IMAGE }}:latest_dev

publish_master:
name: Publish master branch to Docker Hub
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.repository_owner == 'nightscout'
env:
DOCKER_IMAGE: nightscout/cgm-remote-monitor
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
if: success() && github.ref == 'refs/heads/dev'
uses: docker/build-push-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Clean git Checkout
if: success()
uses: actions/checkout@v2
- name: get-npm-version
if: success()
context: .
push: true
no-cache: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:dev_${{ github.sha }}
${{ env.DOCKER_IMAGE }}:latest_dev

- name: Get Nightscout release version
if: success() && github.ref == 'refs/heads/master'
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Build, tag and push the master Docker image
if: success()
run: |
docker build --no-cache=true -t ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} .
docker image push ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
docker tag ${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }} ${{ env.DOCKER_IMAGE }}:latest
docker image push ${{ env.DOCKER_IMAGE }}:latest
if: success() && github.ref == 'refs/heads/master'
uses: docker/build-push-action@v2
with:
context: .
push: true
no-cache: true
platforms: ${{ env.PLATFORMS }}
tags: |
${{ env.DOCKER_IMAGE }}:${{ steps.package-version.outputs.current-version }}
${{ env.DOCKER_IMAGE }}:latest
33 changes: 27 additions & 6 deletions ConfigServer/run_server_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,35 @@ exit 5
fi


# This function kills the exiting server if it exists so that it will not interfeer with the port
function kill_existing_server() {
sudo ps -ef | grep python3.*3389 | grep -v grep | awk '{print $2}' | \
while read -r pid ; do
sudo kill -9 "$pid";
done
}

kill_existing_server


export SECRET_KEY=$(uuidgen)
export ENV_DEBUG=False
export ENV_TOKEN=$(uuidgen)
export NS_CONFIG_FILE=/etc/nsconfig
export SCRIPT_DIR=$( dirname -- "$0"; )


sudo apt-get -y install python3-pip
pip install Django
pip install django-extensions Werkzeug
pip install qrcode

sudo apt-get -y install python3-pip >> /tmp/variables_log 2>&1
pip install Django django-extensions Werkzeug qrcode >> /tmp/variables_log 2>&1

if test -f "/etc/free-dns.sh"; then
. /etc/free-dns.sh
python3 manage.py migrate >> /tmp/variables_log 2>&1
else
export HOSTNAME=$(ls /etc/letsencrypt/live | grep -v README)
fi

python3 $SCRIPT_DIR/manage.py migrate >> /tmp/variables_log 2>&1

#make sure to put this after the migrate, as the migrate might fail.
export KILL_AFTER_IDLE_TIME=900
Expand All @@ -31,4 +48,8 @@ echo "The server will run for 15 minutes, and after that will stop (if not used)
echo

#python3 manage.py runserver 0.0.0.0:3389 >> /tmp/variables_log 2>&1
python3 manage.py runserver_plus 0.0.0.0:3389 --cert-file $CERT_LOCATION/cert.pem --key-file $CERT_LOCATION/privkey.pem >> /tmp/variables_log 2>&1
python3 $SCRIPT_DIR/manage.py runserver_plus 0.0.0.0:3389 --cert-file $CERT_LOCATION/cert.pem --key-file $CERT_LOCATION/privkey.pem >> /tmp/variables_log 2>&1 &

echo press any key to return to the menu. The server will continue to run for 15 minutes until stoped.
read

15 changes: 13 additions & 2 deletions ConfigureFreedns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ if ! grep -q "DIRECTURL" /etc/rc.local; then
echo wget -O /tmp/freedns.txt --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 \$DIRECTURL >> /etc/rc.local
fi

dialog --colors --msgbox " \Zr Developed by the xDrip team \Zn\n\n\
Press enter to proceed. Please be patient as it may take up to 10 minutes to complete." 8 50
clear
# wait for the ip to be updated. This might take up to 10 minutes.

cnt=0
while : ; do
sleep 30
Expand All @@ -175,5 +177,14 @@ while : ; do
done

#Fix the certificate using the new host name.
sudo certbot --nginx -d "$hostname" --redirect
sudo certbot --nginx -d "$hostname" --redirect --agree-tos --no-eff-email

if [ ! -s /etc/letsencrypt/live/"$hostname"/cert.pem ] || [ ! -s /etc/letsencrypt/live/"$hostname"/privkey.pem ]
then
cat > /tmp/FreeDNS_Failed << EOF
Internal error. Must run FreeDNS again.
EOF

dialog --colors --msgbox " \Zr Developed by the xDrip team \Zn\n\nInternal error. Press enter to exit. Then, run FreeDNS Setup again" 9 50
fi

31 changes: 22 additions & 9 deletions NS_Install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@ echo

if [ "`id -u`" != "0" ]
then
echo "Script needs root - execute bootstrap.sh or use sudo bash installation.sh"
echo "Script needs root - use sudo bash NS_Install.sh"
echo "Cannot continue.."
exit 5
fi

dialog --colors --msgbox " \Zr Developed by the xDrip team \Zn\n\n\n\
Some required packages will be installed now.\n\
It will take about 20 minutes.\n
This terminal needs to be kept open.\n\n\
If this is not a good time, you can press escape to cancel." 14 50
Test=0
#Test=1 ################ This line must be commented out before submitting a PR. ##########################

clear
dialog --colors --msgbox " \Zr Developed by the xDrip team \Zn\n\n\
Some required packages will be installed now. It will take about 15 minutes to complete. This terminal needs to be kept open. Press enter to proceed.\n\n\
If this is not a good time, you can press escape now to cancel." 13 50
if [ $? = 255 ]
then
clear
exit
fi
clear

if [ ! -s /var/SWAP ]
then
echo "Creating swap partition"
echo "Creating swap file"
dd if=/dev/zero of=/var/SWAP bs=1M count=2000
chmod 600 /var/SWAP
mkswap /var/SWAP
Expand All @@ -48,17 +51,29 @@ sudo apt-get -y install jq
echo -e "use Nightscout\ndb.createUser({user: \"username\", pwd: \"password\", roles:[\"readWrite\"]})\nquit()" | mongo
echo -e "use admin\ndb.createUser({ user: \"mongoadmin\" , pwd: \"mongoadmin\", roles: [\"userAdminAnyDatabase\", \"dbAdminAnyDatabase\", \"readWriteAnyDatabase\"]})\nquit()" | mongo

sudo apt-get install -y git python gcc g++ make

echo "Installing Node js"

sudo apt-get install -y nodejs npm
sudo apt -y autoremove

cd /srv

echo "Installing Nightscout"

if [ $Test -lt 1 ] # We are not testing.
then

sudo git clone https://github.com/jamorham/nightscout-vps.git
cd nightscout-vps
sudo git checkout vps-1
else # We are testing.

sudo git clone https://github.com/Navid200/cgm-remote-monitor.git
cd cgm-remote-monitor
sudo git checkout Navid_2022_11_16_Test
fi
sudo git pull

sudo npm install
Expand All @@ -68,6 +83,4 @@ for loop in 1 2 3 4 5 6 7 8 9
do
read -t 0.1 dummy
done

clear

Loading