[Unit] Description=Mistborn Jellyfin Service Requires=Mistborn-nextcloud.service After=Mistborn-nextcloud.service PartOf=Mistborn-base.service [Service] Restart=always User=root Group=docker PermissionsStartOnly=true # Shutdown container (if running) when unit is stopped ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh jellyfin docker-compose -f /opt/mistborn/extra/jellyfin.yml down # Start container when unit is started ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh jellyfin docker-compose -f /opt/mistborn/extra/jellyfin.yml up --build # Stop container when unit is stopped ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh jellyfin docker-compose -f /opt/mistborn/extra/jellyfin.yml stop -t 60 # Post stop [Install] WantedBy=multi-user.target