scripts/fogcutter/podman/airsonic.sh

39 lines
968 B
Bash
Raw Normal View History

2020-12-26 23:16:52 -05:00
#!/bin/bash
set -e
up () {
loginctl enable-linger paul
podman network create pew-net || true
# Exposed on port 4040 in pew-net
podman create \
--name airsonic \
--env PUID=1000 \
--env PGID=1000 \
--env TZ=US/Eastern \
--volume /bigdata/k8s-config/airsonic/config:/config:rw \
--volume /bigdata/media/music:/media/music:ro \
--volume /bigdata/media/playlists:/media/playlists:ro \
--volume /bigdata/media/podcasts:/media/podcasts:ro \
--network pew-net \
linuxserver/airsonic:v10.6.2-ls83
podman generate systemd airsonic --restart-policy=always --name > ~/.config/systemd/user/airsonic.service
systemctl --user daemon-reload
systemctl restart --user airsonic || systemctl start --user airsonic
systemctl enable --user airsonic
}
down () {
systemctl stop --user airsonic || true
systemctl disable --user airsonic || true
podman rm airsonic || true
}
logs () {
podman logs --follow airsonic
}
$@