mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-12 06:13:43 +00:00
integrated task-scheduler
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -147,7 +147,7 @@ function task()
|
|||||||
child.stdin.write("whereis service | awk '{print $2}'\n\exit\n");
|
child.stdin.write("whereis service | awk '{print $2}'\n\exit\n");
|
||||||
child.waitExit();
|
child.waitExit();
|
||||||
child.stdout.str = child.stdout.str.trim();
|
child.stdout.str = child.stdout.str.trim();
|
||||||
action += (child.stdout.str + ' ' + options.service + ' restart\n');
|
action += (child.stdout.str + ' ' + options.service + ' restart >/dev/null 2>&1 \n');
|
||||||
break;
|
break;
|
||||||
case 'systemd':
|
case 'systemd':
|
||||||
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||||
@@ -157,7 +157,7 @@ function task()
|
|||||||
child.stdin.write("whereis systemctl | awk '{print $2}'\n\exit\n");
|
child.stdin.write("whereis systemctl | awk '{print $2}'\n\exit\n");
|
||||||
child.waitExit();
|
child.waitExit();
|
||||||
child.stdout.str = child.stdout.str.trim();
|
child.stdout.str = child.stdout.str.trim();
|
||||||
action += (child.stdout.str + ' restart ' + options.service + '\n');
|
action += (child.stdout.str + ' restart ' + options.service + ' >/dev/null 2>&1 \n');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret._rej('Unknown Service Platform: ' + require('service-manager').manager.getServiceType());
|
ret._rej('Unknown Service Platform: ' + require('service-manager').manager.getServiceType());
|
||||||
|
|||||||
Reference in New Issue
Block a user