PKGBUILDs/aur/couchpotato-git/couchpotato.install
Kevin Mihelich 7b913a6cea aur updates
2013-05-21 22:08:05 +00:00

23 lines
660 B
Plaintext

CP_USER="couchpotato"
CP_GROUP="couchpotato"
CP_DIR="/opt/couchpotato"
## arg 1: the new package version
post_install() {
groupadd ${CP_GROUP} &> /dev/null
useradd -g ${CP_GROUP} -d ${CP_DIR} -s /bin/false ${CP_USER} &> /dev/null
chown -R ${CP_USER}:${CP_GROUP} ${CP_DIR}
echo " >> If you want a custom user or path for CouchPotato, remember to edit the service file as well."
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
chown -R ${CP_USER}:${CP_GROUP} ${CP_DIR}
}
## arg 1: the old package version
post_remove() {
userdel ${CP_USER} &> /dev/null
groupdel ${CP_GROUP} &> /dev/null || /bin/true
}