2020-02-24 13:35:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-02-24 13:45:03 +00:00
|
|
|
echo '{"pkgs":["plexmediaserver-plexpass","ca_root_nss","nano"]}' > /tmp/pkg.json
|
2020-02-27 14:05:08 +00:00
|
|
|
iocage create -n "plex" -p /tmp/pkg.json -r 11.3-RELEASE interfaces="vnet0:bridge30" ip4_addr="vnet0|192.168.30.26/24" defaultrouter="192.168.30.1" vnet="on" allow_raw_sockets="1" boot="on"
|
2020-02-24 13:35:03 +00:00
|
|
|
rm /tmp/pkg.json
|
2020-02-24 13:45:03 +00:00
|
|
|
iocage exec plex "mkdir -p /usr/local/etc/pkg/repos"
|
2020-02-27 18:58:24 +00:00
|
|
|
cp ../includes/plex-conf/FreeBSD.conf /mnt/tank/iocage/jails/plex/root/usr/local/etc/pkg/repos/FreeBSD.conf
|
2020-02-24 13:35:03 +00:00
|
|
|
iocage exec plex mkdir -p /config
|
|
|
|
iocage exec plex mkdir -p /mnt/library
|
|
|
|
iocage fstab -a plex /mnt/tank/apps/plex /config nullfs rw 0 0
|
|
|
|
iocage fstab -a plex /mnt/tank/Library /mnt/library nullfs ro 0 0
|
|
|
|
iocage exec plex chown -R plex:plex /config
|
|
|
|
iocage exec plex sysrc "plexmediaserver_plexpass_enable=YES"
|
|
|
|
iocage exec plex sysrc plexmediaserver_plexpass_support_path="/config"
|
2020-02-24 15:00:03 +00:00
|
|
|
iocage exec plex pkg update -y
|
|
|
|
iocage exec plex pkg upgrade -y
|
2020-02-24 14:49:54 +00:00
|
|
|
iocage exec plex chown -R plex:plex /usr/local/share/plexmediaserver-plexpass/
|
2020-02-24 15:18:46 +00:00
|
|
|
iocage exec plex service plexmediaserver_plexpass start
|
2020-02-24 15:21:49 +00:00
|
|
|
sleep 10s
|
|
|
|
echo "Waiting 20s to stop plex"
|
|
|
|
iocage stop plex
|
|
|
|
sleep 10s
|
|
|
|
echo "Waiting 20s to start plex"
|
|
|
|
iocage start plex
|
2020-02-24 15:48:41 +00:00
|
|
|
iocage exec plex service plexmediaserver_plexpass start
|
2020-02-24 15:21:49 +00:00
|
|
|
echo "Finished installing plex"
|