summarylogtreecommitdiffstats
path: root/jackett.install
blob: 24c913040d54bbe43f47ae7fe61e92ce204c0518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
post_install() {
	if grep -q "^jackett" /etc/group &> /dev/null ; then
		groupmod -n jackett jackett &> /dev/null                                                 
	else
		groupadd -r jackett &> /dev/null
	fi
	if grep -q "^jackett:" /etc/passwd 2> /dev/null ; then
		usermod -s /bin/false -c "jackett daemon" -d /usr/share/Jackett -g jackett jackett &> /dev/null
	else
		useradd -s /bin/false -c "jackett daemon user" -d /usr/share/Jackett -g jackett -r jackett &> /dev/null
	fi
    chown -R jackett: /usr/share/Jackett
}

post_upgrade() {
	post_install $1
}