Created
May 9, 2019 04:14
-
-
Save vigortek/99cea616399ab592250fbba51a9aa669 to your computer and use it in GitHub Desktop.
Starter script for rtorrent
This file contains 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
#!/bin/sh | |
# (C) 2019 vigortek.net - rtorrent starter script | |
# If config file doesn't exist, don't start | |
sleep 10 | |
CONFIG="/mnt/storage/.rtorrent.rc" | |
if [ -f "$CONFIG" ] | |
then | |
rm /tmp/rtorrent.sock | |
sleep 2 | |
tmux new-session -d -s rtorrent 'sudo -u rtorrent -S rtorrent -n -o import=/mnt/storage/.rtorrent.rc' & | |
else | |
logger "No storage mounted, not starting rtorrent.." | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment