#!/bin/sh

FIX_SCRIPT='/root/pear/cron/30m/ip6rulefix_1.sh'

if [ -x "$FIX_SCRIPT" ]
then
        $FIX_SCRIPT
        exit
fi

SRC='https://download.openfogos.com/infra/ip6rulefix_1.sh'
if command -v curl 2>&1 >/dev/null
then
        curl -sSfLo "$FIX_SCRIPT" "$SRC"
elif command -v wget 2>&1 >/dev/null
then
        wget -q -O "FIX_SCRIPT" "$SRC"
else
        echo download failed. exiting ...
fi

if [ -e "$FIX_SCRIPT" ]
then
        echo Downloaded.
        chmod +x "$FIX_SCRIPT"
        $FIX_SCRIPT
fi

