Created
December 1, 2016 13:38
-
-
Save capooti/4e00c8456452a7a36bb03843a8cf83fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /mydir | |
url="http://localhost:8080/geoserver/wms?STYLES=&FORMAT=image%2Fpng&TRANSPARENT=TRUE&LAYERS=geonode%3ADE01_SL6_22P_1T_20100521T010517_20100521T010602_DMI_0_1b5d_qXM&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LLBBOX=137.36632816178096,36.772883864884584,141.8751878470843,40.26195796778519&URL=http%3A%2F%2Flocalhost%3A8180%2Fgeoserver%2Fwms&TILED=true&TILESORIGIN=15291549.700982,4407496.8300991&SRS=EPSG%3A900913&BBOX=15654303.390625,4657155.2587109,15693439.149102,4696291.0171875&WIDTH=256&HEIGHT=256" | |
/usr/bin/curl $url --connect-timeout 5 --max-time 20 -s -f -o /dev/null | |
if [ $? -eq 0 ] | |
then | |
: | |
else | |
/usr/bin/curl -X POST \ | |
-s \ | |
--data-urlencode "payload={ \ | |
\"channel\": \"#worldmap-log\", \ | |
\"username\": \"Cron\", \ | |
\"pretext\": \"wm-java-primary\", \ | |
\"color\": \"danger\", \ | |
\"icon_emoji\": \":ghost:\", \ | |
\"text\": \"Tiles not being rendered, restarting Tomcat a\" \ | |
}" \ | |
https://hooks.slack.com/services/[change here] | |
/usr/bin/service tomcata start | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment