#!/bin/bash

# be verbose
set -x

# get the name of this dir
dirname="$(dirname "$0")"
modemon=modemon.sh
modemoff=modemoff.sh
touchfilename=modem_powercycle.touch

/bin/bash "$dirname/$modemoff"

# log the last powercycle time simply via the modified time of the touchfile
touch "$dirname/$touchfilename"

/bin/bash "$dirname/$modemon"

exit 0

