diff --git a/prusa.yml b/prusa.yml new file mode 100644 index 0000000..d04e61c --- /dev/null +++ b/prusa.yml @@ -0,0 +1,6 @@ +--- +- hosts: prusa.lan + roles: +# - ssh + - octoprint +# - ubuntu diff --git a/roles/router/files/monitor.sh b/roles/router/files/monitor.sh index 000b3da..c47285e 100755 --- a/roles/router/files/monitor.sh +++ b/roles/router/files/monitor.sh @@ -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() {