Update script for network restarts
This commit is contained in:
parent
83c561fc1d
commit
f06d6831e4
6
prusa.yml
Normal file
6
prusa.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- hosts: prusa.lan
|
||||
roles:
|
||||
# - ssh
|
||||
- octoprint
|
||||
# - ubuntu
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user