Update script for network restarts

This commit is contained in:
pgrondek 2020-09-11 08:18:57 +02:00
parent 83c561fc1d
commit f06d6831e4
2 changed files with 9 additions and 2 deletions

6
prusa.yml Normal file
View File

@ -0,0 +1,6 @@
---
- hosts: prusa.lan
roles:
# - ssh
- octoprint
# - ubuntu

View File

@ -17,11 +17,12 @@ PING="/bin/ping -c 1 -W ${PING_TIMEOUT} -w ${PING_TIMEOUT}"
RESET_MODEM_SCRIPT="/config/scripts/tplink_smartplug.py"
DEBUG=true
DEBUG_FILE=/var/log/cron-monitor.log
DISABLE_SOFT_RESTART=false
function debug() {
if [[ ${DEBUG} ]]; then
echo $@
echo $@ > ${DEBUG_FILE}
fi
}
@ -32,7 +33,7 @@ function interfaceDown() {
function interfaceUp() {
interface=$1
ip link set dev ${interface} down
ip link set dev ${interface} up
}
function soft_restart() {