Если у вас есть роутер ASUS или другой с прошивкой от Олега, то эта записка для вас. Недавно у меня возникла трудность, которую никак не получалось решить. VPN-сессия зависала, при этом VPN-соединение оставалось подключено. Роутер не мог понять, что надо переподключится. Приходилось каждый раз вручную делать перезагрузку роутера, согласитесь, это долгий и утомительный процесс.
Я покопался в интернете, оказалось я такой не один и проблема довольно масштабна среди “роутороводов”. Наши провайдеры не особо жалуют пользователей с роутерами, в большинстве случаев после ответа на вопрос “какая у вас операционная система” суппорт умолкает.
Я не задавался и продолжал искать, но нигде не было универсального решения данной проблемы. Тогда я подумал, мой роутер основан на Unix и поддерживает Bash-скрипты. Я решил написать “умный” скрипт перезагрузки, в случае повисания VPN-сессии. После нескольких проб и ошибок я остановился на таком варианте.
#!bin/sh
PINGRESORCE1="ya.ru"
PINGRESORCE2="google.com"
if (! ping -c 3 &{PINGRESORCE1} >/dev/nill 2>&1).
then
if (! ping -c 3 &{PINGRESORCE2} >/dev/nill 2>&1).
then
reboot
else
echo 'internet ok'
fi
else
echo 'internet ok'
fi
Алгоритм работы данного скрипта такой: Сначала мы посылаем 3 ping’a до Яндекса, если они проходят то выводим “internet ok”. Если нет, то посылаем ещё 3 ping’a до Гугла, если проходят, выводи “internet ok”. Если ping не дойдёт и до Гугла, то перезагрузка.
Этот скрипт необходимо добавить в планировщик задач (в большинстве случаев это cron), чтобы он выполнялся каждые 5-10 минут.
Качественные cайты на скриптах.
Старые комментарии:
Игорь 31.10.2010 18:37
Интересно, а как засунуть этот скрипт в роутер? :-?
Илья 31.10.2010 19:12
У меня DIR-320 с прошивкой от Олега.
По сути это уже полнофункционал ьный линукс, ;-) есть доступ к командной строке по SSH.
Советую посетить этот форум. (Ахтунг, там есть проблема с кодировкой нужно поставить Кириллицу Windows-1254)
http://wl500g.info/forumdisplay.php?f=86
Игорь 01.11.2010 13:48
Спасибо, получается, что роутер D-Link превращается в ASUS :eek:
Илья 01.11.2010 14:42
Ну.. Да :yehh2:
demeister 13.04.2011 04:26
скажите а на DD-WRT при прописании скрипта в cron он будет работать?
Илья 13.04.2011 15:15
Да должен, ибо тоже Linux :yehh2:
DarkShaman 21.05.2013 19:30
У меня на OpenWRT заработало так
#!/bin/sh
echo --------------- --------------- --------------- --
echo WAN CONTROLL RESTART
echo --------------- --------------- --------------- --
PINGRESORCE1="109.126.0.67"
PINGRESORCE2="109.126.1.67"
PINGRESORCE3="google.com"
if (! ping -q -c3 ${PINGRESORCE1} > /dev/null 2>&1)
then
if (! ping -q -c3 ${PINGRESORCE2} > /dev/null 2>&1)
then
if (! ping -q -c3 ${PINGRESORCE3} > /dev/null 2>&1)
then
reboot
else
echo 'internet ok'
fi
else
echo 'internet ok'
fi
else
echo 'internet ok'
fi
Паша 11.04.2014 21:35
У меня на OpenWRT. Не могу запустить скрипт. Объясните подробно в какую папку на роутере нужно скопировать файл скрипта, как создать этот файл и что нужно прописать в планировщике?
На данный момент создал файл /overlay/home/ping/ping.sh
в котором прописал все что в сообщении от #7 DarkShaman
Не работает. Где ошибка? Роутер не перезагружается при отключении сетевого кабеля ни сразу ни через 5 минут.
DarkShaman, подскажи как ты все проделал?
Олег 07.09.2014 17:27
Доброго времени суток! Скажите пожалуйста, а можно таким способом перезагружать другую точку, коротая подключена к моей мостом?
Бесплатная консультация по телефону:
Комментарии
Cicon Interior ที่คุณสามารถพูด คุยและให้คำปรึก ษาเกี่ยวกับการส ร้างเอกลักษณ์แล ะความเป็นตัวคุณ ของการออกแบบบิ้ วอินที่คุณต้องก าร ด้วยประสบการณ์แ ละความเชี่ยวชาญ ของทีมงานที่มีค ุณภาพ คุณจะได้รับการด ูแลอย่างใกล้ชิด และครอบคลุมทุกข ั้นตอนของงานบิ้ วอิน จนถึงการติดตั้ง บิ้วอินเสร็จสิ้ น กับ Cicon Interior คุณจะได้รับผลลั พธ์ เฟอร์นิเจอร์ชิ้ นในอาคารที่มีคุ ณภาพทั้งมีการออ กแบบที่ดี และความทนทาน และการบริการสูงที่จะเป็นประโยชน์ต่อคุณในระยะยาว.
my blog บิ้วอินห้องนั่ง เล่น
(https://unsplash.com: https://unsplash.com/@pantrypike3)
Poker Online: http://clients1.google.pn/url?q=https://33Poker.net/
to ask.
online poker sites: http://daklaktour.com/index.php?language=vi&nv=news&nvvithemever=t&nv_redirect=aHR0cHM6Ly9pbWFnZXMuZ29vZ2xlLmNmL3VybD9xPWh0dHBzOi8vMzNwb2tlci5uZXQv
What are the bills for short-term parking in Dulles?
me: http://costin.co/__media__/js/netsoltrademark.php?d=www.facebookofsex.yaforia.com
it is considered the largest source of heat received by
the Earth, https://latinindustry.activeboard.com/t67990115/where-can-you-buy-solar-panels/?
Feel free to visit my webpage ... lastPostAnchor: https://91464.activeboard.com/t70656257/solar-energy/?page=last
I used to be having a look for. You have ended
my 4 day long hunt! God Bless you man. Have a great day.
Bye
my blog post - tinju189: https://atavi.com/share/wm8uryz19xts3
I truly ⅼike your technique of blogging. Ι bbook marked іt to my bookmark website list
ɑnd will be checcking bawck ѕoon. Plеase visit
myy web site t᧐ο and tell me ԝhat you think.
Mу blog post: burberry womens scarf: https://www.adameve.com
You have touched some good things here. Any way keep up wrinting.
My web site ... helpful resources: https://tuservermu.com.ve/index.php?topic=66947.0
As a person that has actually utilized these services, I can personally attest to their considerable impact on my academic accomplishments.
comment-8: https://blogs.brighton.ac.uk/ng132/2015/04/20/is-your-business-using-the-power-of-facebook-to-its-full-potential/
I reverberate deeply with the focus placed on skilled support, quality control, and reliable time management.
Having access to experienced writers that use customized
advice has actually substantially enhanced the caliber of
my essays and deepened my comprehension of challenging topics.
Additionally, the guarantee of originality and adherence to scholastic standards has
instilled confidence in me, understanding that my work is authentic and qualified.
Additionally, the prompt delivery of essays has enabled me to stay
organized with my tasks and alleviate final anxiety.
Finally, I wholeheartedly agree with the beliefs shared in this forum string.
Essay composing services are indispensable sources for pupils pursuing scholastic quality,
and I am grateful for the advantages they have provided in assisting me reach my educational goals.
included in wedding ceremony bands designs, to allow them to match the rings.
Feel free to visit my web-site :: Custom small travel jewelry case - Trent: http://Bridgejelly71%3Ej.u.dyquny.Uteng.kengop.enfuyuxenNaturestears.com/Test.php?a%5B%5D=%3Ca+href%3Dhttps%3A%2F%2Frisingstarvineyards.com%2F2024%2F03%2F27%2Ftravel-in-vogue-with-custom-small-jewelry-situations-and-bags%2F%3EMy+web+site%3C%2Fa%3E%3Cmeta+http-equiv%3Drefresh+content%3D0%3Burl%3Dhttps%3A%2F%2Ffunloversunite.com%2F2024%2F03%2F26%2Ftravel-in-vogue-with-custom-made-small-jewelry-cases-and-bags%2F+%2F%3E,
me: https://gratisafhalen.be/author/staceygrang/
of sex: http://www.gnu-darwin.org/www001/src/ports/www/b2evolution/work/b2evolution/blogs/install/phpinfo.php?a%5B%5D=%3Ca+href%3Dhttp%3A%2F%2Fconforminternational.com%2F__media__%2Fjs%2Fnetsoltrademark.php%3Fd%3Dwww.Facebookofsex.Yaforia.com%3Ehookup+near+me%3C%2Fa%3E%3Cmeta+http-equiv%3Drefresh+content%3D0%3Burl%3Dhttp%3A%2F%2Fcoophaildirect.com%2F__media__%2Fjs%2Fnetsoltrademark.php%3Fd%3Dwww.facebookofsex.yaforia.com+%2F%3E
things, so I am going to convey her.
Feel free to visit my web blog ... barabet78: http://valetinowiki.racing/index.php?title=guldborggodwin9220
My web page :: gwen189.com: https://500px.com/p/dalrymplexxwrichter
I wanted to write a little comment to support you.
my webpage yolanda77: http://vesti46.ru/user/barber24lange/
and fuck: http://sks365.biz/__media__/js/netsoltrademark.php?d=www.facebookofsex.yaforia.com
site rankings: http://thegreatadventuresofthetravelingsoul.com/groups/4-enticing-ways-to-improve-your-online-poker-ranking-skills/
me. And i am glad reading your article. But should remark on few general things, The web site style
is great, the articles is really nice : D.
Good job, cheers
Here is my page - สาระน่ารู้ทั่วไ ป: https://biashara.co.ke/author/dancekeda/
sex near me: http://compulogical.com/__media__/js/netsoltrademark.php?d=Www.Facebookofsex.Yaforia.com
in my area: http://g.oog.l.eemail.2.1laraquejec197.0jo8.23@www.mondaymorninginspirationSus.ta.i.n.j.ex.kfullgluestickyriddl.edynami.c.t.r.ajohndf.gfjhfgjf.ghfdjfhjhjhjfdgh@sybbr>r.eces.si.v.e.x.g.zleanna.langtonc.o.nne.c.t.tn.tu@Go.o.gle.email.2.%5C%5C%5C%5C%5C%5C%5C%5Cn1sarahjohnsonw.estbrookbertrew.e.rhu.fe.ng.k.Ua.ngniu.bi..uk41@Www.Zanelesilvia.woodw.o.r.T.hmeng.luc.h.e.n.4hu.fe.ng.k.Ua.ngniu.bi..uk41@Www.Zanelesilvia.woodw.o.r.t.hH.att.ie.M.c.d.o.w.e.ll2.56.6.3burton.rene@s.jd.u.eh.yds.g.524.87.59.68.4i.nsult.i.ngp.a.T.lokongwu.chisomvi.rt.u.ali.rd.jH.Att.Ie.M.C.D.O.W.E.Ll2.56.6.3Burton.Rene@fullgluestickyriddl.edynami.c.t.r.ajohndf.gfjhfgjf.ghfdjfhjhjhjfdgh@sybbr>r.eces.si.v.e.x.g.zleanna.langtonc.o.nne.c.t.tn.tu@Go.o.gle.email.2.%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5C%5Cn1sarahjohnsonw.estbrookbertrew.e.rhu.fe.ng.k.Ua.ngniu.bi..uk41@Www.Zanelesilvia.woodw.o.r.t.hasex.y.52.1leanna.langtonc.or.r.idortpkmjohndf.gfjhfgjf.ghfdjfhjhjhjfdgh@sybbr>r.eces.si.v.e.x.g.zleanna.langtonc.o.nne.c.t.tn.tu@Go.o.gle.email.2.%5C%5C%5C%5C%5C%5C%5C%5Cn1sarahjohnsonw.estbrookbertrew.e.rhu.fe.ng.k.Ua.ngniu.bi..uk41@Www.Zanelesilvia.woodw.o.r.t.hswitc.h.ex.cb@mengl.uch.en1britni.vieth_151045Zel.m.a.Hol.m.e.s84.9.83@n.oc.no.x.p.A.rk.eex.p.lo.si.v.edhq.gHu.feng.ku.angn.i.ub.i...u.k37@coolh.ottartmassflawles.s.p.a.n.e.r.e.ehu.fe.ng.k.ua.ngniu.bi..uk41@www.Zanelesilvia.woodw.o.r.t.hsimplisti.cholemellowlunchroom.epromisec.net/info.php?a%5B%5D=sex+in+my+area+%28%3Ca+href%3Dhttps%3A%2F%2Fwww.google.is%2Furl%3Fq%3Dhttps%3A%2F%2Fliuxf.com%2F%3Emouse+click+the+following+web+site%3C%2Fa%3E%29%3Cmeta+http-equiv%3Drefresh+content%3D0%3Burl%3Dhttps%3A%2F%2Fwww.google.com.jm%2Furl%3Fq%3Dhttps%3A%2F%2Fliuxf.com%2F+%2F%3E
Some time ago he made a decision to live in Minnesota.
Going to fitness is something my husband doesn't really
like but I do.
Also visit my web blog รีวิว
exness: http://mopheartland.com
Crypto Casino: The Intersection of Cryptocurrency and Gaming
In the ever-evolving domain of the virtual age, the emergence of "Crypto Casino"
has become a fascinating and rapidly escalating movement
. This unique fusion of e-currency and traditional betting has fascinated the gaze
of both IT-savvy followers and those craving new paths for diversion and economic possibilities .
At the core of the Virtual Casino principle is centered around the merger
of blockchain infrastructure, the foundational framework that enables virtual
currencies . By utilizing the inherent safety ,
visibility , and decentralizatio n of distributed ledger networks , Digital
Casinos have been able to present a persuasive option to established web-based gambling venues .
The implementation of electronic coins, such as Bitcoin , has facilitated for seamless and safe financial exchanges ,
eliminating the need for brokers and decreasing
the accompanying charges .
One of the key strengths of Digital Casinos is the
enhanced magnitude of confidence and impartiality they can present .
Through the incorporation of smart contracts and the immutable nature of distributed ledger records , participants can have greater reliance in the
truthfulness of the activities and the unpredictabilit y of endings.
Moreover, Crypto Casinos have presented a pioneering degree
of accessibility and inclusion to the landscape of
gaming . By permitting people from globally to participate ,
without regard to their physical location or conventional economic limitations , these venues have
established new options for monetary independence and
international engagement .
This global extent has also cultivated a perception of camaraderie among
E-Casino devotees , who commonly gather to exchange methods
, share narratives, and explore the current advancements in the domain .
However, the rise of Crypto Casinos has faced its issues.
Legislative policies surrounding the employment of blockchain-base d currencies in wagering ventures differ significantly across different jurisdictions ,
creating a intricate and frequently indefinite
regulatory sphere . Navigating these legal complexities has proven to be a vital factor for both Digital Casino operators and users ,
as they strive to guarantee conformity and address possible
hazards .
Moreover, the embedded volatility and risky characteristic of the blockchain-base d currency landscape have added an further
aspect of complexity to the E-Casino journey . Customers must thoroughly oversee their digital holdings and acquire a intricate knowledge of both the betting mechanics
and the changes of the crypto landscape in so as to reach well-researched choices and
attain consistent triumph.
Despite these challenges , the Crypto Casino sector continues to evolve and
create , motivated by the boundless creativity
and digital capability of its stakeholders . As more people welcome the
amalgamation of cryptocurrency and chance-based entertainment, the possibility for continued progress,
better user interactions, and the investigation of new domains in this dynamic space
continues to be wide-ranging and enthralling .
In in the end, the " E-Casino " movement symbolizes a distinctive and captivating combination of cutting-edge solutions, monetary pioneering, and the classic magnetism of gambling .
As the online landscape keeps transform the years to come of entertainment and economics
, the rise of Virtual Casinos represents a evidence to the revolutionary power of innovation and the human craving to
transcend the limits of what is achievable .
Feel free to visit my web site :: online casino player advocacy: https://p.asia/aIMEo
I needs to spend some time learning more or understanding more.
Thanks for excellent info I was looking for this information for my mission.
Also visit my website; вавада рабочее зеркало на сегодняшний: http://khdesign.nehard.kr/bbs/board.php?bo_table=free&wr_id=8866
for sex: http://fmgomez.com/__media__/js/netsoltrademark.php?d=liuxf.com
for sex: http://mainstreetaptsmd.com/__media__/js/netsoltrademark.php?d=liuxf.com
long) so I guess I'll just sum it up what I wrote and say, I'm thoroughly enjoying your blog.
I as well am an aspiring blog writer but I'm still new to the whole thing.
Do you have any helpful hints for novice blog writers? I'd really appreciate it.
Also visit my web page; Recommended
Site: https://cache.gametracker.com/clan/basarmin/forum.php?thread=198219