summaryrefslogtreecommitdiff
path: root/~xihh/couchdb-git/couchdb.install
diff options
context:
space:
mode:
Diffstat (limited to '~xihh/couchdb-git/couchdb.install')
-rw-r--r--~xihh/couchdb-git/couchdb.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/~xihh/couchdb-git/couchdb.install b/~xihh/couchdb-git/couchdb.install
new file mode 100644
index 000000000..5eff459c7
--- /dev/null
+++ b/~xihh/couchdb-git/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
+}