Update server/monitor-types/system-service.js

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
iotux 2026-01-01 08:03:57 +01:00 committed by GitHub
parent 91f31f56cb
commit 132a03874d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) => {