diff --git a/README.md b/README.md index 664a7bd..c312ae0 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,20 @@ sudo systemctl mask swap.target sudo systemctl disable --now bluetooth ``` +Execute `sudo crontab -e` and add +``` +@reboot /usr/sbin/iw wlan0 set power_save off +*/5 * * * * /home/andras/frame/wifi-check.sh > /home/andras/wifi.log 2>&1 +``` + +Execute `crontab -e` and add +``` +*/15 * * * * cd ~/frame && python3 display.py -o 90 >> ~/frame.log 2>&1 +``` + + Reduce journald writes Edit /etc/systemd/journald.conf: - ``` Storage=volatile -``` \ No newline at end of file +``` diff --git a/src/wifi-check.sh b/src/wifi-check.sh new file mode 100755 index 0000000..9974f49 --- /dev/null +++ b/src/wifi-check.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if ! ping -c 1 -W 5 192.168.0.1 > /dev/null 2>&1; then + logger "WiFi check: no connectivity, restarting wlan0" + ip link set wlan0 down + sleep 2 + ip link set wlan0 up +fi