From fd9f3fd8212fd272c112af0942f5e0af6bed7595 Mon Sep 17 00:00:00 2001 From: Noah Slater Date: Sat, 18 Apr 2009 15:20:00 +0000 Subject: create /var/run/couchdb during init script git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@766338 13f79535-47bb-0310-9956-ffa450edef68 --- etc/init/couchdb.tpl.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'etc/init/couchdb.tpl.in') 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 -- cgit v1.2.3