Skip to content

Commit

Permalink
refactor: avoid pushing into array
Browse files Browse the repository at this point in the history
  • Loading branch information
siiky committed Nov 22, 2024
1 parent e3965b7 commit e33dae7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions deploy/codebase/lamassu-machine-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,11 @@ function updateSupervisor (cb) {
const commands = [
async.apply(command, `cp ${supervisorPath}/* /etc/supervisor/conf.d/`),
async.apply(command, `rm -f /etc/supervisor/conf.d/calibrate-screen.conf`),
async.apply(command, `supervisorctl update ${services}`),
async.apply(command, `supervisorctl stop ${services}`),
async.apply(command, `sed -i 's|^user=.*\$|user=${osuser}|;' /etc/supervisor/conf.d/lamassu-browser.conf || true`)
]

commands.push(async.apply(command, `supervisorctl update ${services}`))
commands.push(async.apply(command, `supervisorctl stop ${services}`))

if (machineCode === 'aveiro') {
commands.push(async.apply(command, `supervisorctl stop lamassu-gsr50-devstart lamassu-gsr50`))
commands.push(async.apply(command, `cp ${applicationParentFolder}/lamassu-machine/lib/gsr50/binaries/* /opt/FujitsuGSR50/`))
Expand Down

0 comments on commit e33dae7

Please sign in to comment.