Files
irc-bot/debian/systemd/irc-bot.service
tocmo0nlord ff3f6fe05b Add Debian .deb package support
- debian/control, changelog, conffiles — package metadata
- debian/postinst — creates irc-bot system user, installs Python venv,
  symlinks runtime dirs, enables systemd services
- debian/prerm/postrm — clean stop/uninstall with purge support
- debian/systemd/ — hardened systemd units for bot and portal
- build_deb.sh — assembles and builds the .deb via dpkg-deb
- Path resolver in irc_client.py, memory.py, config_manager.py, portal/app.py:
  uses /etc/irc-bot + /var/lib/irc-bot when installed as .deb, relative
  paths otherwise (Docker/venv unchanged)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 22:16:05 -04:00

28 lines
662 B
Desktop File

[Unit]
Description=Active Blue IRC LLM Bot
Documentation=http://192.168.1.64:3000/tocmo0nlord/irc-bot
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=irc-bot
Group=irc-bot
WorkingDirectory=/opt/irc-bot
Environment="PYTHONPATH=/opt/irc-bot"
EnvironmentFile=/etc/irc-bot/.env
ExecStart=/opt/irc-bot/venv/bin/python -m bot.irc_client
Restart=on-failure
RestartSec=10
StandardOutput=append:/var/log/irc-bot/bot.log
StandardError=append:/var/log/irc-bot/bot.log
# Hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/etc/irc-bot /var/lib/irc-bot /var/log/irc-bot
[Install]
WantedBy=multi-user.target