post_install() { systemd-sysusers plex.sysusers [[ -d /data/storage/disk0/media/plex ]] || install -dm 750 -o plex -g plex /data/storage/disk0/media/plex [[ -d /data/storage/disk0/media/plex/tmp ]] || install -dm 750 -o plex -g plex /data/storage/disk0/media/plex/tmp [[ -d /data/storage/disk0/media/plex ]] && chown -R plex:plex /data/storage/disk0/media/plex add_service.sh plexmediaserver } post_upgrade() { [[ -d /data/storage/disk0/media/plex ]] && chown -R plex:plex /data/storage/disk0/media/plex } post_remove() { remove_service.sh plexmediaserver } # vim: ts=2 sw=2 et: