Make docker restartable

This commit is contained in:
Johannes Zellner
2018-11-23 15:49:47 +01:00
parent b9c9839bb7
commit 161a8fe2bf
5 changed files with 37 additions and 5 deletions

View File

@@ -210,7 +210,7 @@ var KNOWN_ADDONS = {
restore: NOOP,
clear: NOOP,
status: statusDocker,
restart: null
restart: restartDocker
}
};
@@ -1685,3 +1685,11 @@ function statusDocker(callback) {
callback(null, { status: error ? exports.ADDON_STATUS_STOPPED: exports.ADDON_STATUS_ACTIVE });
});
}
function restartDocker(callback) {
assert.strictEqual(typeof callback, 'function');
shell.sudo('restartdocker', [ path.join(__dirname, 'scripts/restartdocker.sh') ], NOOP_CALLBACK);
callback(null);
}