aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-08 15:04:12 +1000
committerDavid Walter Seikel2012-02-08 15:04:12 +1000
commitb0837d553bef3029090d137725315bd55566e62e (patch)
treed381acde10af09fe4e8a8843b4deed54ad693724
parentDocument possible solution to the monit reboot bug, coz it's late and I'm off... (diff)
downloadIGnoble-b0837d553bef3029090d137725315bd55566e62e.zip
IGnoble-b0837d553bef3029090d137725315bd55566e62e.tar.gz
IGnoble-b0837d553bef3029090d137725315bd55566e62e.tar.bz2
IGnoble-b0837d553bef3029090d137725315bd55566e62e.tar.xz
Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l.
-rw-r--r--opensim-monit.conf8
1 files changed, 5 insertions, 3 deletions
diff --git a/opensim-monit.conf b/opensim-monit.conf
index 9688a25..7785056 100644
--- a/opensim-monit.conf
+++ b/opensim-monit.conf
@@ -19,10 +19,12 @@
19# 19#
20# see ../README for configuration instructions. 20# see ../README for configuration instructions.
21# 21#
22# Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l.
23#
22check process sim01 with pidfile /var/run/opensim/sim01.pid 24check process sim01 with pidfile /var/run/opensim/sim01.pid
23 start program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" 25 start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'"
24 as uid opensim and gid opensim 26 as uid root and gid root
25 stop program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/stop-sim'" with timeout 600 seconds 27 stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/stop-sim'" with timeout 600 seconds
26 if cpu usage > 50% for 4 cycles then restart 28 if cpu usage > 50% for 4 cycles then restart
27# if 5 restarts within 5 cycles then timeout 29# if 5 restarts within 5 cycles then timeout
28# if failed url http://127.0.0.1:9005/jsonSimStats/ 30# if failed url http://127.0.0.1:9005/jsonSimStats/