Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I just installed couchdb on a debian5 system and added symlinks to the /etc/init.d/couchdb-script. Unfortunately, this script gets triggered on startup before the network interface received the address over DHCP that the couchdb-server tries to bind to - which leaves the instance defunct.

I kind of solved this, by executing dhclient in the start script, but there just HAS to be a better way...? Is there?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Yes, there is a better way: place your couchdb init script in /etc/network/if-up.d/ so it will run after your network is set up.

Pay attention to:

   Filenames should consist entirely of upper and lower case
   letters, digits, underscores, and hyphens. Subdirectories  
   of directory and files with other names will be silently ignored.
share|improve this answer

On CentOS and probably RedHat it checks to see if there is a file /sbin/ifup-local and will execute that if it is available.

to create it:

sudo touch /sbin/ifup-local
sudo chmod +x /sbin/ifup-local

Then edit it to contain what you would like

# your commands or calls to your script here

Hope that helps. I like Debian's .d directory better but this seems to be the closest equivalent on CentOS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.