Last active
April 23, 2020 02:51
-
-
Save thewisenerd/3bda376fe962ad59cc3d7da731aca6a6 to your computer and use it in GitHub Desktop.
transmission-daemon systemd service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# sudo groupadd -g 4200 p2p | |
# sudo useradd -r -u 4200 -g 4200 -s /usr/bin/nologin p2p | |
sudo -u p2p tee "/srv/transmission/config-defs/0" <<EOT | |
CONFIG_PORT=44290 | |
CONFIG_DIR=/srv/transmission/config/0 | |
EOT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Transmission BitTorrent Daemon at %I | |
After=network.target | |
[Service] | |
Type=notify | |
EnvironmentFile=/srv/transmission/config-defs/%i | |
ExecStart=/usr/bin/transmission-daemon -f --config-dir $CONFIG_DIR --port $CONFIG_PORT --allowed "127.0.0.*,192.168.2.*,192.168.3.*" | |
ExecReload=/usr/bin/kill -s HUP $MAINPID | |
User=p2p | |
Group=p2p | |
Restart=always | |
RestartSec=240 | |
IOSchedulingClass=best-effort | |
IOSchedulingPriority=7 | |
Nice=10 | |
CPUSchedulingPolicy=idle | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment