Add hotfix command

This commit is contained in:
Johannes Zellner
2023-03-29 22:52:51 +02:00
parent 7af44e1fdd
commit ba74eb6fa2
4 changed files with 259 additions and 6 deletions

22
scripts/remote_hotfix.js Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
if (process.env.BOX_ENV !== 'cloudron') {
console.error('!! This is only meant to be run with cloudron hotfix');
process.exit(1);
}
const spawn = require('child_process').spawn,
path = require('path');
const NEW_BOX_SOURCE_DIR = '/tmp/box-src-hotfix';
console.log('=> Running installer.sh');
const installer = spawn(path.join(NEW_BOX_SOURCE_DIR, 'scripts/installer.sh'), []);
installer.stdout.pipe(process.stdout);
installer.stderr.pipe(process.stderr);
installer.on('exit', function (code) {
console.log('Finished with code', code);
process.exit(code);
});