Create wol-delemaco.sh
This commit is contained in:
parent
a76ae3c7c4
commit
6203a1d76a
1 changed files with 47 additions and 0 deletions
47
wol-delemaco.sh
Normal file
47
wol-delemaco.sh
Normal file
|
|
@ -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 <<EOL
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Server Status</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: black;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100vh;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.status {
|
||||||
|
font-size: 72px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="status">
|
||||||
|
Server <strong>is booting.
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
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"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue