Auto-start service on bootup that depend on network
Forget about upstart. There are much easier ways to do this. Put a script that launches Openfire here:
/etc/network/if-up.d/
If openfire has to run as your user, so something like:
#!/bin/sh
su -c "openfire" myUserName
Make sure you mark it as executable:
sudo chmod +x /etc/network/if-up.d/openfire
Likewise you can close openfire, when you loose your network connection, by putting a script in /etc/network/if-down.d/ that kills it:
#!/bin/sh
killall openfire