I have a headless server (Ubuntu Server 14.04 LTS) which I configured to connect to my WPA-protected wifi network at boot using the accepted answer in the link below (tl;dr: run wpa_supplicant from /etc/network/interfaces): https://askubuntu.com/questions/406166/how-can-i-configure-my-headless-server-to-connect-to-a-wireless-network-automati

It works beautifully, except when the network experiences a signal drop (like a router reset), after which the server is unreachable.

I've found a few threads that recommend writing a script, but I also found this: http://milkandtang.com/blog/2013/08/27/getting-wifi-on-a-headless-raspberry-pi/ which recommends replacing Raspbian's /etc/ifplugd/action.d/ifupdown.sh file with the one supplied by wpa_supplicant. I'm using Ubuntu and I don't appear to have that file to begin with (I don't actually know what that file does but I assume it runs ifup at some point), but it seems like there's a simpler way out of this than running a custom script. Am I missing something?


  • You could setup wpa_supplicant on cron to run every X minutes, but I don't know if it's aware enough to not take any action if it sees you're already connected to the wireless point you're asking of it. Might make your server drop off line for about 30 seconds every time it runs. I'm assuming setting it up with a wired connection isn't feasible? – kazoni Jun 17 '15 at 23:45
  • Thanks for your quick response. Unfortunately a wired connection isn't an option at the moment as the access point is in a different building. :( – ridgek Jun 18 '15 at 1:05

ifplugd(8) is a system daemon that that does things when interfaces are hot-plugged (or otherwise go up or down)

According to the ifplugd(8) man page for your version of Ubuntu…



/etc/ifplugd/ifplugd.action: this is the script which will be called by the daemon whenever the state of the interface changes. It takes two arguments: the first is the interface name (eg. eth0), the second is either "up" or "down".

So it seems like you need to edit the /etc/ifplugd/ifplugd.action script to do the right things to bring Wi-Fi back up when it goes down. I'm guessing that the /etc/ifplugd/action.d/ifupdown.sh path is specific to Raspbian.

  • /etc/ifplugd/action.d/ifupdown.sh is correct for Ubuntu 14.04 LTS. It's a simple sudo apt-get install ifplugd away. – kazoni Jun 18 '15 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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