#author("2025-06-17T09:27:51+00:00","default:iseki","iseki")
** for screen command

<pre>
# /usr/lib/systemd/system/opensim.service with screen
#         v.1.0      by Fumi.Iseki
#

[Unit]
Description = OpenSimulator
After = network-online.target

[Service]
Environment = OPENSIM_DIR=/usr/local/opensim
Environment = OPENSIM_COM=OpenSim
Environment = SCRN_OS_ID=opensim_region

Type = forking
User = root
LimitSTACK = infinity

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"

# SIGTERM の代わり.SIGTERM で screen自体が終了するため.
KillSignal = SIGCONT
TimeoutStopSec = 120s
#KillMode = none
#SendSIGKILL = no

Restart = always

[Install]
WantedBy = multi-user.target
</pre>

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS