#!/bin/bash
#
# file for bringing up wwwoffle when network is back
# thanks to Martin Jost

if [ -x /usr/bin/wwwoffle ]; then
   # Restart to notify of new DNS (is there a better solution ?)
   /etc/rc.d/wwwoffle restart

   # Set the WWWOFFLE HTTP proxy server online.
   /usr/bin/wwwoffle -online -c /etc/wwwoffle/wwwoffle.conf

   # Get the WWWOFFLE HTTP proxy server to fetch requested URLs.
   /usr/bin/wwwoffle -fetch -c /etc/wwwoffle/wwwoffle.conf &
fi
