changes cherry picked from dev to stable (#169)
* lamassu-update to update crontab * lamassu update and install script to point to #stable branch * lamassu update and install script to point to #stable branch * removing outdated & unused script * crontab update fix + npm rebuild path fix
This commit is contained in:
parent
59cb5da61c
commit
9b7972017d
6 changed files with 15 additions and 304 deletions
|
|
@ -35,10 +35,10 @@ n lts >> ${LOG_FILE} 2>&1
|
|||
decho "version installed $(node -v)"
|
||||
|
||||
decho "updating lamassu-server"
|
||||
npm -g install lamassu/lamassu-server#v5 --unsafe-perm >> ${LOG_FILE} 2>&1
|
||||
npm -g install lamassu/lamassu-server#stable --unsafe-perm >> ${LOG_FILE} 2>&1
|
||||
|
||||
decho "rebuilding npm deps"
|
||||
cd /usr/local/lib/node_modules/lamassu-server/ >> ${LOG_FILE} 2>&1
|
||||
cd $(npm root -g)/lamassu-server/ >> ${LOG_FILE} 2>&1
|
||||
npm rebuild >> ${LOG_FILE} 2>&1
|
||||
|
||||
decho "running migration"
|
||||
|
|
@ -54,4 +54,10 @@ decho "updating lamassu-server"
|
|||
supervisorctl update lamassu-server >> ${LOG_FILE} 2>&1
|
||||
supervisorctl update lamassu-admin-server >> ${LOG_FILE} 2>&1
|
||||
|
||||
echo "Update complete!"
|
||||
decho "updating backups conf"
|
||||
BACKUP_CMD=${NPM_BIN}/lamassu-backup-pg
|
||||
BACKUP_CRON="@daily $BACKUP_CMD > /dev/null"
|
||||
( (crontab -l 2>/dev/null || echo -n "") | grep -v '@daily.*lamassu-backup-pg'; echo $BACKUP_CRON ) | crontab - >> $LOG_FILE 2>&1
|
||||
$BACKUP_CMD >> $LOG_FILE 2>&1
|
||||
|
||||
decho "Update complete!"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue