post_install() {
    systemd-sysusers sonarr.conf

    mkdir -p /var/lib/sonarr
    if [[ ! -f /var/lib/sonarr/config.xml ]]; then
        chown -R sonarr: /var/lib/sonarr
    fi
}

post_upgrade() {
    post_install $1
}

