Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
root only for now
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Feb 18, 2010
1 parent 9f81e93 commit 7610fbe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions couchdb/couchdb-lounge/lounge-shard-init
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

COUCHDB_EBS=/couchdb/couchdb/
COUCHDB_USER=root
COUCHDB_USER=root # We only support root right now.
COUCHDB_OPTS=" -r 5 -o /dev/null -e /dev/null"

build_pid () {
Expand All @@ -22,12 +22,11 @@ start_lounge () {

pid_file=$(build_pid $file)

init_cmd="sudo su -c'${COUCHDB_EBS}bin/couchdb"
init_cmd="${COUCHDB_EBS}bin/couchdb"
init_cmd="${init_cmd} -a ${file}"
init_cmd="${init_cmd} -b"
init_cmd="${init_cmd} -p ${pid_file}"
init_cmd="${init_cmd} ${COUCHDB_OPTS}"
init_cmd="${init_cmd} ${COUCHDB_USER}"

$init_cmd
done
Expand All @@ -36,13 +35,12 @@ start_lounge () {
stop_lounge () {
for file in $(find ${COUCHDB_EBS}etc/couchdb -type f -iname 'local-*.ini'); do

stop_cmd="sudo su -c'${COUCHDB_EBS}bin/couchdb"
stop_cmd="${COUCHDB_EBS}bin/couchdb"
stop_cmd="${stop_cmd} -a ${file}"
stop_cmd="${stop_cmd} -b"
stop_cmd="${stop_cmd} -p ${pid_file}"
stop_cmd="${stop_cmd} ${COUCHDB_OPTS}"
stop_cmd="${stop_cmd} -d"
stop_cmd="${stop_cmd} ${COUCHDB_USER}"

$stop_cmd
done
Expand Down

0 comments on commit 7610fbe

Please sign in to comment.