Skip to content

Instantly share code, notes, and snippets.

@stvnwlsn
Last active August 16, 2022 01:12
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save stvnwlsn/4664555967b95fcfd4ce to your computer and use it in GitHub Desktop.
Save stvnwlsn/4664555967b95fcfd4ce to your computer and use it in GitHub Desktop.
transmission-daemon FreeBSD

Install and setup transmission daemon

$ cd /usr/ports/net-p2p/transmission-daemon
$ sudo make install
$ sudo mkdir /srv/torrents/{autoload,data}
$ sudo chown -R transmission:transmission /srv/torrents/
$ sudo chmod -R go+w /srv/torrents/
$ sudo vim /etc/rc.conf
transmission_enable="YES"
transmission_watch_dir="/srv/torrents/autoload"
transmission_download_dir="/srv/torrents/data"
$ sudo /usr/local/etc/rc.d/transmission start
$ sudo /usr/local/etc/rc.d/transmission stop
$ sudo -u transmission vim /usr/local/etc/transmission/home/settings.json
  "rpc-authentication-required": true,
  "rpc-username": "admin",
  "rpc-password": "password",
  "rpc-whitelist": "127.0.0.1,192.168.1.*",
$ sudo pw groupmod transmission -m USERNAME
$ sudo service transmission start

transmission-remote-cli

https://github.com/fagga/transmission-remote-cli

use stig instead of transmission-remote-cli

flexget and crontab on FreeBSD

Use python3 and pip3 to install flexget as recommended on their website.
Forget most of the below.

http://flexget.com/wiki/Configuration

  • install python w/ pkg
  • install py27-pip w/ pkg
  • pip install flexget
  • crontab -e
  • mkdir .flexget
  • scp config.yml
  • sudo pkg install py27-sqlite3
  • flexget check
  • pip install mechanize
  • flexget execute
  • change rss for dime to http://rss.dimeadozen.org/rss/
  • presets:preset changed to templates:template in config yml

Using magnet links from KAT rss feeds

  kickass_comics:
    rss:
      url: "https://kat.cr/usearch/Hawkeye%20OR%20Rebels%20OR%20%22Sons%20of%20the%20Devil%22%20OR%20%22Starve%22%20OR%20%22War%20Stories%22%20OR%20%22Kingsway%20West%22%20category%3Abooks/?rss=1"
      other_fields: ['torrent:magnetURI']
      link: 'torrent:magnetURI'
    series:
      - Hawkeye
      - Rebels
      - Sons of the Devil
      - Starve
      - War Stories
      - Kingsway West
    transmission:
      host: localhost
      port: 9091
      username: USERNAME
      password: PASSWORD

Config for dime needs download_auth section now

new config looks like this:

dime:
    form:
      url: http://www.dimeadozen.org/account-login.php
      username: USERNAME
      password: PASSWORD
    rss:
      url: http://rss.dimeadozen.org/rss/
      username: USERNAME
      password: PASSWORD
    regexp:
      accept:
        - Lee Ranaldo
        - Thurston Moore
        - "The Fall"
        - Kim Gordon
        - "Sonic Youth"
        - Captain Beefheart
        - "Nils Frahm"
        - Chelsea Light Moving
        - Body Head
        - Faust
        - Liebezeit
        - Sebadoh
        - Dinosaur Jr
        - "Folk Implosion"
        - Cream
      reject:
        - Primal
        - Scream
      from: title
    download_auth:
    - "http://www.dimeadozen.org/download.php":
        username: USERNAME
        password: PASSWORD
    download: /srv/torrents/autoload/

NFS setup

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html http://www.manpages.info/freebsd/exports.5.html http://blog.up-link.ro/how-to-set-up-a-nfs-server-in-freebsd/ https://help.ubuntu.com/community/SettingUpNFSHowTo

Freebsd server

$ sudo vim /etc/rc.conf file and add the following lines:

nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
rpcbind_enable="YES"
mountd_enable="YES"
mountd_flags="-r"

$ vim /etc/exports

/srv/torrents -alldirs -mapall=user host
$ sudo service nfsd start
$ sudo mountd reload

Xubuntu client

$ showmount -e 192.168.2.106
$ sudo mount -o rw 192.168.2.106:/srv/torrents /mnt/torrents
$ sudo umount /mnt/torrents

Auto mounting NFS shares

$ sudo vim /etc/fstab

192.168.2.106:/srv/torrents /mnt/torrents nfs _netdev,auto 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment