Mensiasati wlan0 sleep di raspberry pi


Masih lanjutan dari posting dibawah setelah beberapa saat Access Point nya jalan ternyata ada problem baru yang muncul yaitu tiba tiba saja wlan0 bisa mati sendiri untuk mensiasatinya (hasil googling )didapatlah tutorial sbb

Pertama tama buat file netwprk-monitor.sh

isinya

#!/bin/bash

while true ; do
if ifconfig wlan0 | grep -q “inet addr:” ; then
sleep 60
else
echo “Network connection down! Attempting reconnection.”
ifup –force wlan0
sleep 10
fi
done

lalu beri permission

sudo chmod +x ./network-monitor.sh

masukkan di crontab biar secara otomatis scriptnya dijalankan

sudo crontab -e

*/5 * * * * /home/pi/network-monitor.sh

Semoga bermanfaat

 

 

Ditunggu komennya ...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s