Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View couch-start.sh
1 2 3 4 5 6 7
#!/bin/bash
NAME=$1
HOME="/root"
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
/usr/bin/sudo -u root /usr/local/bin/couchdb -b -a /mnt/sde/$NAME/couchdb.ini -p /var/run/couchdb-$NAME.pid -e /var/log/couchdb-$NAME.err -o /var/log/couchdb-$NAME.out
sleep 1
echo '' >> /var/run/couchdb-$NAME.pidroot
View couch-start.sh
1 2 3 4 5
#!/bin/bash
NAME=$1
HOME="/root"
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
/usr/bin/sudo -u root /usr/local/bin/couchdb -d -a /mnt/sde/$NAME/couchdb.ini -p /var/run/couchdb-$NAME.pid -e /var/log/couchdb-$NAME.err -o /var/log/couchdb-$NAME.out
View couch-start.sh
1 2 3 4 5 6
check process couchdb-instance1 with pidfile /var/run/couchdb-instance1.pid
group couch
start program = "/bin/couchdb-start.sh instance1" timeout 90 seconds
stop program = "/bin/couchdb-stop.sh instance1"
if failed url http://localhost:5984/ and content == '"couchdb"' then restart
if 3 restarts within 5 cycles then timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.