Use the test to check for the file existence, instead of this.
On Thu, 25 Mar 2021 at 12:31, Gerrit Kuehn <[email protected]> wrote: > Hello, > > I have a program like like this: > > --- > check program mx_status with path "/opt/scripts/mx_auto.sh" > --- > > > This works as expected of the program exists, but fails on monit > startup if it doesn't: > > --- > # monit -t > /etc/monit.d/mx_auto.conf:3: Program does not exist: > '/opt/scripts/mytypo.sh' > /etc/monit.d/mx_auto.conf:3: Program does not exist: > '/opt/scripts/mytypo.sh' > AssertException: File ''/opt/scripts/mytypo.sh'' does not exist > raised in Command_new at src/system/Command.c:357 > --- > > > My feeling is that this reaction is rather harsh. If the program to > test does not exist, I'd rather expect the single test to fail. Is > there a reason why monit even refuses to start up in this case? > > > cu > Gerrit > >
