Hi there.
I just have a little problem. Monit does not want to start my bash
script, and i do not know why, monit is saying only "Execution failed"
so i cant identify what is causing my problem.
*Information about script**:*
/
#!/bin/bash
if [ -f /home/sms/vouchers/contego.pid ]
then
echo 'process already running'
else
java -Xmx1024m -jar jacon2.jar &
pid_number=`ps -e -o pid,command | grep "jacon2.jar" | grep -v "\<grep\>"`
touch contego.pid
echo $pid_number > contego.pid
fi/
*File permissions:*
/-rwxr-xr-x 1 sms sms 256 Jul 9 16:46 contego_start.sh/
*Monit config file:*
/check process contego with pidfile /home/sms/vouchers/contego.pid
start program = "/home/sms/vouchers/contego_start.sh"
as uid "sms" and gid "sms"
stop program = "/home/sms/vouchers/contego_stop.sh"
as uid "sms" and with gid "sms"/
When i run my script directly from console, the script is working
without any issues.
This is another problem what i have encountered before.
Thank you for tips.
Regards, Martin
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general