From 0739547520509cc226ba9430e32c572d19975659 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Wed, 15 Oct 2025 18:02:15 +0200 Subject: [PATCH 1/6] new functions added --- index.html | 30 ------------------------------ lomes-app.py | 9 ++++++--- 2 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 index.html diff --git a/index.html b/index.html deleted file mode 100644 index 678dabe..0000000 --- a/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - LoMeS | Meshtastic - - - - -
-
- -

Welcome to LoMeS

-
-
-

A Local Meshtastic Server in development


-

Hi {{user}}

-

If you see this site, means "LoMeS" development environment is running!

-

Thanks for collaborating and trying to make things more real...

-
- - -
- - \ No newline at end of file diff --git a/lomes-app.py b/lomes-app.py index 2a116cc..a641464 100755 --- a/lomes-app.py +++ b/lomes-app.py @@ -1,14 +1,17 @@ #!/bin/python3 from flask import Flask, render_template +import datetime import getpass -import socket +import os app = Flask(__name__) @app.route("/") def index(): - user=getpass.getuser() - return render_template("index.html", user=user) + user = getpass.getuser() + time = datetime.datetime.now() + os = os.uname() + return render_template("index.html", user=user, time=time, os=os) app.run(host="127.0.0.1", port=5000) From ef631b9c3f150feaf607300472959ebf62a23d22 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Thu, 16 Oct 2025 17:11:10 +0200 Subject: [PATCH 2/6] Some new features --- lomes-app.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lomes-app.py b/lomes-app.py index a641464..a8260e7 100755 --- a/lomes-app.py +++ b/lomes-app.py @@ -10,8 +10,12 @@ app = Flask(__name__) @app.route("/") def index(): user = getpass.getuser() - time = datetime.datetime.now() - os = os.uname() - return render_template("index.html", user=user, time=time, os=os) + preTime = datetime.datetime.now() + time = preTime.strftime("%H:%M:%S - %a %d.%m.%Y") + uname_fields = ("System", "Hostname", "Kernel") + uname_info = os.uname() + sysinfo = "\n".join(f"{field}: {value} | " for field, value in zip(uname_fields, uname_info)) -app.run(host="127.0.0.1", port=5000) + return render_template("index.html", user=user, time=time, sysinfo=sysinfo) + +app.run(host="127.0.0.1", port=5000, debug=True) \ No newline at end of file From 8b3ea9e89f0fe663d2e5310f79866b4d1ecea6a1 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Thu, 16 Oct 2025 17:13:19 +0200 Subject: [PATCH 3/6] Template updated --- templates/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/index.html b/templates/index.html index 541c51f..4e6cf4b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -23,6 +23,8 @@
  • User executing flask : {{user}}
  • +
  • Machine time : {{time}}
  • +
  • {{sysinfo}}
