Skip to content

Commit

Permalink
Improve scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Aug 30, 2022
1 parent 4605a08 commit 3c4178c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 9 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ echo "UNABLE TO DOWNLOAD INSTALLATION SCRIPT! - cannot continue - please try aga
exit 5
fi
fi


if [ "$SSH_TTY" = "" ]
then
echo "Must be run from ssh session"
exit 5
fi

echo
echo "Running installer"
echo
sudo bash installation.sh
sudo < $SSH_TTY bash installation.sh
echo
echo "Finished running installer"
echo


12 changes: 8 additions & 4 deletions installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ sudo apt-get -y install mongodb-server
echo -e "use Nightscout\ndb.createUser({user: \"username\", pwd: \"password\", roles:[\"readWrite\"]})\nquit()" | mongo


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

echo "Installing Node js"

sudo apt-get install -y nodejs

sudo apt-get install -y nodejs npm
sudo apt -y autoremove
cd /tmp
cd /srv

Expand All @@ -54,11 +54,15 @@ sudo git pull
sudo npm install
sudo npm run generate-keys

for loop in 1 2 3 4 5 6 7 8 9
do
read -t 0.1 dummy
done

if [ ! -s /usr/local/etc/no-ip2.conf ]
then
cd /usr/src
sudo tar -xzvf /srv/nightscout-vps/helper/noip-duc-linux.tar.gz
sudo tar -xzf /srv/nightscout-vps/helper/noip-duc-linux.tar.gz
cd /usr/src/noip-2.1.9-1
sudo make install
else
Expand Down

0 comments on commit 3c4178c

Please sign in to comment.