Open main menu

CDOT Wiki β

Changes

OPS345 Lab 3

285 bytes added, 04:26, 22 September 2021
no edit summary
** Start httpd, everything should be back to as it was.
** Dissasociate the public ip. Everything should keep working.
* Add a 404 check for missing ip:
<source>
<?php
system("curl http://169.254.169.254/latest/meta-data/public-ipv4 2>&1| grep -q '404 - Not Found'", $rc);
if ($rc == 0)
echo "None found";
else
system("curl http://169.254.169.254/latest/meta-data/public-ipv4");
?>
</source>