From ffd681a654fecc8768bc6a54d369afcb343ad9aa Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Sat, 18 Oct 2025 20:30:17 +0200 Subject: [PATCH 4/6] Setup.sh updated --- assets/config/nginx/nginx_HTTP.conf | 14 +++++++++ lomes-setup.sh | 48 ++++++++++++++++++++--------- 2 files changed, 48 insertions(+), 14 deletions(-) create mode 100644 assets/config/nginx/nginx_HTTP.conf diff --git a/assets/config/nginx/nginx_HTTP.conf b/assets/config/nginx/nginx_HTTP.conf new file mode 100644 index 0000000..293b59a --- /dev/null +++ b/assets/config/nginx/nginx_HTTP.conf @@ -0,0 +1,14 @@ +########################################################### +### ### +### MESHPI NGINX CONFIG ### +### ### +########################################################### + +server { + listen 80; + server_name DOMAIN IPADDR; + + location / { + proxy_pass http://127.0.0.1:5000; + } +} diff --git a/lomes-setup.sh b/lomes-setup.sh index 6baf114..91dbb14 100755 --- a/lomes-setup.sh +++ b/lomes-setup.sh @@ -13,10 +13,10 @@ echo -e "\n ${LCY}Dependency and Privilege Check running...${CRS}\n" ### PRIVILEGES if (( $(id -u) == 0 )); then ### AM I ROOT ? - echo -e " ${GRN}Privilege check passed...${CRS}\n" + echo -e " ${LCY}- ${GRN}Privilege check passed...${CRS}\n" else - echo -e " ${RED}Privilege check failed... Please run script with sudo or as root!${CRS}\n" + echo -e " ${LCY}- ${RED}Privilege check failed... Please run script with sudo or as root!${CRS}\n" exit 1 fi @@ -41,10 +41,10 @@ installed="$(cat /tmp/LoMeS/installed_dev 2>/dev/null)" missing="$(cat /tmp/LoMeS/missing_dev 2>/dev/null)" if ! [ "$missing" ]; then - echo -e " ${GRN}Dependencies met. Proceeding...${CRS}\n" + echo -e " ${LCY}- ${GRN}Dependencies met. Proceeding...${CRS}\n" else ### INSTALLING PKGS ! - echo -e " ${RED}Following dependencies are missing :\n\n$missing${CRS}" + echo -e " ${LCY}- ${RED}Following dependencies are missing :\n\n$missing${CRS}" while true; do echo -e "\n ${YEL}Do you wish to install via APT?" @@ -52,8 +52,8 @@ else echo -e "${CRS}" if [[ "$install_dep" = "" || "$install_dep" = "y" || "$install_dep" = "Y" ]]; then - sudo apt update > /dev/null 2>&1 && sudo apt install -y $missing > /dev/null 2>&1 - echo -e " ${GRN}Dependencies installed. Proceeding...${CRS}\n" + sudo apt update > /dev/null 2>&1 && sudo apt install -y $missing --simulate > /dev/null 2>&1 + echo -e " ${LCY}- ${GRN}Dependencies installed. Proceeding...${CRS}\n" sudo rm /tmp/LoMeS/installed_dev /tmp/LoMeS/missing_dev 2>/dev/null break @@ -122,12 +122,12 @@ while true; do fi done -while true; do ### CERTIFICATION & CONFIGURATION +while true; do ### CERTIFICATION & CONFIGURATION HTTPS echo -e "\n ${YEL}Configure nginx with SSL and create a self signed cetrificate?" - read -p " (Y/n) --> " installSSL + read -p " (Y/n) --> " nginxSSL echo -e "${CRS}" - if [[ "$installSSL" = "" || "$installSSL" = "y" || "$installSSL" = "Y" ]]; then + if [[ "$nginxSSL" = "" || "$nginxSSL" = "y" || "$nginxSSL" = "Y" ]]; then echo -e " ${YEL}Enter path to certificates folder" read -p " default = /etc/nginx/ssl --> " cert_path echo -e "${CRS}" @@ -165,8 +165,28 @@ while true; do sudo sed -i "s|KEYPATH|$cert_path/$cert_name|" /etc/nginx/sites-enabled/$(hostname).conf break - elif [[ "$installSSL" == "n" || "$installSSL" = "N" ]]; then - echo -e "\n ${YEL}Nginx configuration skipped!${CRS}" + elif [[ "$nginxSSL" == "n" || "$nginxSSL" = "N" ]]; then + while true; do ### CONFIGURATION HTTP + echo -e " ${YEL}Configure nginx with HTTP?" + read -p " (Y/n) --> " nginxHTTP + echo -e "${CRS}" + + if [[ "$nginxHTTP" = "" || "$nginxHTTP" = "y" || "$nginxHTTP" = "Y" ]]; then + sudo cp assets/config/nginx/nginx_HTTP.conf /etc/nginx/sites-enabled/$(hostname).conf + sudo sed -i "s/DOMAIN/$(hostname).local/g" /etc/nginx/sites-enabled/$(hostname).conf + sudo sed -i "s/IPADDR/$ip4/g" /etc/nginx/sites-enabled/$(hostname).conf + break + + elif [[ "$nginxHTTP" = "n" || "$nginxHTTP" = "N" ]]; then + echo -e " ${LCY}- ${LRD}Keeping nginx default configuration!${CRS}" + break + + else + echo -e " ${YEL}Invalid response... Try again...\n\n Y = (Yes, configure nginx)\n N = (No, skip nginx configuration)${CRS}\n " + break + + fi + done break else @@ -180,7 +200,7 @@ done sudo rm -rf /var/www/html if ! [ "$(sudo nginx -t > /dev/null 2>&1)" ]; then ### NGINX CONF CHECK - echo -e "\n ${LGN}Nginx configuration checks out...${CRS}" + echo -e "\n ${LCY}- ${LGN}Nginx configuration checks out...${CRS}" else echo -e "\n ${LRD}Nginx configuration is malformed!${CRS}" @@ -188,7 +208,7 @@ else fi if ! [ "$(sudo nginx -s reload > /dev/null 2>&1)" ]; then ### RELOAD NGINX - echo -e "\n ${LGN}Nginx reloaded...${CRS}" + echo -e "\n ${LCY}- ${LGN}Nginx reloaded...${CRS}" else echo -e "\n ${LRD}Nginx couldn't reload!${CRS}" @@ -196,7 +216,7 @@ else fi if ! [ -f "/tmp/LoMeS/install_log" ]; then ### LOG CHECK - echo -e "\n ${LGN}No errors while setting up...${CRS}\n" + echo -e "\n ${LCY}- ${LGN}No errors while setting up...${CRS}" else echo -e "\n ${LRD}Error occured during setup! Please check ${LCY}/tmp/LoMeS/install_log ${LRD}for details...${CRS}" From 77d4dd3a0a448c7540214a1dd3c73086fab496ae Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Mon, 20 Oct 2025 12:25:49 +0200 Subject: [PATCH 5/6] Setup.sh updated --- lomes-setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lomes-setup.sh b/lomes-setup.sh index 91dbb14..4c93cd5 100755 --- a/lomes-setup.sh +++ b/lomes-setup.sh @@ -28,13 +28,16 @@ dep_check() { if dpkg -s "$pkg" >/dev/null 2>&1; then echo "$pkg" >>/tmp/LoMeS/installed_dev + else echo "$pkg" >>/tmp/LoMeS/missing_dev + fi } for pkg in "${deps[@]}"; do dep_check "$pkg" + done installed="$(cat /tmp/LoMeS/installed_dev 2>/dev/null)" @@ -270,4 +273,4 @@ else fi done -fi \ No newline at end of file +fi From e89c7a0bd2156eb935ff67c89d1f219f36c9fdc8 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Mon, 20 Oct 2025 13:38:34 +0200 Subject: [PATCH 6/6] Structure change --- static/{ => css}/style.css | 42 +++++++++--------- static/data/install_log/log.html | 14 ------ static/{data => }/font/Gravity-Bold.woff | Bin static/{data => }/font/Gravity-Bold.woff2 | Bin .../{data => }/font/Gravity-BoldItalic.woff | Bin .../{data => }/font/Gravity-BoldItalic.woff2 | Bin static/{data => }/font/Gravity-Book.woff | Bin static/{data => }/font/Gravity-Book.woff2 | Bin .../{data => }/font/Gravity-BookItalic.woff | Bin .../{data => }/font/Gravity-BookItalic.woff2 | Bin static/{data => }/font/Gravity-Italic.woff | Bin static/{data => }/font/Gravity-Italic.woff2 | Bin static/{data => }/font/Gravity-Light.woff | Bin static/{data => }/font/Gravity-Light.woff2 | Bin .../{data => }/font/Gravity-LightItalic.woff | Bin .../{data => }/font/Gravity-LightItalic.woff2 | Bin static/{data => }/font/Gravity-Regular.woff | Bin static/{data => }/font/Gravity-Regular.woff2 | Bin .../{data => }/font/Gravity-UltraLight.woff | Bin .../{data => }/font/Gravity-UltraLight.woff2 | Bin .../font/Gravity-UltraLightItalic.woff | Bin .../font/Gravity-UltraLightItalic.woff2 | Bin static/{data => }/images/favicon.ico | 0 static/{data => }/images/lomes.svg | 0 templates/index.html | 8 ++-- 25 files changed, 25 insertions(+), 39 deletions(-) rename static/{ => css}/style.css (59%) delete mode 100644 static/data/install_log/log.html rename static/{data => }/font/Gravity-Bold.woff (100%) rename static/{data => }/font/Gravity-Bold.woff2 (100%) rename static/{data => }/font/Gravity-BoldItalic.woff (100%) rename static/{data => }/font/Gravity-BoldItalic.woff2 (100%) rename static/{data => }/font/Gravity-Book.woff (100%) rename static/{data => }/font/Gravity-Book.woff2 (100%) rename static/{data => }/font/Gravity-BookItalic.woff (100%) rename static/{data => }/font/Gravity-BookItalic.woff2 (100%) rename static/{data => }/font/Gravity-Italic.woff (100%) rename static/{data => }/font/Gravity-Italic.woff2 (100%) rename static/{data => }/font/Gravity-Light.woff (100%) rename static/{data => }/font/Gravity-Light.woff2 (100%) rename static/{data => }/font/Gravity-LightItalic.woff (100%) rename static/{data => }/font/Gravity-LightItalic.woff2 (100%) rename static/{data => }/font/Gravity-Regular.woff (100%) rename static/{data => }/font/Gravity-Regular.woff2 (100%) rename static/{data => }/font/Gravity-UltraLight.woff (100%) rename static/{data => }/font/Gravity-UltraLight.woff2 (100%) rename static/{data => }/font/Gravity-UltraLightItalic.woff (100%) rename static/{data => }/font/Gravity-UltraLightItalic.woff2 (100%) rename static/{data => }/images/favicon.ico (100%) rename static/{data => }/images/lomes.svg (100%) diff --git a/static/style.css b/static/css/style.css similarity index 59% rename from static/style.css rename to static/css/style.css index b9478d2..700a19e 100644 --- a/static/style.css +++ b/static/css/style.css @@ -6,8 +6,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-UltraLight.woff2') format('woff2'), - url('data/font/Gravity-UltraLight.woff') format('woff'); + src: url('font/Gravity-UltraLight.woff2') format('woff2'), + url('font/Gravity-UltraLight.woff') format('woff'); font-weight: 200; font-style: normal; font-display: swap; @@ -15,8 +15,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-Light.woff2') format('woff2'), - url('data/font/Gravity-Light.woff') format('woff'); + src: url('font/Gravity-Light.woff2') format('woff2'), + url('font/Gravity-Light.woff') format('woff'); font-weight: 300; font-style: normal; font-display: swap; @@ -24,8 +24,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-Bold.woff2') format('woff2'), - url('data/font/Gravity-Bold.woff') format('woff'); + src: url('font/Gravity-Bold.woff2') format('woff2'), + url('font/Gravity-Bold.woff') format('woff'); font-weight: bold; font-style: normal; font-display: swap; @@ -33,8 +33,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-LightItalic.woff2') format('woff2'), - url('data/font/Gravity-LightItalic.woff') format('woff'); + src: url('font/Gravity-LightItalic.woff2') format('woff2'), + url('font/Gravity-LightItalic.woff') format('woff'); font-weight: 300; font-style: italic; font-display: swap; @@ -42,8 +42,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-Italic.woff2') format('woff2'), - url('data/font/Gravity-Italic.woff') format('woff'); + src: url('font/Gravity-Italic.woff2') format('woff2'), + url('font/Gravity-Italic.woff') format('woff'); font-weight: normal; font-style: italic; font-display: swap; @@ -51,8 +51,8 @@ @font-face { font-family: 'Gravity Book'; - src: url('data/font/Gravity-Book.woff2') format('woff2'), - url('data/font/Gravity-Book.woff') format('woff'); + src: url('font/Gravity-Book.woff2') format('woff2'), + url('font/Gravity-Book.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; @@ -60,8 +60,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-BoldItalic.woff2') format('woff2'), - url('data/font/Gravity-BoldItalic.woff') format('woff'); + src: url('font/Gravity-BoldItalic.woff2') format('woff2'), + url('font/Gravity-BoldItalic.woff') format('woff'); font-weight: bold; font-style: italic; font-display: swap; @@ -69,8 +69,8 @@ @font-face { font-family: 'Gravity Book'; - src: url('data/font/Gravity-BookItalic.woff2') format('woff2'), - url('data/font/Gravity-BookItalic.woff') format('woff'); + src: url('font/Gravity-BookItalic.woff2') format('woff2'), + url('font/Gravity-BookItalic.woff') format('woff'); font-weight: normal; font-style: italic; font-display: swap; @@ -78,8 +78,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-Regular.woff2') format('woff2'), - url('data/font/Gravity-Regular.woff') format('woff'); + src: url('font/Gravity-Regular.woff2') format('woff2'), + url('font/Gravity-Regular.woff') format('woff'); font-weight: normal; font-style: normal; font-display: swap; @@ -87,8 +87,8 @@ @font-face { font-family: 'Gravity'; - src: url('data/font/Gravity-UltraLightItalic.woff2') format('woff2'), - url('data/font/Gravity-UltraLightItalic.woff') format('woff'); + src: url('font/Gravity-UltraLightItalic.woff2') format('woff2'), + url('font/Gravity-UltraLightItalic.woff') format('woff'); font-weight: 200; font-style: italic; font-display: swap; @@ -143,4 +143,4 @@ li { padding-bottom: 10px; text-align: center; color: lightgray; -} \ No newline at end of file +} diff --git a/static/data/install_log/log.html b/static/data/install_log/log.html deleted file mode 100644 index bcb14ad..0000000 --- a/static/data/install_log/log.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - -
Hostname
IP Address
Encryption
\ No newline at end of file diff --git a/static/data/font/Gravity-Bold.woff b/static/font/Gravity-Bold.woff similarity index 100% rename from static/data/font/Gravity-Bold.woff rename to static/font/Gravity-Bold.woff diff --git a/static/data/font/Gravity-Bold.woff2 b/static/font/Gravity-Bold.woff2 similarity index 100% rename from static/data/font/Gravity-Bold.woff2 rename to static/font/Gravity-Bold.woff2 diff --git a/static/data/font/Gravity-BoldItalic.woff b/static/font/Gravity-BoldItalic.woff similarity index 100% rename from static/data/font/Gravity-BoldItalic.woff rename to static/font/Gravity-BoldItalic.woff diff --git a/static/data/font/Gravity-BoldItalic.woff2 b/static/font/Gravity-BoldItalic.woff2 similarity index 100% rename from static/data/font/Gravity-BoldItalic.woff2 rename to static/font/Gravity-BoldItalic.woff2 diff --git a/static/data/font/Gravity-Book.woff b/static/font/Gravity-Book.woff similarity index 100% rename from static/data/font/Gravity-Book.woff rename to static/font/Gravity-Book.woff diff --git a/static/data/font/Gravity-Book.woff2 b/static/font/Gravity-Book.woff2 similarity index 100% rename from static/data/font/Gravity-Book.woff2 rename to static/font/Gravity-Book.woff2 diff --git a/static/data/font/Gravity-BookItalic.woff b/static/font/Gravity-BookItalic.woff similarity index 100% rename from static/data/font/Gravity-BookItalic.woff rename to static/font/Gravity-BookItalic.woff diff --git a/static/data/font/Gravity-BookItalic.woff2 b/static/font/Gravity-BookItalic.woff2 similarity index 100% rename from static/data/font/Gravity-BookItalic.woff2 rename to static/font/Gravity-BookItalic.woff2 diff --git a/static/data/font/Gravity-Italic.woff b/static/font/Gravity-Italic.woff similarity index 100% rename from static/data/font/Gravity-Italic.woff rename to static/font/Gravity-Italic.woff diff --git a/static/data/font/Gravity-Italic.woff2 b/static/font/Gravity-Italic.woff2 similarity index 100% rename from static/data/font/Gravity-Italic.woff2 rename to static/font/Gravity-Italic.woff2 diff --git a/static/data/font/Gravity-Light.woff b/static/font/Gravity-Light.woff similarity index 100% rename from static/data/font/Gravity-Light.woff rename to static/font/Gravity-Light.woff diff --git a/static/data/font/Gravity-Light.woff2 b/static/font/Gravity-Light.woff2 similarity index 100% rename from static/data/font/Gravity-Light.woff2 rename to static/font/Gravity-Light.woff2 diff --git a/static/data/font/Gravity-LightItalic.woff b/static/font/Gravity-LightItalic.woff similarity index 100% rename from static/data/font/Gravity-LightItalic.woff rename to static/font/Gravity-LightItalic.woff diff --git a/static/data/font/Gravity-LightItalic.woff2 b/static/font/Gravity-LightItalic.woff2 similarity index 100% rename from static/data/font/Gravity-LightItalic.woff2 rename to static/font/Gravity-LightItalic.woff2 diff --git a/static/data/font/Gravity-Regular.woff b/static/font/Gravity-Regular.woff similarity index 100% rename from static/data/font/Gravity-Regular.woff rename to static/font/Gravity-Regular.woff diff --git a/static/data/font/Gravity-Regular.woff2 b/static/font/Gravity-Regular.woff2 similarity index 100% rename from static/data/font/Gravity-Regular.woff2 rename to static/font/Gravity-Regular.woff2 diff --git a/static/data/font/Gravity-UltraLight.woff b/static/font/Gravity-UltraLight.woff similarity index 100% rename from static/data/font/Gravity-UltraLight.woff rename to static/font/Gravity-UltraLight.woff diff --git a/static/data/font/Gravity-UltraLight.woff2 b/static/font/Gravity-UltraLight.woff2 similarity index 100% rename from static/data/font/Gravity-UltraLight.woff2 rename to static/font/Gravity-UltraLight.woff2 diff --git a/static/data/font/Gravity-UltraLightItalic.woff b/static/font/Gravity-UltraLightItalic.woff similarity index 100% rename from static/data/font/Gravity-UltraLightItalic.woff rename to static/font/Gravity-UltraLightItalic.woff diff --git a/static/data/font/Gravity-UltraLightItalic.woff2 b/static/font/Gravity-UltraLightItalic.woff2 similarity index 100% rename from static/data/font/Gravity-UltraLightItalic.woff2 rename to static/font/Gravity-UltraLightItalic.woff2 diff --git a/static/data/images/favicon.ico b/static/images/favicon.ico similarity index 100% rename from static/data/images/favicon.ico rename to static/images/favicon.ico diff --git a/static/data/images/lomes.svg b/static/images/lomes.svg similarity index 100% rename from static/data/images/lomes.svg rename to static/images/lomes.svg diff --git a/templates/index.html b/templates/index.html index 4e6cf4b..d386b72 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,13 +4,13 @@ LoMeS | Meshtastic - - + +
- +

Welcome to LoMeS

@@ -30,4 +30,4 @@
- \ No newline at end of file +