Merge branch 'f0ckdev' into 'master'
restarttrigger See merge request !86
This commit is contained in:
commit
e250cc7a48
17
src/trigger/restart.js
Normal file
17
src/trigger/restart.js
Normal 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'
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user