# starting services dependent on network

## grimm26

I'd like to start certain services only when on my home network like autofs, ntp-client, portmap.  I'm looking for ideas in how to do this.  Is there something that is in portage that I can install that would help me out?

----------

## Hu

I am not aware of a package in Portage that could handle this exact request, but there are a few ways to get close to it.  If you only join a network upon a fresh boot, you might be able to adapt softlevels to your needs.  If you tend to join networks upon resume from hibernation, you could try using a DHCP client hook to examine the address issued to you, determine the network from that, and then start/stop services accordingly.

----------

