diff options
author | Noah Slater <nslater@apache.org> | 2009-04-18 15:20:00 +0000 |
---|---|---|
committer | Noah Slater <nslater@apache.org> | 2009-04-18 15:20:00 +0000 |
commit | fd9f3fd8212fd272c112af0942f5e0af6bed7595 (patch) | |
tree | f0407f23e88a994bcb5f8d2c8d5fff2d50181bc6 | |
parent | c0171495ea1cd8b552ae39a23ad584eec5190860 (diff) |
create /var/run/couchdb during init script
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766338 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | etc/Makefile.am | 1 | ||||
-rw-r--r-- | etc/init/couchdb.tpl.in | 3 | ||||
-rw-r--r-- | var/Makefile.am | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -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 ^^^^^^^^^^^^^^^^ diff --git a/etc/Makefile.am b/etc/Makefile.am index 3655cd45..737230b8 100644 --- a/etc/Makefile.am +++ b/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)|" \ < $< > $@ diff --git a/etc/init/couchdb.tpl.in b/etc/init/couchdb.tpl.in index c6dca764..358cf87d 100644 --- a/etc/init/couchdb.tpl.in +++ b/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 diff --git a/var/Makefile.am b/var/Makefile.am index a2672bf9..a725a124 100644 --- a/var/Makefile.am +++ b/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 |