Files
2021-12-17 12:44:53 +01:00

21 lines
463 B
Bash

#!/bin/bash
# gestione check x riavvio se offline
FILE=/home/pi/steamware/ImOffline.sta
# in aggiunta verifico di essere ancora online...
netStatus=`cat /sys/class/net/eth0/operstate`
if [[ $netStatus != "up" ]] ;
then
echo "Creating offline file $FILE"
touch "$FILE"
fi
# Verifica: se fosse offline esegue startBrowser...
if test -f "$FILE" ;
then
echo "$FILE exists, MON offline, try restart"
systemctl restart startBrowser
rm $FILE
fi