summaryrefslogtreecommitdiff
path: root/bin/couchdb.tpl.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/couchdb.tpl.in')
-rw-r--r--bin/couchdb.tpl.in24
1 files changed, 0 insertions, 24 deletions
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 290d1ec3..b6df1abb 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -40,8 +40,6 @@ HEART_BEAT_TIMEOUT=11
basename=`basename $0`
display_version () {
- # Display version and copyright information.
-
cat << EOF
$basename - %package_name% %version%
@@ -59,8 +57,6 @@ EOF
}
display_help () {
- # Display a short description of the script's behaviour.
-
cat << EOF
Usage: $basename [OPTION]
@@ -92,8 +88,6 @@ EOF
}
display_error () {
- # Display a short instruction referring users to further documentation.
-
if test -n "$1"; then
echo $1 >&2
fi
@@ -103,8 +97,6 @@ display_error () {
}
_load_configuration () {
- # Load ini configuration and overwrite default variables.
-
dbrootdir_ini_value=`%AWK% -F = "/^DbRootDir=/{print \\$2}" < $INI_FILE`
if test -n "$dbrootdir_ini_value"; then
LIB_DIRECTORY=$dbrootdir_ini_value
@@ -123,8 +115,6 @@ _get_pid () {
}
check_status () {
- # Check the status of the running Apache CouchDB process.
-
PID=`_get_pid`
if test -n "$PID"; then
if kill -0 $PID 2> /dev/null; then
@@ -142,8 +132,6 @@ EOF
}
check_environment () {
- # Check the environment for common problems to prevent nasty backtraces.
-
message_prefix="Apache CouchDB needs write permission on the"
if test ! -w $LIB_DIRECTORY; then
echo "$message_prefix data directory: $LIB_DIRECTORY" >&2
@@ -201,8 +189,6 @@ check_environment () {
}
start_couchdb () {
- # Start Apache CouchDB with the Erlang interpreter.
-
if test ! "$RECURSED_BOOLEAN" = "true"; then
if check_status 2> /dev/null; then
exit $SCRIPT_OK
@@ -230,7 +216,6 @@ start_couchdb () {
-couchini $INI_FILE"
if test "$BACKGROUND_BOOLEAN" = "true" \
-a "$RECURSED_BOOLEAN" = "false"; then
- # Recursively call and detach a duplicate couchdb command.
$0 -c $INI_FILE -b -r $RESPAWN_TIMEOUT -p $PID_FILE \
-o $STDOUT_FILE -e $STDERR_FILE -R &
echo "Apache CouchDB has started. Time to relax."
@@ -244,16 +229,12 @@ start_couchdb () {
PID=`_get_pid`
if test -n "$PID"; then
if kill -0 $PID 2> /dev/null; then
- # Found an existing process, do not respawn.
return $SCRIPT_ERROR
fi
- # Stale PID file, we should respawn.
else
- # No PID file, do not respawn.
return $SCRIPT_OK
fi
if test "$RESPAWN_TIMEOUT" = "0"; then
- # RESPAWN_TIMEOUT is zero, do not respawn.
return $SCRIPT_OK
fi
if test "$RESPAWN_TIMEOUT" != "1"; then
@@ -271,11 +252,8 @@ EOF
}
stop_couchdb () {
- # Send SIGHUP to the running Apache CouchDB process.
-
PID=`_get_pid`
if test -n "$PID"; then
- # Clean up PID file or leave stale for respawn.
if test "$1" = "false"; then
echo > $PID_FILE
fi
@@ -303,8 +281,6 @@ stop_couchdb () {
}
parse_script_option_list () {
- # Parse the script option list and take the appropriate action.
-
set +e
options=`getopt hVc:ibp:r:Ro:e:skd $@`
if test ! $? -eq 0; then