summarylogtreecommitdiffstats
path: root/radarr.install
blob: ac5d8f787cd0778b9b44e905fd29d36a1a88c909 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
    if grep -q "^radarr" /etc/group &> /dev/null ; then
        groupmod -n radarr radarr &> /dev/null                                                 
    else
        groupadd -r radarr &> /dev/null
    fi
    if grep -q "^radarr:" /etc/passwd 2> /dev/null ; then
        usermod -s /bin/false -c "Radarr daemon" -d /var/lib/radarr -g radarr radarr &> /dev/null
    else
        useradd -s /bin/false -c "Radarr daemon user" -d /var/lib/radarr -g radarr -r radarr &> /dev/null
    fi

    mkdir -p /var/lib/radarr
    chown -R radarr: /var/lib/radarr
}

post_upgrade() {
    post_install $1
}