summarylogtreecommitdiffstats
path: root/sphinx.install
diff options
context:
space:
mode:
authorFlorijan Hamzic2018-05-18 12:43:50 +0200
committerFlorijan Hamzic2018-05-18 12:43:50 +0200
commit24a176389a51ec685a0e607f1c910266968f03ab (patch)
treea4dff529a2ebc8f6bab35bc1ac8a108c1d72dabb /sphinx.install
downloadaur-24a176389a51ec685a0e607f1c910266968f03ab.tar.gz
initial commit
Diffstat (limited to 'sphinx.install')
-rw-r--r--sphinx.install17
1 files changed, 17 insertions, 0 deletions
diff --git a/sphinx.install b/sphinx.install
new file mode 100644
index 000000000000..7fbeb17fef2a
--- /dev/null
+++ b/sphinx.install
@@ -0,0 +1,17 @@
+post_install() {
+ groupadd --system sphinx &>/dev/null
+ useradd --system -g sphinx -d /var/lib/sphinx -s /bin/false sphinx &>/dev/null
+ chown -R sphinx:sphinx /var/lib/sphinx
+}
+
+post_upgrade(){
+ getent group sphinx >/dev/null 2>&1 || groupadd --system sphinx &>/dev/null
+ getent passwd sphinx >/dev/null 2>&1 || useradd --system -s /bin/false -g sphinx -d /var/lib/sphinx \
+ -s /bin/false sphinx &>/dev/null
+}
+
+## arg 1: the old package version
+post_remove() {
+ userdel sphinx
+ groupdel sphinx
+}