Skip to content

Instantly share code, notes, and snippets.

@romaimperator
Created February 23, 2012 23:49
Show Gist options
  • Select an option

  • Save romaimperator/1895840 to your computer and use it in GitHub Desktop.

Select an option

Save romaimperator/1895840 to your computer and use it in GitHub Desktop.
The rtorrent rc.d file
#!/bin/sh
# Basically this starts rtorrent on a screen session
# The only important thing to note is the rtorrent_user and rtorrent_group. They are the user and group respectively that rTorrent is started with. If you set these to the user and group you use for the file shares in Freenas you shouldn't have trouble with accessing torrents started by rTorrent through the share.
. /etc/rc.subr
name=rtorrent
rcvar=rtorrent_enable
command="/usr/local/bin/screen"
command_args="-d -m -S rtorrent rtorrent &> /dev/null"
stop_cmd="killall /usr/bin/rtorrent &> /dev/null"
rtorrent_user="rtorrent"
rtorrent_group="rtorrent"
load_rc_config $name
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment