incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nestor.urqu...@gmail.com>
Subject Running couchdb remotely (from an interactive shell)
Date Tue, 11 Dec 2012 18:53:12 GMT
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

Mime
View raw message