#!/bin/bash 
if [ ! -z ${device} ]
then
	route add -net ${network.staticroute.destination}/${network.staticroute.mask} gw ${network.staticroute.gateway} dev ${device} metric 10 || logger "Failed to add static route"
else
	route add -net ${network.staticroute.destination}/${network.staticroute.mask} gw ${network.staticroute.gateway} metric 10 || logger "Failed to add static route"
fi
exit 0
