On Thu, Oct 13, 2016 at 7:47 AM, Thomas Levine <_...@thomaslevine.com> wrote: > I start ii and chat for a while. Then I lose my internet connection > for a few hours. What is a good way to have ii automatically connect > when I get my internet connection back? > > I guess I have determine whether ii has disconnected and whether I now > have an internet connection. I don't know how to determine whether ii > has disconnected. > > Thanks >
I defined EXIT_TIMEOUT as 2, then after print_out(NULL, "-!- ii shutting down: ping timeout"); I changed exit(EXIT_FAILURE) to exit(EXIT_TIMEOUT). I run ii in a shell loop while ii -n emg; [ "$?" -eq 2]; do :; done Every time ii exits with status 2 it restarts. -emg