Added notify-app if/else block so can run on new staging and preview

This commit is contained in:
Martyn Inglis
2016-07-04 16:17:07 +01:00
parent ce9f2e808b
commit 0933c153ea
2 changed files with 27 additions and 6 deletions

View File

@@ -1,5 +1,14 @@
#!/bin/bash
echo "Chown application to be owned by ubuntu"
cd /home/ubuntu/;
chown -R ubuntu:ubuntu notifications-api
if [ -e "/home/notify-app" ]
then
echo "Chown application to be owned by notify-app"
cd /home/notify-app/;
chown -R notify-app:govuk-notify-applications notifications-api
fi
else
echo "Chown application to be owned by ubuntu"
cd /home/ubuntu/;
chown -R ubuntu:ubuntu notifications-api
fi

View File

@@ -1,4 +1,16 @@
echo "Install dependencies"
cd /home/ubuntu/notifications-api;
pip3 install -r /home/ubuntu/notifications-api/requirements.txt
python3 db.py db upgrade
if [ -e "/home/notify-app" ]
then
echo "Depenencies for notify-app"
cd /home/ubuntu/notifications-api;
pip3 install -r /home/notify-app/notifications-api/requirements.txt
python3 db.py db upgrade
fi
else
echo "Depenencies for ubuntu"
cd /home/ubuntu/notifications-api;
pip3 install -r /home/ubuntu/notifications-api/requirements.txt
python3 db.py db upgrade
fi