From: Christian Heller Date: Thu, 3 Oct 2024 02:34:19 +0000 (+0200) Subject: Improve seedbox setup. X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=commitdiff_plain;h=9a02f12dfeb6e96cb6732f7fe33024e42096bb3c;p=config Improve seedbox setup. --- 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 index 0000000..babfd36 --- /dev/null +++ b/bookworm/etc_files/seedbox/etc/systemd/system/rtorrent.service @@ -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 index 0000000..2513748 --- /dev/null +++ b/bookworm/home_files/seedbox/.rtorrent.rc @@ -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 + diff --git a/bookworm/setup_scripts/setup_seedbox.sh b/bookworm/setup_scripts/setup_seedbox.sh old mode 100644 new mode 100755 index b5f9236..7d0cb8b --- a/bookworm/setup_scripts/setup_seedbox.sh +++ b/bookworm/setup_scripts/setup_seedbox.sh @@ -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