docs
  • README
  • John's Notes and Documentation
    • Linux
      • Distributions
        • Arch Linux
          • Common Applications
          • Setting up pacaur with the Arch User Repository
          • Bluetooth
          • Hibernate
          • Graphical Configuration
          • libvirt
          • Post Install Tasks
            • Time
            • Reflector
            • SMTP
            • ZFS Configuration
            • smart
            • nfs
            • Package Management
              • aurutils
            • Programming Languages
              • nodejs
              • ruby
            • Restore Installed Applications
            • User Configuration Management
            • User Namespaces
            • Gaming with Wine
            • ZFS Dataset Structure
            • Raspberry PI Secure VPN Torrentbox
        • NixOS
          • Remotely Accessing Install Media
          • root on ZFS Install
      • systemd
        • Network Bonding
      • Tuning
        • CPU Tuning
        • Limits
        • Sysctls
        • Network Reliability With iwlwifi
        • Surface Pro 4 Power Tuning
        • ZFS Arc Max on Linux
      • TrueNAS
        • Setup
  • BSD
    • FreeBSD
      • iocage
      • Poudriere in a bhyve VM
    • FreeNAS
      • Copy SSH Keys off FreeNAS
      • FreeNAS Service jails
      • iocage Service jails
        • Couchpotato jail
        • Deluge jail
        • Emby jail
        • Poudriere WebUI jail
        • Podcatcher jail
        • Sabnzbd jail
        • Sickrage jail
        • Syncthing jail
        • Duplicity jail
        • Lets Encrypt jail
      • Wrong Version jail
    • pfSense
      • Sending Specific Traffic Through OpenVPN
  • Desktop and Userspace
    • Gaming
      • Grim Dawn
      • Path of Exile
    • Internet
      • Re-authenticate IRC Nickname
      • Lightdm VNC Connection with Password
    • Media
      • Convert Audio to Video
      • Convert Text to Speech
  • System Administration
    • Security
      • GPG Subkeys
    • Shell Scripting
      • dd
      • find
      • rsync
      • vim
    • ZFS
      • Mirrors
  • Certifications
    • CKA
      • Core-Concepts
      • Scheduling
      • Logging
      • Application Lifecycle Management
      • Cluster Maintenance
      • Security
      • Storage
      • Networking
      • Install Kubernetes with kubeadm
      • JSON PATH
Powered by GitBook
On this page
  • On FreeNAS
  • In Jail
  • Requirements
  • Install bashpod
  • FreeNAS Task
  1. BSD
  2. FreeNAS
  3. iocage Service jails

Podcatcher jail

Setup for pocatcher jail with iocage using 'bashpod', previously 'mashpodder'.

On FreeNAS

Create jail:

iocage create --release 11.1-RELEASE --name pod \
          boot="on" vnet=on bpf=on \
          allow_raw_sockets="1" \
          ip4_addr="vnet1|172.20.40.34/24" \
          interfaces="vnet1:bridge1" \
          defaultrouter="172.20.40.1" \
          resolver="search ramsden.network;nameserver 172.20.40.1;nameserver 8.8.8.8"

Create media user/group using uid from freenas:

iocage exec pod 'pw useradd -n media -u 8675309'

Nullfs mount any datasets in jail:

pod data, created on FreeNAS:

iocage exec pod 'mkdir -p /var/db/pod'
iocage exec pod 'chown media:media /var/db/pod'
iocage fstab --add pod '/mnt/tank/data/database/pod /var/db/pod nullfs rw 0 0'

Setup directories for downloads:

iocage exec pod 'mkdir -p /media/Downloads/Complete && chown -R media:media /media'

iocage fstab --add pod '/mnt/tank/media/Downloads/Complete /media/Downloads/Complete nullfs rw 0 0'

Check fstab:

iocage fstab --list pod

Enter jail.

iocage console pod

In Jail

Update.

pkg update && pkg upgrade

Requirements

pkg install bash libxslt wget curl git

Install bashpod

Clone the script to tempdir and move it to our mounded directory.

cd /var/db
git clone  https://github.com/johnramsden/bashpod.git temp
mv temp/.git pod/
rm -rf temp
chown -R media:media pod/

su media
cd pod/
git reset --hard HEAD
exit

Inside /var/db/pod/bashpod.sh, set BASEDIR="/var/db/pod".

Symlink the script to /usr/local/bin/bashpod.

ln -s /var/db/pod/bashpod.sh /usr/local/bin/bashpod

FreeNAS Task

In order to run from FreeNAS, create a new task that runs the bashpod script.

iocage exec pod --jail_user media '/usr/local/bin/bashpod'
PreviousPoudriere WebUI jailNextSabnzbd jail

Last updated 5 months ago