My iocage setup for FreeNAS
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
zfs create tank/apps/gphotos | |
iocage create --release 11.2-RELEASE --name "gphotos" \ | |
boot="on" \ | |
vnet="on" \ | |
defaultrouter="192.168.1.1" \ | |
ip4_addr="vnet0|192.168.1.40/24" | |
iocage exec gphotos "mkdir -p /usr/local/etc/pkg/repos" | |
iocage exec gphotos "echo -e 'FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\" }' > /usr/local/etc/pkg/repos/FreeBSD.conf" | |
iocage exec gphotos pkg install -y python36 py36-sqlite3 py36-openssl py36-pycryptodome ca_root_nss | |
iocage exec gphotos python3.6 -Im ensurepip --upgrade --default-pip | |
iocage exec gphotos pip install gphotos-sync | |
iocage exec gphotos "mkdir -p /settings" && \ | |
iocage fstab -a gphotos /mnt/tank/apps/gphotos /settings nullfs rw 0 0 | |
iocage exec gphotos "mkdir -p /mnt/backup/library/photos" && \ | |
iocage fstab -a gphotos /mnt/tank/backup/library/photos /mnt/backup/library/photos nullfs rw 0 0 | |
iocage exec gphotos "pw groupadd -n media -g 8675309" | |
iocage exec gphotos "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin" | |
# iocage exec transmission "pw groupmod media -m gphotos" | |
iocage exec gphotos chown -R media:media /settings | |
iocage exec gphotos chown -R media:media /mnt/backup/library/photos | |
#iocage exec plex gphotos "gphotos_enable=YES" | |
#iocage exec plex gphotos gphotos_support_path="/settings" | |
#iocage exec plex service gphotos start | |
iocage console gphotos | |
setenv LANG en_US.UTF-8; && \ | |
gphotos-sync \ | |
--retry-download \ | |
--db-path /settings \ | |
--secret /settings/secret.json \ | |
/mnt/backup/library/photos/google | |
# }}} | |
# jackett | |
# {{{ | |
iocage create --release 11.2-RELEASE --name "jackett" \ | |
boot="on" \ | |
vnet="on" \ | |
allow_raw_sockets="1" \ | |
defaultrouter="192.168.1.1" \ | |
ip4_addr="vnet0|192.168.1.15/24" | |
iocage exec jackett "mkdir -p /usr/local/etc/pkg/repos" | |
iocage exec jackett "echo -e 'FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\" }' > /usr/local/etc/pkg/repos/FreeBSD.conf" | |
iocage exec jackett /bin/tcsh -c 'setenv ASSUME_ALWAYS_YES yes; pkg install mono curl' | |
iocage exec jackett mkdir -p /settings | |
zfs create tank/apps/jackett | |
iocage fstab -a jackett /mnt/tank/apps/jackett /settings nullfs rw 0 0 | |
iocage exec jackett ln -s /usr/local/bin/mono /usr/bin/mono | |
iocage exec jackett "fetch https://github.com/Jackett/Jackett/releases/download/v0.11.760/Jackett.Binaries.Mono.tar.gz -o /usr/local/share" | |
iocage exec jackett "tar -xzvf /usr/local/share/Jackett.Binaries.Mono.tar.gz -C /usr/local/share" | |
iocage exec jackett rm /usr/local/share/Jackett.Binaries.Mono.tar.gz | |
iocage exec jackett "pw user add jackett -c jackett -u 818 -d /nonexistent -s /usr/bin/nologin" | |
iocage exec jackett "pw groupadd -n media -g 8675309" | |
iocage exec jackett "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin" | |
iocage exec jackett "pw groupmod media -m jackett" | |
iocage exec jackett chown -R jackett:jackett /usr/local/share/Jackett /settings | |
iocage exec jackett mkdir /usr/local/etc/rc.d | |
iocage exec jackett chmod u+x /usr/local/etc/rc.d/lidarr | |
iocage exec jackett sysrc "jackett_enable=YES" | |
iocage exec jackett sysrc "jackett_user=media" | |
iocage exec jackett sysrc "jackett_group=media" | |
cat <<-EOF > /mnt/tank/iocage/jails/jackett/root/usr/local/etc/rc.d/jackett | |
// | |
EOF | |
iocage exec jackett chmod u+x /usr/local/etc/rc.d/jackett | |
iocage exec jackett sysrc "jackett_enable=YES" | |
iocage exec jackett sysrc "jackett_user=media" | |
iocage exec jackett sysrc "jackett_group=media" | |
iocage exec jackett service jackett start | |
# }}} | |
# lidarr | |
# {{{ | |
iocage create --release 11.2-RELEASE --name "lidarr" \ | |
boot="on" \ | |
vnet="on" \ | |
allow_raw_sockets="1" \ | |
defaultrouter="192.168.1.1" \ | |
ip4_addr="vnet0|192.168.1.16/24" | |
iocage exec lidarr "mkdir -p /usr/local/etc/pkg/repos" | |
iocage exec lidarr "echo -e 'FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/latest\" }' > /usr/local/etc/pkg/repos/FreeBSD.conf" | |
iocage exec lidarr /bin/tcsh -c 'setenv ASSUME_ALWAYS_YES yes; pkg install mono mediainfo sqlite3 ca_root_nss curl chromaprint' | |
iocage exec lidarr mkdir -p /settings | |
iocage exec lidarr mkdir -p /mnt/media/music | |
zfs create tank/apps/lidarr | |
iocage fstab -a lidarr /mnt/tank/apps/lidarr /settings nullfs rw 0 0 | |
iocage fstab -a lidarr /mnt/tank/media/music /mnt/media/music nullfs rw 0 0 | |
iocage exec lidarr ln -s /usr/local/bin/mono /usr/bin/mono | |
iocage exec lidarr "fetch https://github.com/lidarr/Lidarr/releases/download/v0.7.1.1381/Lidarr.master.0.7.1.1381.linux.tar.gz -o /usr/local/share" | |
iocage exec lidarr "tar -xzvf /usr/local/share/Lidarr.*tar.gz -C /usr/local/share" | |
iocage exec lidarr "rm /usr/local/share/Lidarr.*tar.gz" | |
iocage exec lidarr "pw user add lidarr -c lidarr -u 353 -d /nonexistent -s /usr/bin/nologin" | |
iocage exec lidarr "pw groupadd -n media -g 8675309" | |
iocage exec lidarr "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin" | |
iocage exec lidarr "pw groupmod media -m lidarr" | |
iocage exec lidarr chown -R media:media /usr/local/share/Lidarr /settings /mnt/media/music | |
iocage exec lidarr mkdir /usr/local/etc/rc.d | |
vi /mnt/tank/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr | |
iocage exec lidarr chmod u+x /usr/local/etc/rc.d/lidarr | |
iocage exec lidarr sysrc "lidarr_enable=YES" | |
iocage exec lidarr sysrc "lidarr_user=media" | |
iocage exec lidarr sysrc "lidarr_group=media" | |
iocage exec lidarr service lidarr start | |
# }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment