Author: nslater
Date: Sat Apr 18 15:20:00 2009
New Revision: 766338

URL: http://svn.apache.org/viewvc?rev=766338&view=rev
Log:
create /var/run/couchdb during init script

Modified:
    couchdb/trunk/README
    couchdb/trunk/etc/Makefile.am
    couchdb/trunk/etc/init/couchdb.tpl.in
    couchdb/trunk/var/Makefile.am

Modified: couchdb/trunk/README
URL: 
http://svn.apache.org/viewvc/couchdb/trunk/README?rev=766338&r1=766337&r2=766338&view=diff
==============================================================================
--- couchdb/trunk/README (original)
+++ couchdb/trunk/README Sat Apr 18 15:20:00 2009
@@ -150,14 +150,12 @@
     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
 ^^^^^^^^^^^^^^^^

Modified: couchdb/trunk/etc/Makefile.am
URL: 
http://svn.apache.org/viewvc/couchdb/trunk/etc/Makefile.am?rev=766338&r1=766337&r2=766338&view=diff
==============================================================================
--- couchdb/trunk/etc/Makefile.am (original)
+++ couchdb/trunk/etc/Makefile.am Sat Apr 18 15:20:00 2009
@@ -44,6 +44,7 @@
            -e "s|%bindir%|$(bindir)|" \
            -e "s|%sysconfdir%|$(sysconfdir)|" \
            -e "s|%localerlangbindir%|$(localerlangbindir)|" \
+           -e "s|%localstaterundir%|$(localstaterundir)|" \
            -e "s|%couchdb_command_name%|$(couchdb_command_name)|" \
        < $< > $@
 

Modified: couchdb/trunk/etc/init/couchdb.tpl.in
URL: 
http://svn.apache.org/viewvc/couchdb/trunk/etc/init/couchdb.tpl.in?rev=766338&r1=766337&r2=766338&view=diff
==============================================================================
--- couchdb/trunk/etc/init/couchdb.tpl.in (original)
+++ couchdb/trunk/etc/init/couchdb.tpl.in Sat Apr 18 15:20:00 2009
@@ -30,6 +30,7 @@
 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 @@
     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

Modified: couchdb/trunk/var/Makefile.am
URL: 
http://svn.apache.org/viewvc/couchdb/trunk/var/Makefile.am?rev=766338&r1=766337&r2=766338&view=diff
==============================================================================
--- couchdb/trunk/var/Makefile.am (original)
+++ couchdb/trunk/var/Makefile.am Sat Apr 18 15:20:00 2009
@@ -14,10 +14,8 @@
        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


Reply via email to