|
From: | Martin Vaner |
Subject: | Execution failed |
Date: | Wed, 09 Jul 2014 19:04:15 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
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 |
[Prev in Thread] | Current Thread | [Next in Thread] |