Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

Commit

Permalink
Added update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlton Duffett committed Jun 28, 2017
1 parent 4cb7165 commit 33a9f3a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/update_gofhir.sh
@@ -0,0 +1,22 @@
#!/bin/bash

gofhirpath=$GOPATH/src/github.com/synthetichealth/gofhir
optdir=/opt/gofhir
branch=stu3_jan2017

here=`pwd`

echo "Fetching latest..."
cd $gofhirpath
git checkout $branch
git pull
echo "Building..."
go build
echo "Stopping gofhir-auto.service..."
sudo systemctl stop gofhir-auto.service
echo "Moving files..."
sudo cp gofhir $optdir
echo "Restarting gofhir-auto.service..."
sudo systemctl start gofhir-auto.service
cd $here
echo "Done"
23 changes: 23 additions & 0 deletions scripts/update_site.sh
@@ -0,0 +1,23 @@
#!/bin/bash

sitepath=$HOME/synthetichealth/syntheticmass/site
servepath=/var/www/syntheticmass.mitre.org

here=`pwd`

cd $sitepath
echo "Fetching latest..."
git pull
echo "Building site..."
npm run build
echo "Stopping apache..."
sudo systemctl stop apache2.service
echo "Moving files..."
sudo cp -r build $servepath
cd $servepath
sudo rm -r public_html
sudo mv build public_html
echo "Restarting apache..."
sudo systemctl restart apache2.service
cd $here
echo "Done"

0 comments on commit 33a9f3a

Please sign in to comment.