Skip to content

Instantly share code, notes, and snippets.

View lowerpower's full-sized avatar

Mike Johnson lowerpower

View GitHub Profile
@lowerpower
lowerpower / gw_cron.sh
Last active February 16, 2017 16:57
Reboot EnGenius gateway when we notice the ethernet is down (from wireless side, but would work ethernet side if ethernet is not the problem) Cron Monitor Script DDWRT
#!/bin/ash
#
# gw_cron.sh
#
# We had a problem wiht EnGenius access point loosing ethernet link, but was accessable
# from wireless side. we ran this script on one of the DDWRT routers on wireless side
# specifing an address on the other side of the ethernet link. Put this in a cron
# and specify an IP address on the other side, and if it is not accessable, check
# that the EnGenius access point is accessable, if so reboot it via the telnet CLI.
#
/*
Copyright (c) 2012 Gustav Olsson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR