mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
22 lines
660 B
Text
22 lines
660 B
Text
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
|
|
}
|