From a53a1e86fc3facf9c62fbee616b77e3f472dbe80 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 30 Jun 2025 18:52:38 +0900 Subject: [PATCH] opensim_money.net.service --- config/opensim_money.net.service | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/config/opensim_money.net.service b/config/opensim_money.net.service index 6427722..e3474ee 100644 --- a/config/opensim_money.net.service +++ b/config/opensim_money.net.service @@ -1,7 +1,5 @@ -# /usr/lib/systemd/system/opensim_money.net.service -# -# v.0.2 by Fumi.Iseki -# +# /usr/lib/systemd/system/opensim_money.net.service with screen +# v.1.0 by Fumi.Iseki [Unit] Description = MoneyServer for OpenSimulator @@ -10,19 +8,18 @@ After = opensim_robust.net.service [Service] Environment = OPENSIM_DIR=/usr/local/opensim_server Environment = OPENSIM_COM=MoneyServer -Environment = OPENSIM_DLL=MoneyServer.dll -Environment = EXEC_COM=/usr/bin/dotnet -Environment = TMUX_OS_ID=opensim_money -#Environment = WAIT_STOP_TM=5 +Environment = SCRN_OS_ID=opensim_money Type = forking User = root +Nice = -5 LimitSTACK = infinity -WorkingDirectory = ${OPENSIM_DIR}/bin +ExecStart = /usr/bin/bash -c 'cd ${OPENSIM_DIR}/bin && /usr/bin/screen -dmLS ${SCRN_OS_ID} ${OPENSIM_DIR}/bin/${OPENSIM_COM}' +ExecStop = /usr/bin/screen -S ${SCRN_OS_ID} -X stuff "shutdown\n" -ExecStart = /usr/bin/tmux new -d -s ${TMUX_OS_ID} -c ${OPENSIM_DIR}/bin ${OPENSIM_DIR}/bin/${OPENSIM_COM} -#ExecStop = /usr/bin/tmux send-keys -t ${TMUX_OS_ID} C-m "quit" C-m ; /usr/bin/sleep ${WAIT_STOP_TM} +KillSignal = SIGCONT +TimeoutStopSec = 120s Restart = always