|
|
|
@ -3,7 +3,7 @@ const remoteExec = require('./remoteExec.js');
|
|
|
|
|
const sdk = require('matrix-js-sdk');
|
|
|
|
|
const yaml = require('js-yaml');
|
|
|
|
|
|
|
|
|
|
const config = yaml.safeLoad(fs.readFileSync('config.yaml'));
|
|
|
|
|
global.config = yaml.safeLoad(fs.readFileSync('config.yaml'));
|
|
|
|
|
const matrixClient = sdk.createClient({
|
|
|
|
|
baseUrl: config.matrix.baseurl,
|
|
|
|
|
accessToken: config.matrix.accesstoken,
|
|
|
|
@ -35,7 +35,7 @@ commands['rebuild'].exec = function(args, room, event) {
|
|
|
|
|
|
|
|
|
|
matrixClient.sendNotice(room.roomId, 'rebuilding container ' + container);
|
|
|
|
|
|
|
|
|
|
remoteExec('./rebuild.sh ' + container, config)
|
|
|
|
|
remoteExec('./rebuild.sh ' + container)
|
|
|
|
|
.then(function(result) {
|
|
|
|
|
matrixClient.sendNotice(room.roomId, event.sender.userId + '\nrebuilt container ' + container);
|
|
|
|
|
}, function(result) {
|
|
|
|
|