mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 17:23:21 +00:00
Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user