summaryrefslogtreecommitdiff
path: root/community-testing/couchdb/couchdb.install
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/couchdb/couchdb.install')
-rw-r--r--community-testing/couchdb/couchdb.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/community-testing/couchdb/couchdb.install b/community-testing/couchdb/couchdb.install
new file mode 100644
index 000000000..5eff459c7
--- /dev/null
+++ b/community-testing/couchdb/couchdb.install
@@ -0,0 +1,22 @@
+post_install() {
+ id couchdb &>/dev/null || \
+ useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
+ mkdir -p /var/run/couchdb
+ chown -R couchdb.daemon /etc/couchdb
+ chown -R couchdb.daemon /var/{lib,log,run}/couchdb
+}
+
+pre_upgrade() {
+ id couchdb &>/dev/null || \
+ useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
+}
+
+post_upgrade() {
+ mkdir -p $pkgdir/var/run/couchdb
+ chown -R couchdb.daemon /etc/couchdb
+ chown -R couchdb.daemon /var/{lib,log,run}/couchdb
+}
+
+post_remove() {
+ userdel couchdb &>/dev/null
+}