Skip to content

Commit

Permalink
Version update: 1.3.1 - Fix bug in upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
matt852 committed Jan 15, 2018
1 parent 08e86be commit 7839363
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
BOOTSTRAP_SERVE_LOCAL = True

# Current version
VERSION = '1.3.0 (beta)'
VERSION = '1.3.1 (beta)'
19 changes: 17 additions & 2 deletions upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,28 @@ else
fi


### Step 9 - Restart supervisorctl process
### Step 9 - Upgrade Database
COMMAND="python db_upgrade.py"
printf "\n ${cyan} Upgrading database schema to latest version... ${reset} \n\n"
FILE="app.db"
if [ -f "$FILE" ]
then
eval $COMMAND
printf "\n {$green} Database schema updated successfully."
else
printf "\n {$red} Database file app.db not found. Database schema not updated.
If using the local database for device inventory, please manually run the the following command:
${magenta} python /home/netconfig/netconfig/db_upgrade.sh ${reset} \n\n"
fi


### Step 10 - Restart supervisorctl process
COMMAND="${PREFIX} supervisorctl restart netconfig"
printf "\n ${cyan} Restarting supervisorctl NetConfig process... ${reset} \n\n"
eval $COMMAND


### Step 10 - Notify of successful upgrade
### Step 11 - Notify of successful upgrade
NEWVERSION=`cat config.py | grep VERSION | cut -d \' -f 2`

if [ "$UPDATERESULT" == false ]
Expand Down

0 comments on commit 7839363

Please sign in to comment.