home · contact · privacy
Improve seedbox setup.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 3 Oct 2024 02:34:19 +0000 (04:34 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 3 Oct 2024 02:34:19 +0000 (04:34 +0200)
bookworm/etc_files/seedbox/etc/systemd/system/rtorrent.service [new file with mode: 0644]
bookworm/home_files/seedbox/.rtorrent.rc [new file with mode: 0644]
bookworm/setup_scripts/setup_seedbox.sh [changed mode: 0644->0755]

diff --git a/bookworm/etc_files/seedbox/etc/systemd/system/rtorrent.service b/bookworm/etc_files/seedbox/etc/systemd/system/rtorrent.service
new file mode 100644 (file)
index 0000000..babfd36
--- /dev/null
@@ -0,0 +1,17 @@
+[Unit]
+Description=rtorrent session
+After=network.target
+
+[Service]
+Type=simple
+User=plom
+Group=plom
+WorkingDirectory=/home/plom
+ExecStartPre=-/bin/rm -f /home/plom/session/rtorrent.lock
+ExecStart=/usr/bin/screen -S rtorrent -Dm /usr/bin/rtorrent
+ExecStop=/usr/bin/screen -S rtorrent -X quit
+Restart=on-failure
+RestartSec=3
+
+[Install]
+WantedBy=multi-user.target
diff --git a/bookworm/home_files/seedbox/.rtorrent.rc b/bookworm/home_files/seedbox/.rtorrent.rc
new file mode 100644 (file)
index 0000000..2513748
--- /dev/null
@@ -0,0 +1,11 @@
+# where to write downloads into
+directory.default.set = ~/downloads
+
+# rtorrent's memory 
+session.path.set = ~/session
+
+# security and paranoia
+dht.mode.set = disable
+protocol.pex.set = no
+protocol.encryption.set = require,require_RC4,allow_incoming,try_outgoing
+
old mode 100644 (file)
new mode 100755 (executable)
index b5f9236..7d0cb8b
@@ -6,5 +6,9 @@ set -e
 expect_setup_finished_file setup_server_has_been_run setup_server.sh
 
 cd "${setup_scripts_dir}"
-# ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" seedbox
+./copy_dirtree.sh "${config_tree_prefix}/home_files" "" seedbox
+./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" seedbox
 ./install_for_target.sh seedbox
+mkdir /home/plom/{downloads|session}
+chown plom:plom /home/plom/{downloads|session}
+systemctl enable rtorrent.service --now