First release, include service files

This commit is contained in:
Guy Van Sanden 2025-09-01 08:50:23 +02:00
parent 6add3c6b70
commit 598c62451b
3 changed files with 26 additions and 2 deletions

View File

@ -0,0 +1,11 @@
[Unit]
Description=Simplex Inviter bot
After=network.target
[Service]
User=simplex
ExecStart=/usr/local/bin/simplex-chat -p 5225
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=Taurix Simplex Customer Service inviter
After=network.target
[Service]
User=simplex
Environment="SXC_CONTROL_GROUP=TrxCustomerSupport"
WorkingDirectory=/home/simplex
ExecStart=/usr/local/bin/simplex_customerservicebot.py
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -8,13 +8,13 @@ import websockets
from collections import defaultdict
from typing import Any, Dict, Iterable, Tuple
__version__ = "0.5.6" # exact/recency name resolver + robust sender + case-insensitive join + announce fix
__version__ = "1.0.0"
# Defaults
WS_URL = os.environ.get("SXC_WS", "ws://127.0.0.1:5225")
CONTROL_GROUP = (os.environ.get("SXC_CONTROL_GROUP") or "BotTest").strip()
ANNOUNCE_NEW = os.environ.get("SXC_ANNOUNCE", "1").strip() != "0"
DEBUG = os.environ.get("SXC_DEBUG", "1").strip() == "1"
DEBUG = os.environ.get("SXC_DEBUG", "0").strip() == "1"
LOG_RAW = os.environ.get("SXC_LOG_RAW", "0").strip() == "1"
INVITE_CMDS = ["/a", "a"] # try WS-style first, then CLI-style