Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

create /var/run/couchdb during init script

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766338 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit fd9f3fd8212fd272c112af0942f5e0af6bed7595 1 parent c017149
Noah Slater nslater authored
2  README
@@ -150,14 +150,12 @@ Change the ownership of the Apache CouchDB directories by running:
150 150 chown -R couchdb:couchdb /usr/local/etc/couchdb
151 151 chown -R couchdb:couchdb /usr/local/var/lib/couchdb
152 152 chown -R couchdb:couchdb /usr/local/var/log/couchdb
153   - chown -R couchdb:couchdb /usr/local/var/run/couchdb
154 153
155 154 Change the permission of the Apache CouchDB directories by running:
156 155
157 156 chmod -R 0770 /usr/local/etc/couchdb
158 157 chmod -R 0770 /usr/local/var/lib/couchdb
159 158 chmod -R 0770 /usr/local/var/log/couchdb
160   - chmod -R 0770 /usr/local/var/run/couchdb
161 159
162 160 Running Manually
163 161 ^^^^^^^^^^^^^^^^
1  etc/Makefile.am
@@ -44,6 +44,7 @@ init/couchdb: init/couchdb.tpl
44 44 -e "s|%bindir%|$(bindir)|" \
45 45 -e "s|%sysconfdir%|$(sysconfdir)|" \
46 46 -e "s|%localerlangbindir%|$(localerlangbindir)|" \
  47 + -e "s|%localstaterundir%|$(localstaterundir)|" \
47 48 -e "s|%couchdb_command_name%|$(couchdb_command_name)|" \
48 49 < $< > $@
49 50
3  etc/init/couchdb.tpl.in
@@ -30,6 +30,7 @@ NAME=couchdb
30 30 SCRIPT_NAME=`basename $0`
31 31 COUCHDB=%bindir%/%couchdb_command_name%
32 32 CONFIGURATION_FILE=%sysconfdir%/default/couchdb
  33 +RUN_DIR=%localstaterundir%
33 34 LSB_LIBRARY=/lib/lsb/init-functions
34 35
35 36 if test ! -x $COUCHDB; then
@@ -75,7 +76,9 @@ start_couchdb () {
75 76 if test -n "$COUCHDB_OPTIONS"; then
76 77 command="$command $COUCHDB_OPTIONS"
77 78 fi
  79 + mkdir -p "$RUN_DIR"
78 80 if test -n "$COUCHDB_USER"; then
  81 + chown $COUCHDB_USER "$RUN_DIR"
79 82 if su $COUCHDB_USER -c "$command" > /dev/null; then
80 83 return $SCRIPT_OK
81 84 else
2  var/Makefile.am
@@ -14,10 +14,8 @@ install-data-hook:
14 14 if test ! "$(mkdir_p)" = ""; then \
15 15 $(mkdir_p) "$(DESTDIR)$(localstatelibdir)"; \
16 16 $(mkdir_p) "$(DESTDIR)$(localstatelogdir)"; \
17   - $(mkdir_p) "$(DESTDIR)$(localstaterundir)"; \
18 17 else \
19 18 echo "WARNING: You may have to create these directories by hand."; \
20 19 mkdir -p "$(DESTDIR)$(localstatelibdir)"; \
21 20 mkdir -p "$(DESTDIR)$(localstatelogdir)"; \
22   - mkdir -p "$(DESTDIR)$(localstaterundir)"; \
23 21 fi

0 comments on commit fd9f3fd

Please sign in to comment.
Something went wrong with that request. Please try again.