summarylogtreecommitdiffstats
path: root/couchpotato.install
diff options
context:
space:
mode:
authorBen Ruijl2016-05-05 11:41:02 +0200
committerBen Ruijl2016-05-05 11:41:02 +0200
commit3f2e4c483a84333e5eb56941e774410a26febfe3 (patch)
treeb74d82960348e8ab0b1a5eb9be3b5c9f4dfec8e1 /couchpotato.install
parentf7c0ddce362e1ffbddedb3be9376e2b813872f78 (diff)
downloadaur-3f2e4c483a84333e5eb56941e774410a26febfe3.tar.gz
Several fixes
- env python is replaced by env python2 - No more forking for systemd process - Added provides and conflicts
Diffstat (limited to 'couchpotato.install')
-rw-r--r--couchpotato.install4
1 files changed, 2 insertions, 2 deletions
diff --git a/couchpotato.install b/couchpotato.install
index 34c1b3c5b073..0f41eab118aa 100644
--- a/couchpotato.install
+++ b/couchpotato.install
@@ -4,8 +4,8 @@ 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
+ getent group ${CP_GROUP} &> /dev/null || groupadd -r ${CP_GROUP} &> /dev/null
+ getent passwd ${CP_USER} &> /dev/null || useradd -r -g ${CP_GROUP} -d ${CP_DIR} -s /usr/bin/nologin ${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."
}