summarylogtreecommitdiffstats
path: root/sonarr.install
blob: 2af24a1e1abc73e5e25b79d9622164e3d0d729ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
post_install() {
    systemd-sysusers sonarr.conf

    mkdir -p /var/lib/sonarr
    if [[ ! -f /var/lib/sonarr/config.xml ]]
    then
        if [[ -f /var/lib/nzbdrone/config.xml ]]
        then
            echo "A previous installation of nzbdrone has been detected. Copying previous configuration to Sonarr"
            cp -r /var/lib/nzbdrone/* /var/lib/sonarr
        fi
        chown -R sonarr: /var/lib/sonarr
    fi
}

post_upgrade() {
    post_install $1
}