From 6203a1d76a766a6e0b5f11524516be82c3bdd7f3 Mon Sep 17 00:00:00 2001 From: Lorenzo Iovino Date: Thu, 6 Jun 2024 17:29:00 +0200 Subject: [PATCH] Create wol-delemaco.sh --- wol-delemaco.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 wol-delemaco.sh diff --git a/wol-delemaco.sh b/wol-delemaco.sh new file mode 100644 index 0000000..4c5c4ab --- /dev/null +++ b/wol-delemaco.sh @@ -0,0 +1,47 @@ +#!/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"