pod 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 \ allow_raw_sockets="1" \ ip4_addr="vnet1|" \ interfaces="vnet1:bridge1" \ defaultrouter="" \ resolver="search ramsden.network;nameserver;nameserver"

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


pkg update && pkg upgrade


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'

results matching ""

    No results matching ""