checkconnection/restartmodem.sh

26 lines
309 B
Bash
Raw Permalink Normal View History

2023-08-22 18:14:01 +00:00
#!/bin/sh
2023-08-22 16:45:53 +00:00
#
## Restarting Interface in case of faulture
#
#
## Variables
#
interface="LTE"
#
## Main
#
# Restart Modem
2023-08-22 18:40:14 +00:00
echo "restart Modem..."
2023-08-22 16:45:53 +00:00
ifdown $interface
sleep 5
ifup $interface
2023-08-22 18:40:14 +00:00
echo "Modem restarted..."
2023-08-22 16:45:53 +00:00
# Log the time
echo "Interface $interface restarted at $(date)" >> /var/log/restartmodem.sh