Skip to content

Commit

Permalink
fix(winsvc): Don't send Win svc alerts when Butler starts
Browse files Browse the repository at this point in the history
Fixes #896
  • Loading branch information
Göran Sander committed Dec 7, 2023
1 parent e4043c6 commit d716cfe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/service_monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ const checkServiceStatus = async (config, logger, isFirstCheck = false) => {

// Update state machine
const smService = serviceStateMachine.find((winsvc) => winsvc.id === `${host.host}|${service.name}`);

// First check?
if (isFirstCheck) {
// Set state to running as this is the first/startup check and we don't want to alert in this case
const res = smService.stateSvc.send('START');
}
const prevState = smService.stateSvc.state.value;

logger.verbose(
Expand Down

0 comments on commit d716cfe

Please sign in to comment.