Files
Samuele E. Locatelli 302708e999 update conf IOB
2020-10-13 11:17:58 +02: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