Ajout du script du lien symbolique
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
status/index.html
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { statusProxy } from './main.js'
|
import { statusProxy } from './main.js'
|
||||||
|
|
||||||
export async function loadStatus(){
|
export async function loadStatus(){
|
||||||
let res = await fetch('/status/index.ouvert.html');
|
let res = await fetch('/status/index.html');
|
||||||
|
|
||||||
let html_text = await res.text()
|
let html_text = await res.text()
|
||||||
let html = new DOMParser().parseFromString(html_text, "text/html");
|
let html = new DOMParser().parseFromString(html_text, "text/html");
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="fr">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<link rel="icon" type="image/svg" href="/assets/favicon_open.svg" />
|
|
||||||
<style>
|
|
||||||
:root {
|
|
||||||
--back-color: #00FF44;
|
|
||||||
--main-color: #000000;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<title>Le LOL est Ouvert</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<p id="statusText">Ouvert !</p>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$#" = "0" ]; then
|
||||||
|
echo "Usage set-status.sh [new-status]"
|
||||||
|
echo ""
|
||||||
|
echo "[new-status] can be \"opened\" or \"closed\""
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#SPACE_JSON=/var/www/html/spaceapi/space.json
|
||||||
|
|
||||||
|
if [ "$1" = "opened" ]; then
|
||||||
|
ln -sf "index.ouvert.html" "$(dirname $0)/index.html"
|
||||||
|
#jq "setpath([\"state\", \"open\"]; true) | setpath([\"state\", \"lastchange\"]; $(date +%s))" < $SPACE_JSON > $SPACE_JSON.new &&
|
||||||
|
#mv -f $SPACE_JSON.new $SPACE_JSON
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "closed" ]; then
|
||||||
|
ln -sf "index.fermé.html" "$(dirname $0)/index.html"
|
||||||
|
#jq "setpath([\"state\", \"open\"]; false) | setpath([\"state\", \"lastchange\"]; $(date +%s))" < $SPACE_JSON > $SPACE_JSON.new &&
|
||||||
|
#mv -f $SPACE_JSON.new $SPACE_JSON
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user