Permalink
Browse files

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...
1 parent c017149 commit fd9f3fd8212fd272c112af0942f5e0af6bed7595 @nslater nslater committed Apr 18, 2009
Showing with 4 additions and 4 deletions.
  1. +0 −2 README
  2. +1 −0 etc/Makefile.am
  3. +3 −0 etc/init/couchdb.tpl.in
  4. +0 −2 var/Makefile.am
View
2 README
@@ -150,14 +150,12 @@ Change the ownership of the Apache CouchDB directories by running:
chown -R couchdb:couchdb /usr/local/etc/couchdb
chown -R couchdb:couchdb /usr/local/var/lib/couchdb
chown -R couchdb:couchdb /usr/local/var/log/couchdb
- chown -R couchdb:couchdb /usr/local/var/run/couchdb
Change the permission of the Apache CouchDB directories by running:
chmod -R 0770 /usr/local/etc/couchdb
chmod -R 0770 /usr/local/var/lib/couchdb
chmod -R 0770 /usr/local/var/log/couchdb
- chmod -R 0770 /usr/local/var/run/couchdb
Running Manually
^^^^^^^^^^^^^^^^
View
1 etc/Makefile.am
@@ -44,6 +44,7 @@ init/couchdb: init/couchdb.tpl
-e "s|%bindir%|$(bindir)|" \
-e "s|%sysconfdir%|$(sysconfdir)|" \
-e "s|%localerlangbindir%|$(localerlangbindir)|" \
+ -e "s|%localstaterundir%|$(localstaterundir)|" \
-e "s|%couchdb_command_name%|$(couchdb_command_name)|" \
< $< > $@
View
3 etc/init/couchdb.tpl.in
@@ -30,6 +30,7 @@ NAME=couchdb
SCRIPT_NAME=`basename $0`
COUCHDB=%bindir%/%couchdb_command_name%
CONFIGURATION_FILE=%sysconfdir%/default/couchdb
+RUN_DIR=%localstaterundir%
LSB_LIBRARY=/lib/lsb/init-functions
if test ! -x $COUCHDB; then
@@ -75,7 +76,9 @@ start_couchdb () {
if test -n "$COUCHDB_OPTIONS"; then
command="$command $COUCHDB_OPTIONS"
fi
+ mkdir -p "$RUN_DIR"
if test -n "$COUCHDB_USER"; then
+ chown $COUCHDB_USER "$RUN_DIR"
if su $COUCHDB_USER -c "$command" > /dev/null; then
return $SCRIPT_OK
else
View
2 var/Makefile.am
@@ -14,10 +14,8 @@ install-data-hook:
if test ! "$(mkdir_p)" = ""; then \
$(mkdir_p) "$(DESTDIR)$(localstatelibdir)"; \
$(mkdir_p) "$(DESTDIR)$(localstatelogdir)"; \
- $(mkdir_p) "$(DESTDIR)$(localstaterundir)"; \
else \
echo "WARNING: You may have to create these directories by hand."; \
mkdir -p "$(DESTDIR)$(localstatelibdir)"; \
mkdir -p "$(DESTDIR)$(localstatelogdir)"; \
- mkdir -p "$(DESTDIR)$(localstaterundir)"; \
fi

0 comments on commit fd9f3fd

Please sign in to comment.