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
co-authored by Frank Elsinga
parent 91f31f56cb
commit 132a03874d
+1 -1
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) => {