PKGBUILDs/aur/couchpotato-git/couchpotato.install

23 lines
660 B
Text
Raw Normal View History

2013-05-21 22:08:05 +00:00
CP_USER="couchpotato"
CP_GROUP="couchpotato"
CP_DIR="/opt/couchpotato"
2011-02-28 03:00:10 +00:00
## arg 1: the new package version
post_install() {
2013-05-21 22:08:05 +00:00
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."
2011-02-28 03:00:10 +00:00
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
2013-05-21 22:08:05 +00:00
chown -R ${CP_USER}:${CP_GROUP} ${CP_DIR}
2011-02-28 03:00:10 +00:00
}
## arg 1: the old package version
2012-10-13 22:26:49 +00:00
post_remove() {
2013-05-21 22:08:05 +00:00
userdel ${CP_USER} &> /dev/null
groupdel ${CP_GROUP} &> /dev/null || /bin/true
2011-02-28 03:00:10 +00:00
}