diff options
Diffstat (limited to '')
-rw-r--r-- | config/sim_skeleton/My_sim.xml | 13 | ||||
-rw-r--r-- | config/sim_skeleton/ThisSim.ini | 10 | ||||
-rw-r--r-- | config/sim_skeleton/opensim-monit.conf (renamed from config/sim01/opensim-monit.conf) | 6 |
3 files changed, 26 insertions, 3 deletions
diff --git a/config/sim_skeleton/My_sim.xml b/config/sim_skeleton/My_sim.xml new file mode 100644 index 0000000..c5723f3 --- /dev/null +++ b/config/sim_skeleton/My_sim.xml | |||
@@ -0,0 +1,13 @@ | |||
1 | <Nini> | ||
2 | <Section Name="SIM_NAME"> | ||
3 | <Key Name="RegionUUID" Value="SIM_UUID" /> | ||
4 | <Key Name="Location" Value="SIM_POS" /> | ||
5 | <Key Name="InternalAddress" Value="SIM_IP" /> | ||
6 | <Key Name="InternalPort" Value="SIM_INT_PORT" /> | ||
7 | <Key Name="AllowAlternatePorts" Value="False" /> | ||
8 | <Key Name="ExternalHostName" Value="SIM_URL" /> | ||
9 | <Key Name="RegionType" Value="private sim" /> | ||
10 | <Key Name="SizeX" Value="SIM_SIZE" /> | ||
11 | <Key Name="SizeY" Value="SIM_SIZE" /> | ||
12 | </Section> | ||
13 | </Nini> | ||
diff --git a/config/sim_skeleton/ThisSim.ini b/config/sim_skeleton/ThisSim.ini new file mode 100644 index 0000000..2f691f0 --- /dev/null +++ b/config/sim_skeleton/ThisSim.ini | |||
@@ -0,0 +1,10 @@ | |||
1 | [Const] | ||
2 | mysim="SIM_NUMBER" | ||
3 | |||
4 | [Startup] | ||
5 | PIDFile = "/var/run/opensim/sim${Const|mysim}.pid" | ||
6 | regionload_regionsdir="/opt/opensim/config/sim${Const|mysim}" | ||
7 | LogFile = "../logs/OpenSim_sim${Const|mysim}.log" | ||
8 | |||
9 | [Network] | ||
10 | http_listener_port = SIM_PORT | ||
diff --git a/config/sim01/opensim-monit.conf b/config/sim_skeleton/opensim-monit.conf index 9d66ce6..ac50fc2 100644 --- a/config/sim01/opensim-monit.conf +++ b/config/sim_skeleton/opensim-monit.conf | |||
@@ -13,10 +13,10 @@ | |||
13 | # | 13 | # |
14 | # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. | 14 | # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. |
15 | # | 15 | # |
16 | check process sim01 with pidfile /var/run/opensim/sim01.pid | 16 | check process simSIM_NUMBER with pidfile /var/run/opensim/simSIM_NUMBER.pid |
17 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" | 17 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/simSIM_NUMBER && /opt/opensim/config/simSIM_NUMBER/start-sim -q'" |
18 | as uid root and gid root | 18 | as uid root and gid root |
19 | 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 | 19 | stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/simSIM_NUMBER && /opt/opensim/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds |
20 | if cpu usage > 50% for 4 cycles then restart | 20 | if cpu usage > 50% for 4 cycles then restart |
21 | if MEMORY usage > 25% for 4 cycles then restart | 21 | if MEMORY usage > 25% for 4 cycles then restart |
22 | # if 5 restarts within 5 cycles then timeout | 22 | # if 5 restarts within 5 cycles then timeout |