jailman move

This commit is contained in:
Kjeld Schouten-Lebbing
2023-03-16 09:54:20 +01:00
parent 1d32ed34c1
commit 92fa99d689
124 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,3 @@
blueprint:
plex:
pkgs: plexmediaserver

View File

@ -0,0 +1,3 @@
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}

View File

@ -0,0 +1,51 @@
#!/usr/local/bin/bash
# This file contains the install script for plex
iocage exec plex mkdir -p /usr/local/etc/pkg/repos
# Change to to more frequent FreeBSD repo to stay up-to-date with plex more.
# shellcheck disable=SC2154
cp "${SCRIPT_DIR}"/blueprints/plex/includes/FreeBSD.conf /mnt/"${global_dataset_iocage}"/jails/"$1"/root/usr/local/etc/pkg/repos/FreeBSD.conf
# Check if datasets for media librarys exist, create them if they do not.
# shellcheck disable=SC2154
createmount "$1" "${global_dataset_media}" /mnt/media
createmount "$1" "${global_dataset_media}"/movies /mnt/media/movies
createmount "$1" "${global_dataset_media}"/music /mnt/media/music
createmount "$1" "${global_dataset_media}"/shows /mnt/media/shows
# Create plex ramdisk if specified
# shellcheck disable=SC2154
if [ -z "${plex_ramdisk}" ]; then
echo "no ramdisk specified for plex, continuing without ramdisk"
else
iocage fstab -a "$1" tmpfs /tmp_transcode tmpfs rw,size="${plex_ramdisk}",mode=1777 0 0
fi
iocage exec "$1" chown -R plex:plex /config
# Force update pkg to get latest plex version
iocage exec "$1" pkg update
iocage exec "$1" pkg upgrade -y
# Add plex user to video group for future hw-encoding support
iocage exec "$1" pw groupmod -n video -m plex
# Run different install procedures depending on Plex vs Plex Beta
# shellcheck disable=SC2154
if [ "$plex_beta" == "true" ]; then
echo "beta enabled in config.yml... using plex beta for install"
iocage exec "$1" sysrc "plexmediaserver_plexpass_enable=YES"
iocage exec "$1" sysrc plexmediaserver_plexpass_support_path="/config"
iocage exec "$1" chown -R plex:plex /usr/local/share/plexmediaserver-plexpass/
iocage exec "$1" service plexmediaserver_plexpass restart
else
echo "beta disabled in config.yml... NOT using plex beta for install"
iocage exec "$1" sysrc "plexmediaserver_enable=YES"
iocage exec "$1" sysrc plexmediaserver_support_path="/config"
iocage exec "$1" chown -R plex:plex /usr/local/share/plexmediaserver/
iocage exec "$1" service plexmediaserver restart
fi
echo "Finished installing plex"

View File

@ -0,0 +1,14 @@
# Plex
### Config Parameters:
- beta: set to `true` if you want to run the plex beta (previously known as "plexpass"). Please note: This is not required for plexpass features
For more information about plex, please see the Plex website:
### Config Parameters:
- ramdisk: Specify the `size` parameter to create a transcoding ramdisk under /tmp_transcode. Requires manual setting it un plex to be used for transcoding. (optional)
# Original plex install script guide
https://www.ixsystems.com/community/resources/fn11-3-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-transmission-organizr.58/

View File

@ -0,0 +1,23 @@
#!/usr/local/bin/bash
# This file contains the update script for Plex
# Run different update procedures depending on Plex vs Plex Beta
# shellcheck disable=SC2154
if [ "$plex_plexpass" == "true" ]; then
echo "beta enabled in config.yml... using plex beta for update..."
iocage exec "$1" service plexmediaserver_plexpass stop
# Plex is updated using PKG already, this is mostly a placeholder
iocage exec "$1" chown -R plex:plex /usr/local/share/plexmediaserver-plexpass/
iocage exec "$1" service plexmediaserver_plexpass restart
else
echo "beta disabled in config.yml... NOT using plex beta for update..."
iocage exec "$1" service plexmediaserver stop
# Plex is updated using PKG already, this is mostly a placeholder
iocage exec "$1" chown -R plex:plex /usr/local/share/plexmediaserver/
iocage exec "$1" service plexmediaserver restart
fi