Hello guys,

As other users have asked in the past to this list couchdb will not
run from a remote interactive shell but rather it will be killed when
the ssh session terminates. The command nohup can help with that. Here
is what I did (which works OK):
run_command () {
    command="$1"
    if test -n "$COUCHDB_OPTIONS"; then
        command="$command $COUCHDB_OPTIONS"
    fi
    if test -n "$COUCHDB_USER"; then
        if nohup su $COUCHDB_USER -c "$command"; then
            return $SCRIPT_OK
        else
            return $SCRIPT_ERROR
        fi
    else
        if $command; then
            return $SCRIPT_OK
        else
            return $SCRIPT_ERROR
        fi
    fi
}


Does it make sense to add nohup to init.d/couchdb script? Or is there
a better way to remotely run couchdb?

Thanks,

- Nestor

Reply via email to