aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--config/sim01/My_sim.xml13
-rw-r--r--config/sim01/ThisSim.ini6
-rw-r--r--config/sim_skeleton/My_sim.xml13
-rw-r--r--config/sim_skeleton/ThisSim.ini10
-rw-r--r--config/sim_skeleton/opensim-monit.conf (renamed from config/sim01/opensim-monit.conf)6
5 files changed, 26 insertions, 22 deletions
diff --git a/config/sim01/My_sim.xml b/config/sim01/My_sim.xml
deleted file mode 100644
index 2f893ad..0000000
--- a/config/sim01/My_sim.xml
+++ /dev/null
@@ -1,13 +0,0 @@
1<Nini>
2 <Section Name="My sim">
3 <Key Name="RegionUUID" Value="ffffffff-ffff-ffff-ffff-ffffffffffff" />
4 <Key Name="Location" Value="10000,10000" />
5 <Key Name="InternalAddress" Value="0.0.0.0" />
6 <Key Name="InternalPort" Value="9106" />
7 <Key Name="AllowAlternatePorts" Value="False" />
8 <Key Name="ExternalHostName" Value="SYSTEMIP" />
9 <Key Name="RegionType" Value="private sim" />
10 <Key Name="SizeX" Value="256" />
11 <Key Name="SizeY" Value="256" />
12 </Section>
13</Nini>
diff --git a/config/sim01/ThisSim.ini b/config/sim01/ThisSim.ini
deleted file mode 100644
index e7953ab..0000000
--- a/config/sim01/ThisSim.ini
+++ /dev/null
@@ -1,6 +0,0 @@
1[Startup]
2 PIDFile = "/var/run/opensim/sim01.pid"
3 regionload_regionsdir="/opt/opensim/config/sim01"
4
5[Network]
6 http_listener_port = 9105
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#
16check process sim01 with pidfile /var/run/opensim/sim01.pid 16check 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