#!/bin/bash set -e up () { loginctl enable-linger paul podman network create pew-net || true # Exposed on port 32400 in pew-net podman create \ --name plex \ --env PUID=1000 \ --env PGID=1000 \ --env VERSION=docker \ --volume /bigdata/k8s-config/plex/config:/config:rw \ --volume /bigdata/media/movies:/media/movies:ro \ --volume /bigdata/media/music:/media/music:ro \ --volume /media-vtluug:/media/media-vtluug:ro \ --network pew-net \ linuxserver/plex:1.20.3.3483-211702a9f-ls122 podman generate systemd plex --restart-policy=always --name > ~/.config/systemd/user/plex.service systemctl --user daemon-reload systemctl restart --user plex || systemctl start --user plex systemctl enable --user plex } down () { systemctl stop --user plex || true systemctl disable --user plex || true podman rm plex || true } logs () { podman logs --follow plex } $@