#!/bin/bash # Cleanly kill plex when container is stopped trap 'kill $(jobs -p)' EXIT su -c "/usr/sbin/start_pms" plex