scripts/fogcutter/podman/plex.sh

39 lines
930 B
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
2020-12-28 19:38:09 -05:00
loginctl enable-linger $USER
2020-12-26 23:16:52 -05:00
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
2020-12-28 19:38:09 -05:00
podman generate systemd plex --restart-policy=always --name > $HOME/.config/systemd/user/plex.service
2020-12-26 23:16:52 -05:00
systemctl --user daemon-reload
2020-12-27 03:14:45 -05:00
systemctl start --user plex || systemctl restart --user plex
2020-12-26 23:16:52 -05:00
systemctl enable --user plex
}
down () {
systemctl stop --user plex || true
systemctl disable --user plex || true
podman rm plex || true
}
logs () {
podman logs --follow plex
}
$@