lamassu-update script changes to update supervisor config (#133)
* lamassu-update script changes to update supervisor config * No need to do supervisor start
This commit is contained in:
parent
aa507ec13b
commit
ff1ec611be
1 changed files with 9 additions and 4 deletions
|
|
@ -32,7 +32,7 @@ supervisorctl stop lamassu-admin-server >> ${LOG_FILE} 2>&1
|
|||
decho "updating node"
|
||||
npm install n -g >> ${LOG_FILE} 2>&1
|
||||
n lts >> ${LOG_FILE} 2>&1
|
||||
node -v
|
||||
decho "version installed $(node -v)"
|
||||
|
||||
decho "updating lamassu-server"
|
||||
npm -g install lamassu/lamassu-server#v5 --unsafe-perm >> ${LOG_FILE} 2>&1
|
||||
|
|
@ -45,6 +45,11 @@ decho "running migration"
|
|||
lamassu-migrate >> ${LOG_FILE} 2>&1
|
||||
lamassu-migrate-config >> ${LOG_FILE} 2>&1
|
||||
|
||||
decho "starting lamassu-server"
|
||||
supervisorctl start lamassu-server >> ${LOG_FILE} 2>&1
|
||||
supervisorctl start lamassu-admin-server >> ${LOG_FILE} 2>&1
|
||||
decho "updating supervisor conf"
|
||||
export NPM_BIN=$(npm -g bin)
|
||||
perl -i -pe 's/command=.*/command=$ENV{NPM_BIN}\/lamassu-server/g' /etc/supervisor/conf.d/lamassu-server.conf >> ${LOG_FILE} 2>&1
|
||||
perl -i -pe 's/command=.*/command=$ENV{NPM_BIN}\/lamassu-admin-server/g' /etc/supervisor/conf.d/lamassu-admin-server.conf >> ${LOG_FILE} 2>&1
|
||||
|
||||
decho "updating lamassu-server"
|
||||
supervisorctl update lamassu-server >> ${LOG_FILE} 2>&1
|
||||
supervisorctl update lamassu-admin-server >> ${LOG_FILE} 2>&1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue