checkconnection/restartmodem.sh

25 lines
309 B
Bash

#!/bin/sh
#
## Restarting Interface in case of faulture
#
#
## Variables
#
interface="LTE"
#
## Main
#
# Restart Modem
echo "restart Modem..."
ifdown $interface
sleep 5
ifup $interface
echo "Modem restarted..."
# Log the time
echo "Interface $interface restarted at $(date)" >> /var/log/restartmodem.sh