Fix .env loading for standalone repo structure

This commit is contained in:
clxud
2026-07-02 02:22:42 +00:00
parent 8bbe86759c
commit 01277eec82
3 changed files with 39 additions and 5 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Installs/updates the tssbot-backend systemd --user unit and (re)starts it.
set -euo pipefail
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
unit_dir="${HOME}/.config/systemd/user"
mkdir -p "${unit_dir}"
ln -sf "${repo_dir}/systemd/tssbot-backend.service" "${unit_dir}/tssbot-backend.service"
systemctl --user daemon-reload
systemctl --user enable --now tssbot-backend.service
if [ "$(loginctl show-user "$(whoami)" -p Linger --value 2>/dev/null)" != "yes" ]; then
echo "Linger is not enabled for $(whoami) — user services will stop when you log out."
echo "Enable it with: sudo loginctl enable-linger $(whoami)"
fi
systemctl --user status --no-pager tssbot-backend.service