Go to advanced search

by CodedVision
Tue Dec 06, 2016 11:22 pm
Forum: Beginners
Topic: Wifi Reconnect on drop
Replies: 61
Views: 147297

Re: Wifi Reconnect on drop

Here's the script I put together after reading through the examples here. It checks ifconfig, and if there is an IP address, then it pings Google's DNS twice. If either fail, it attempts to reset with ifup. If everything is okay, output from the command is silent. #!/bin/bash if ifconfig wlan0 | gre...
by CodedVision
Wed Nov 25, 2015 6:49 am
Forum: Beginners
Topic: [Tutorial] Show RPI's Temperature with a command.
Replies: 71
Views: 617883

Re: [Tutorial] Show RPI's Temperature with a command.

I made a shell script that shows Celsius and Fahrenheit. It requires bc. The formatting is sorta ugly, though. Here is the code: #!/bin/bash milcel=$(cat /sys/class/thermal/thermal_zone0/temp) echo "CPU Temperature:" echo echo "scale=3;$milcel/1000" | bc echo "°C" echo echo "scale=3;(($milcel/1000)...

Go to advanced search