Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
91f31f56cb
commit
132a03874d
@ -85,7 +85,7 @@ class SystemServiceMonitorType extends MonitorType {
|
||||
"-NonInteractive",
|
||||
"-Command",
|
||||
// Single quotes around the service name
|
||||
`(Get-Service -Name '${safeServiceName}').Status`
|
||||
`(Get-Service -Name '${serviceName.replaceAll("'", "''")}').Status`
|
||||
];
|
||||
|
||||
execFile(cmd, args, { timeout: 5000 }, (error, stdout, stderr) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user