From user-return-23068-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Dec 11 18:53:43 2012 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D271ED712 for ; Tue, 11 Dec 2012 18:53:43 +0000 (UTC) Received: (qmail 96898 invoked by uid 500); 11 Dec 2012 18:53:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 96866 invoked by uid 500); 11 Dec 2012 18:53:42 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 96858 invoked by uid 99); 11 Dec 2012 18:53:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 18:53:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nestor.urquiza@gmail.com designates 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pb0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 18:53:35 +0000 Received: by mail-pb0-f52.google.com with SMTP id ro2so2730439pbb.11 for ; Tue, 11 Dec 2012 10:53:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ZXB5H7jgUOJrGcJHeZ5ZljnGXSw5ElY5emLGAeYkSjg=; b=NOSD2PH1wqpHZWD9npDx2kUbWmSs5s1CUnOAJmgIRhcCyqfjNQI/nK1WABjjvHgFSE qKYwRMJMIVEgFxOQGnsdJWoPSlRKfGFY09B9X4DxLf/nZS36geT80aBdiVriuW5Tn3NK ADPfDUGLOplCgun5ZRSqjcw3EQNIeVTH4iG0VhfLF3PjHvXksToUeAGjoJYT4Fj9As/a gKyd+lNrW/EsBbI/jHGGG+9XA6YDjoIy/7pnvzoJ5KET2RBxZGHgJQDE6aB/H0wBkJzD ot2m69BN5edQdsfRqui+qvEO7l87ZQ7bYNWhc1GIAVqEpAeW6s/kTU0D3u0ErH0Y+2/f KUSg== MIME-Version: 1.0 Received: by 10.66.79.163 with SMTP id k3mr47368078pax.60.1355251992122; Tue, 11 Dec 2012 10:53:12 -0800 (PST) Received: by 10.66.191.41 with HTTP; Tue, 11 Dec 2012 10:53:12 -0800 (PST) Date: Tue, 11 Dec 2012 13:53:12 -0500 Message-ID: Subject: Running couchdb remotely (from an interactive shell) From: Nestor Urquiza To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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