#!/bin/bash echo "Content-type: text/html" echo # Function to ping the server and generate HTML output generate_html() { wakeonlan b8:cb:29:a1:f3:88 # Generate HTML content HTML_CONTENT=$(cat < Server Status
Server is booting.
EOL ) echo "$HTML_CONTENT" } # Run the function and save the output to a variable HTML_OUTPUT=$(generate_html) # Print the HTML content echo "$HTML_OUTPUT"