restarttrigger

This commit is contained in:
Flummi committed 2017-02-09 09:03:01 +01:00
1 parent 0c533e61ff
commit fa04110438
1 file changed
+17
+17
View File
@@ -0,0 +1,17 @@
var exec = require('child_process').exec;
module.exports = (lib) => {
lib.trigger.add({
name: 'restart',
call: /^\!restart$/,
level: 100,
active: 0,
func: (e) => {
exec('sudo systemctl restart f0ck', (error, stdout) => {
if(error === null)
e.reply('brb.');
});
},
desc: 'restart f0ck'
});
};