From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 18 May 2025 09:44:38 +0000 (+0200)
Subject: Fix.
X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/blog?a=commitdiff_plain;h=575af26335d75edd6e459d24f83bf5e8c7d4167a;p=config

Fix.
---

diff --git a/bookworm/aptmark/catgirl b/bookworm/aptmark/catgirl
index be0a8b4..f6535c2 100644
--- a/bookworm/aptmark/catgirl
+++ b/bookworm/aptmark/catgirl
@@ -1,7 +1,7 @@
 # IRC
 catgirl
 # for detachable sessions
-tmux
+dtach
 # for logs encryption
 age
 #
diff --git a/bookworm/copy/catgirl/etc/systemd/system/catgirl.service b/bookworm/copy/catgirl/etc/systemd/system/catgirl.service
index 641b09a..da65e02 100644
--- a/bookworm/copy/catgirl/etc/systemd/system/catgirl.service
+++ b/bookworm/copy/catgirl/etc/systemd/system/catgirl.service
@@ -1,13 +1,15 @@
 [Unit]
-Description=catgirl in tmux session
+Description=catgirl dtached
 After=network.target
 
 [Service]
-Type=forking
+Type=simple
 User=plom
-ExecStart=/usr/bin/tmux new-session -d -s catgirl_tmux /usr/bin/catgirl libera
-ExecStop=/usr/bin/tmux kill-session -t catgirl_tmux
-Restart=always
+WorkingDirectory=/home/plom
+ExecStart=/bin/sh -lc "dtach -n /tmp/dtach_catgirl libera && while true; do sleep 1; test ! -e /tmp/dtach_catgirl && break; done"
+ExecStop=/bin/sh -lc "rm /tmp/dtach_catgirl"
+Environment=TERM=linux
+Restart=on-success
 RestartSec=10
 
 [Install]
diff --git a/bookworm/copy/catgirl/home/plom/.bashrc.catgirl b/bookworm/copy/catgirl/home/plom/.bashrc.catgirl
new file mode 100644
index 0000000..9eb17a4
--- /dev/null
+++ b/bookworm/copy/catgirl/home/plom/.bashrc.catgirl
@@ -0,0 +1 @@
+alias attach_catgirl='dtach -a /tmp/dtach_catgirl -e "^t"'
diff --git a/testing/scripts/sync_rtorrent_download.sh b/testing/scripts/sync_rtorrent_download.sh
index c3ed886..a9b86eb 100755
--- a/testing/scripts/sync_rtorrent_download.sh
+++ b/testing/scripts/sync_rtorrent_download.sh
@@ -150,7 +150,7 @@ if [ -z "${SYNC_DOWN}" ]; then
     ssh -t -q "${SERVER}" "mv -i ${TMP_STORE_DOWNLOAD}/* ~/${DIRNAME_DOWNLOADS}/"
     ssh -t -q "${SERVER}" "mv -i ${TMP_STORE_SESSION}/* ~/${DIRNAME_SESSION}/"
     ssh -t -q "${SERVER}" "rmdir ${TMP_STORE_SESSION} && rmdir ${TMP_STORE_DOWNLOAD} && rmdir ${TMP_STORE}"
-    ssh -t -q "${SERVER}" 'kill_rtorrent'
+    ssh -t -q "${SERVER}" 'sh -cl kill_rtorrent'
 else
     mkdir "${TMP_STORE_SESSION}"
     mkdir "${TMP_STORE_DOWNLOAD}"