diff --git a/README.md b/README.md index 31ad722..6e581f1 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,12 @@ - - # LoMeS **LOcal MEshtastic Server** _in development_ Idea is to: -- develop an offline Meshtastic server, running in your local network and **nowhere** else. +- develop an offline web app client and python backend, running in your local network and **nowhere** else. - create a web app, coded in `html`, `css`, `js` and `php` and make it a bit prettier than the original. - code a backend utilising `flask`, `python`, `python3-meshtastic` and `python3-requests`. - make it as light but versatile as possible _let's see how this is gonna work out..._ - and **maybe** connect to mobile clients in the far future. - check progress [here](https://lab.c95.org/fr4nz/LoMeS/src/branch/main/assets/notes/notes.md) --- - -## Hardware - -for now everything will be developed and tested on Raspberry Pi 3B and newer acting as server and as LoRa Modules RAK WisBlock 4631 with RAK 19007 Board as well as Heltec V3 connected via USB/UART. - -## Hard & Firmware - -- Raspberry Pi 4B | _RPI OS lite (Debian 13 | Trixie)_ -- RAK Wisblock | _FW 2.6.11_ -- Heltec V3 | _FW 2.6.11_ - -## Development Setup - -1. Flash Raspberry Pi OS lite 64bit -2. Install git: -```bash -sudo apt install -y git -``` -3. Clone repository -```bash -git clone https://lab.c95.org/fr4nz/LoMeS.git && cd LoMeS -``` -4. Run development environment setup -```bash -chmod +x lomes-setup.sh && sudo ./lomes-setup.sh -``` -5. Start developing \ No newline at end of file diff --git a/assets/config/deps/dependencies b/assets/config/deps/dependencies deleted file mode 100644 index aebbc0c..0000000 --- a/assets/config/deps/dependencies +++ /dev/null @@ -1,2 +0,0 @@ -#deps="openssl nginx nginx-common python3-meshtastic python3-flask python3-requests" -deps=("openssl" "nginx" "python3-meshtastic" "python3-flask" "python3-requests" "usbip" "python3-usb") \ No newline at end of file diff --git a/assets/config/flask/lomes-app.py b/assets/config/flask/lomes-app.py deleted file mode 100644 index 60ef82d..0000000 --- a/assets/config/flask/lomes-app.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/python3 - -from flask import Flask, render_template - -app = Flask(__name__, static_folder="/var/www/html", static_url_path="/var/www/html", send_from_directory("data/images, lomes.svg")) - -@app.route("/") -def index(): - return app.send_static_file("index.html") - - -app.run(host="127.0.0.1", port=5000) \ No newline at end of file diff --git a/assets/config/nginx/nginx_HTTP.conf b/assets/config/nginx/nginx_HTTP.conf deleted file mode 100644 index 293b59a..0000000 --- a/assets/config/nginx/nginx_HTTP.conf +++ /dev/null @@ -1,14 +0,0 @@ -########################################################### -### ### -### MESHPI NGINX CONFIG ### -### ### -########################################################### - -server { - listen 80; - server_name DOMAIN IPADDR; - - location / { - proxy_pass http://127.0.0.1:5000; - } -} diff --git a/assets/config/nginx/nginx_SSL.conf b/assets/config/nginx/nginx_SSL.conf deleted file mode 100644 index a0323c0..0000000 --- a/assets/config/nginx/nginx_SSL.conf +++ /dev/null @@ -1,31 +0,0 @@ -########################################################### -### ### -### MESHPI NGINX CONFIG ### -### ### -########################################################### - -server { - listen 80; - server_name DOMAIN IPADDR; - return 301 https://$host$request_uri; -} - -server { - listen 443 ssl; - server_name DOMAIN IPADDR; - - ssl_certificate CERTPATH.crt; - ssl_certificate_key KEYPATH.key; - - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers HIGH:!aNULL:!MD5; - - ssl_session_cache shared:SSL:10m; - ssl_session_timeout 10m; - - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - location / { - proxy_pass http://127.0.0.1:5000; - } -} diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico deleted file mode 100644 index 5ee2b1b..0000000 --- a/assets/images/favicon.ico +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - diff --git a/assets/images/lomes.svg b/assets/images/lomes.svg deleted file mode 100644 index a9886b3..0000000 --- a/assets/images/lomes.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - diff --git a/assets/notes/FrontToBackend.md b/assets/notes/FrontToBackend.md deleted file mode 100644 index 849906d..0000000 --- a/assets/notes/FrontToBackend.md +++ /dev/null @@ -1,34 +0,0 @@ -[CRUD REST API](https://youtu.be/I07FyMH1DzI) - ---- - -[Meshtastic Python API Documentation](https://python.meshtastic.org/) - ---- - -To send commands from a Python script to a web server, you can use HTTP requests. The requests library is a popular and user-friendly option for making HTTP calls in Python. - For example, you can send a POST request with data to a specific URL: - -import requests - -data = {"key": "value"} -response = requests.post("http://example.com/api", data=data) - -Alternatively, you can use the built-in urllib module, though requests is generally preferred for its simplicity and readability. - -For sending data from a Raspberry Pi to a web server, you can use tools like curl in a cron job to periodically send data from a Python script to a server endpoint. - For instance: - -curl -X POST -d "$(python /path/to/script.py)" http://example.com/receive.php - -This approach allows the script to output data, which is then sent to the server via HTTP POST. - -If you are building a web server in Python to receive commands, you can use the http.server module to create a simple server that handles incoming requests. - For example, a basic server can be started with: - -python3 -m http.server 8000 - -This starts a server on port 8000, accessible via http://localhost:8000. - You can extend this server to process incoming commands by defining custom request handlers using BaseHTTPRequestHandler. - -For more advanced use cases, frameworks like Flask or Django can be used to create robust web servers capable of handling complex command logic and data processing. \ No newline at end of file diff --git a/assets/notes/notes.md b/assets/notes/notes.md deleted file mode 100644 index df5b017..0000000 --- a/assets/notes/notes.md +++ /dev/null @@ -1,105 +0,0 @@ -# Notes -## To Do -1. [x] define actions and plan -2. [ ] create setup script -3. [ ] communicate with Meshtastic device via web interface - -## Follow up -### Backend -[meshtastic-cli-receive-text](https://github.com/brad28b/meshtastic-cli-receive-text) - -### Web app -[flask web app tutorial](https://www.digitalocean.com/community/tutorials/how-to-make-a-web-application-using-flask-in-python-3) - -[w3schools How to's](https://www.w3schools.com/howto/default.asp) - -## Timeline - -### Backend -- Environment setup script in development - -### Frontend - -### Thoughts -- Play with usbip - -To establish a connection between a website and a USB device connected to a Linux server, you cannot directly connect a web application to a USB device over a network using standard web protocols. However, you can achieve this functionality by creating a bridge between the web application and the USB device using a local service on the Linux server. Here’s how: - -1. Use USB/IP to Share the USB Device Over the Network: The USB/IP project allows you to share a physical USB device connected to a Linux server over a TCP/IP network, making it appear as a local USB device on a client machine. This is the most direct method for network access. - - On the Server (where the USB device is physically connected): - - Install the usbip package. - - Load the required kernel modules: usbip_core and usbip_host by creating a `.conf` file in `/etc/modules-load.d/` and adding the modules. - - Start and enable the usbipd.service daemon. - - List the available USB devices using usbip list -l to find the device's bus ID. - - Bind the specific USB device to the USB/IP service using usbip bind -b . This makes the device available for remote access. - - On the Client (the machine running the web application): - - Ensure the vhci_hcd kernel module is loaded. - - List the available devices from the server using usbip list -r . - - Attach the device to the client using usbip attach -r -b . Once attached, the device will appear as a local USB device on the client machine. -2. Integrate the Attached Device with Your Web Application: Once the USB device is attached to the client machine via USB/IP, it will be accessible to any software running on that machine, including a web application. The web application can then communicate with the device using standard USB communication libraries (e.g., libusb for C/C++, pyusb for Python) just as if the device were directly connected to the client machine. The web server (e.g., Apache, Nginx) and the application framework (e.g., Node.js, Django) on the client machine handle the web interface, while the application code uses the local USB device. -3. Alternative: Use a Local Service (e.g., a Web API): Instead of attaching the device to the web server machine, you can create a separate local service (a daemon or a small application) on the server that communicates directly with the USB device. This service can then expose a simple HTTP API (e.g., using a lightweight framework like Flask or Express) that the web application can call to send commands to or receive data from the USB device. This approach keeps the USB device connection confined to the server and uses standard web protocols for communication. - -In summary, the most practical approach is to use USB/IP to make the USB device appear as a local device on the machine hosting the web application, allowing the application to interact with it directly through standard USB libraries. - -### Troubble Shooting - -**usbip: error: could not connect to 192.168.1.8:3240: System error** adjust firewall? `vhci_hcd` on client machine? - -So for the daemon - /etc/systemd/system/usbipd.service -``` -[Unit] -Description=usbip host daemon -After=network-online.target -Wants=network-online.target - -[Service] -Type=simple -Restart=always -ExecStartPre=/usr/sbin/modprobe usbip-core -ExecStartPre=/usr/sbin/modprobe usbip-host -ExecStart=/usr/sbin/usbipd -ExecStopPost=/usr/sbin/rmmod usbip-host -ExecStopPost=/usr/sbin/rmmod usbip-core - -[Install] -WantedBy=multi-user.target -``` - -And the template for the binds - /etc/systemd/system/usbip-bind@.service - -``` -[Unit] -Description=Bind USB device to usbipd -After=network-online.target usbipd.service -Wants=network-online.target usbipd.service - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/sbin/usbip bind --busid %i -ExecStop=/usr/sbin/usbip unbind --busid %i - -[Install] -WantedBy=multi-user.target -``` - -Enable and start the daemon with: -``` -systemctl enable usbipd -systemctl start usbuipd -``` - -Then add binds with: - -``` -systemctl enable usbip-bind@1-1.2.3 -systemctl start usbip-bind@1-1.2.3 -``` -Replace 1-1.2.3 with the bind id of the USB device you want to share. You can use as many of these as devices you want to share and you can then bind and unbind each one individually and have then bind at machine startup (or not). - -Find the bind ids with: - -`usbip list -l` -Note that usbip binds seem to expire if not attached by a remote machine within around 10 mins - not very helpful! - -I haven't yet decided how I'm going to tackle the client attach, possibly not with systemd. It would be really helpful if usbip had a bit more intelligence... \ No newline at end of file diff --git a/assets/shell/colors b/assets/shell/colors deleted file mode 100644 index 72f5d7d..0000000 --- a/assets/shell/colors +++ /dev/null @@ -1,18 +0,0 @@ -## SOME COLOR -BLK="\e[0;30m" -RED="\e[0;31m" -GRN="\e[0;32m" -ORN="\e[0;33m" -BLU="\e[0;34m" -MGT="\e[0;35m" -CYN="\e[0;36m" -LGR="\e[0;37m" -DGR="\e[1;30m" -LRD="\e[1;31m" -LGN="\e[1;32m" -YEL="\e[1;33m" -LBL="\e[1;34m" -LPR="\e[1;35m" -LCY="\e[1;36m" -WHT="\e[1;37m" -CRS="\e[0m" \ No newline at end of file diff --git a/assets/shell/template.sh b/assets/shell/template.sh deleted file mode 100644 index 41439e3..0000000 --- a/assets/shell/template.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -### SHELL TEMPLATE diff --git a/assets/test/test.sh b/assets/test/test.sh deleted file mode 100755 index 209beee..0000000 --- a/assets/test/test.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -source assets/shell/colors -source assets/config/deps/dependencies - -### DEPENDENCY CHECK & INSTALLER - -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" - -else - echo -e " ${RED}Privilege check failed... Please run script with sudo or as root!${CRS}\n" - exit 1 -fi - -### DEPENDENCIES - -dep_check() { - local pkg="$1" - - if dpkg -s "$pkg" >/dev/null 2>&1; then - echo "$pkg" >>/tmp/installed_dev - else - echo "$pkg" >>/tmp/missing_dev - fi -} - -for pkg in "${deps[@]}"; do - dep_check "$pkg" -done - -installed="$(cat /tmp/installed_dev 2>/dev/null)" -missing="$(cat /tmp/missing_dev 2>/dev/null)" - -if ! [ "$missing" ]; then - echo -e "\n ${GRN}Dependencies met. Proceeding...${CRS}\n" -else - echo -e "\n ${RED}Following dependencies are missing :${CRS}\n\n$missing" - while true; do - echo -e "\n ${YEL}Do you wish to install via APT?" - read -p " (Y/n) --> " install_dep - echo -e "${CRS}" - if [[ "$install_dep" = "" || "$install_dep" = "y" || "$install_dep" = "Y" ]]; then - sudo apt update && sudo apt install -y $missing --simulate - echo -e "\n ${GRN}Dependencies installed. Proceeding...${CRS}\n" - sudo rm /tmp/installed_dev /tmp/missing_dev 2>/dev/null - break - elif [[ "$install_dep" == "n" || "$install_dep" = "N" ]]; then - echo -e "\n ${RED}Missing dependencies... Exiting!${CRS}\n" - sudo rm /tmp/installed_dev /tmp/missing_dev 2>/dev/null - exit 1 - else - echo -e "\n ${YEL}Invalid response... Try again...\n\n ${GRN}Y ${YEL}= (Yes, install dependencies and continue)\n ${RED}N ${YEL}= (No, don't install dependencies and exit)${CRS}\n " - fi - done -fi \ No newline at end of file diff --git a/lomes-app.py b/lomes-app.py deleted file mode 100755 index a8260e7..0000000 --- a/lomes-app.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/python3 - -from flask import Flask, render_template -import datetime -import getpass -import os - -app = Flask(__name__) - -@app.route("/") -def index(): - user = getpass.getuser() - 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)) - - 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 diff --git a/lomes-setup.sh b/lomes-setup.sh deleted file mode 100755 index 4c93cd5..0000000 --- a/lomes-setup.sh +++ /dev/null @@ -1,276 +0,0 @@ -#!/bin/bash -trap "exit" INT - -chmod +x lomes-app.py -mkdir -p /tmp/LoMeS -source assets/shell/colors -source assets/config/deps/dependencies - -### DEPENDENCY CHECK & INSTALLER - -echo -e "\n ${LCY}Dependency and Privilege Check running...${CRS}\n" - -### PRIVILEGES - -if (( $(id -u) == 0 )); then ### AM I ROOT ? - echo -e " ${LCY}- ${GRN}Privilege check passed...${CRS}\n" - -else - echo -e " ${LCY}- ${RED}Privilege check failed... Please run script with sudo or as root!${CRS}\n" - exit 1 - -fi - -### DEPENDENCIES - -dep_check() { ### MISSING PKGS ? - local pkg="$1" - - 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)" -missing="$(cat /tmp/LoMeS/missing_dev 2>/dev/null)" - -if ! [ "$missing" ]; then - echo -e " ${LCY}- ${GRN}Dependencies met. Proceeding...${CRS}\n" - -else ### INSTALLING PKGS ! - 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?" - read -p " (Y/n) --> " install_dep - 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 --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 - - elif [[ "$install_dep" == "n" || "$install_dep" = "N" ]]; then - echo -e " ${RED}Missing dependencies... Exiting!${CRS}\n" - sudo rm /tmp/LoMeS/installed_dev /tmp/LoMeS/missing_dev 2>/dev/null - exit 1 - - else - echo -e " ${YEL}Invalid response... Try again...\n\n ${GRN}Y ${YEL}= (Yes, install dependencies and continue)\n ${RED}N ${YEL}= (No, don't install dependencies and exit)${CRS}\n " - - fi - done -fi - -### NGINX SETUP & CONFIG - -###### CONNECTION & INTERFACE - -onif=$(/sbin/ip route get 162.249.72.1 | awk '{print $5}' | cut -d/ -f1) - -while true; do ### SELECT NETWORK INTERFACE ! - echo -e " ${YEL}What network interface will nginx be using?" - read -p " current = "$onif" --> " nif - echo -e "${CRS}" - - if ! [ "$nif" ]; then - nif="$onif" - break - - elif [ -d "/sys/class/net/$nif" ]; then - break - - else - echo -e "\n ${LRD}Interface not found... Try again!${CRS}\n" - - fi -done - -ip4=$(/sbin/ip -o -4 addr list "$nif" | awk '{print $4}' | cut -d/ -f1) ### GET IP FOR CHOSEN INTERFACE ! -echo -e "\n ${YEL}Current hostname : ${LCY}$(hostname)${CRS}" -echo -e " ${YEL}Current ip address : ${LCY}$ip4 ${YEL}@ ${LCY}$nif${CRS}" -echo -e "\n ${YEL}This information will be used to configure ${LCY}nginx.conf ${YEL}during the next steps." - -while true; do ### HOST NAME CHANGE ? - read -p " Would you like to change the hostname? (y/N) --> " conf_hostname - echo -e "${CRS}" - - if [[ "$conf_hostname" = "" || "$conf_hostname" = "n" || "$conf_hostname" = "N" ]]; then - new_hostname=$(hostname) - break - - elif [[ "$conf_hostname" = "y" || "$conf_hostname" = "Y" ]]; then - read -p " Enter new hostname --> " new_hostname - sudo sed -i.backup "s/$(hostname)/$new_hostname/g" /etc/hosts - sudo echo "$new_hostname" > /etc/hostname - sudo systemctl restart NetworkManager 2>/dev/null - hostname -F /etc/hostname 2>/dev/null - echo -e "\n ${GRN}Host name changed to ${LCY}$(hostname)${CRS}" - echo "HC" > /tmp/LoMeS/honacha - break - - else - echo -e "\n ${YEL}Invalid response... Try again...\n\n Y = (Yes, set new hostname)\n N = (No, leave as is)${CRS}\n " - - fi -done - -while true; do ### CERTIFICATION & CONFIGURATION HTTPS - echo -e "\n ${YEL}Configure nginx with SSL and create a self signed cetrificate?" - read -p " (Y/n) --> " nginxSSL - echo -e "${CRS}" - - 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}" - - if ! [ "$cert_path" ]; then - cert_path=/etc/nginx/ssl - - elif [[ "$cert_path" = "." ]]; then - cert_path=$PWD - - else - : - - fi - echo -e " ${YEL}Enter file name for certificate and key" - read -p " default = $(hostname) --> " cert_name - echo -e "${CRS}" - - if ! [ "$cert_name" ]; then - cert_name=$(hostname) - - else - : - - fi - sudo mkdir -p "$cert_path" - sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout "$cert_path"/"$cert_name".key -out "$cert_path"/"$cert_name".crt - echo -e "\n ${GRN}SSL certificate files ${LCY}$cert_name.crt ${GRN}and ${LCY}$cert_name.key ${GRN}created and stored in ${LCY}$cert_path${CRS}" - sudo chmod 644 "$cert_path"/"$cert_name".crt - sudo chmod 600 "$cert_path"/"$cert_name".key - sudo cp assets/config/nginx/nginx_SSL.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 - sudo sed -i "s|CERTPATH|$cert_path/$cert_name|" /etc/nginx/sites-enabled/$(hostname).conf - sudo sed -i "s|KEYPATH|$cert_path/$cert_name|" /etc/nginx/sites-enabled/$(hostname).conf - break - - 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 - echo -e "\n ${YEL}Invalid response... Try again...\n\n Y = (Yes, configure SSL certificate and continue)\n N = (No, leave unencrypted and continue)${CRS}\n " - - fi -done - -###### NGINX MAINTENANCE - -sudo rm -rf /var/www/html - -if ! [ "$(sudo nginx -t > /dev/null 2>&1)" ]; then ### NGINX CONF CHECK - echo -e "\n ${LCY}- ${LGN}Nginx configuration checks out...${CRS}" - -else - echo -e "\n ${LRD}Nginx configuration is malformed!${CRS}" - echo "nginx -t --> failed" >> /tmp/LoMeS/install_log -fi - -if ! [ "$(sudo nginx -s reload > /dev/null 2>&1)" ]; then ### RELOAD NGINX - echo -e "\n ${LCY}- ${LGN}Nginx reloaded...${CRS}" - -else - echo -e "\n ${LRD}Nginx couldn't reload!${CRS}" - echo "nginx -s reload --> failed" >> /tmp/LoMeS/install_log -fi - -if ! [ -f "/tmp/LoMeS/install_log" ]; then ### LOG CHECK - 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}" - -fi - -if [ -f "/tmp/LoMeS/honacha" ]; then ### REBOOT DUE TO HOST NAME CHANGE - echo -e "\n ${YEL}During setup you changed this machines host name. For the change to take effect, you should reboot! " - - while true; do - read -p " Would you like to reboot? (Y/n) --> " reboot - echo -e "${CRS}" - - if [[ "$reboot" = "" || "$reboot" = "y" || "$reboot" = "Y" ]]; then - echo -e " ${YEL}Rebooting in 10sec..." - echo -e " ${YEL}to start flask manually, run ${LCY}python3 lomes-app.py ${YEL}from LoMeS directory${CRS}" - sleep 10s - sudo reboot - - elif [[ "$reboot" = "n" || "$reboot" = "N" ]]; then - echo -e " ${YEL}to start flask manually, run ${LCY}python3 lomes-app.py ${YEL}from LoMeS directory${CRS}" - break - - else - echo -e "\n ${YEL}Invalid response... Try again...\n\n Y = (Yes, reboot)\n N = (No, don't reboot)${CRS}\n " - - fi - done - -else - - while true; do - echo -e "${YEL}" ### START FLASK ? - read -p " Would you like to start flask? (Y/n) --> " flask_start - echo -e "${CRS}" - - if [[ "$flask_start" = "" || "$flask_start" = "y" || "$flask_start" = "Y" ]]; then - echo -e " ${YEL}Starting flask in 10sec..." - echo -e " ${YEL}to start flask manually, run ${LCY}python3 lomes-app.py ${YEL}from LoMeS directory${CRS}\n" - sleep 10s - python3 lomes-app.py - break - - elif [[ "$flask_start" = "n" || "$flask_start" = "N" ]]; then - echo -e " ${YEL}to start flask manually, run ${LCY}python3 lomes-app.py ${YEL}from LoMeS directory${CRS}\n" - break - - else - echo -e "\n ${YEL}Invalid response... Try again...\n\n Y = (Yes, to start flask)\n N = (No, start flask later)${CRS}\n " - - fi - done - -fi diff --git a/static/css/style.css b/static/css/style.css deleted file mode 100644 index 700a19e..0000000 --- a/static/css/style.css +++ /dev/null @@ -1,146 +0,0 @@ -*{ - margin: 0; - padding: 0; - font-family: Gravity; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-UltraLight.woff2') format('woff2'), - url('font/Gravity-UltraLight.woff') format('woff'); - font-weight: 200; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-Light.woff2') format('woff2'), - url('font/Gravity-Light.woff') format('woff'); - font-weight: 300; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-Bold.woff2') format('woff2'), - url('font/Gravity-Bold.woff') format('woff'); - font-weight: bold; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-LightItalic.woff2') format('woff2'), - url('font/Gravity-LightItalic.woff') format('woff'); - font-weight: 300; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-Italic.woff2') format('woff2'), - url('font/Gravity-Italic.woff') format('woff'); - font-weight: normal; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Gravity Book'; - src: url('font/Gravity-Book.woff2') format('woff2'), - url('font/Gravity-Book.woff') format('woff'); - font-weight: normal; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-BoldItalic.woff2') format('woff2'), - url('font/Gravity-BoldItalic.woff') format('woff'); - font-weight: bold; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Gravity Book'; - src: url('font/Gravity-BookItalic.woff2') format('woff2'), - url('font/Gravity-BookItalic.woff') format('woff'); - font-weight: normal; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-Regular.woff2') format('woff2'), - url('font/Gravity-Regular.woff') format('woff'); - font-weight: normal; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: 'Gravity'; - src: url('font/Gravity-UltraLightItalic.woff2') format('woff2'), - url('font/Gravity-UltraLightItalic.woff') format('woff'); - font-weight: 200; - font-style: italic; - font-display: swap; -} - -body { - background-color: darkslategrey; -} - -header { - display: flex; - align-items: center; - justify-content: center; - padding-top: 30px; -} - -.icon { - height: 80px; -} - -.textBox { - padding-top: 20px; -} - -h1 { - font-size: 26px; - padding: 5px; - padding-bottom: 10px; - text-align: center; - color: lightgray; -} - -h3 { - font-size: 20px; - padding: 5px; - padding-bottom: 10px; - text-align: center; - color: lightgray; -} - -p { - font-size: 16px; - padding: 5px; - padding-bottom: 10px; - text-align: center; - color: lightgray; -} - -li { - font-size: 16px; - padding: 5px; - padding-bottom: 10px; - text-align: center; - color: lightgray; -} diff --git a/static/font/Gravity-Bold.woff b/static/font/Gravity-Bold.woff deleted file mode 100644 index bd94496..0000000 Binary files a/static/font/Gravity-Bold.woff and /dev/null differ diff --git a/static/font/Gravity-Bold.woff2 b/static/font/Gravity-Bold.woff2 deleted file mode 100644 index d3dfc2b..0000000 Binary files a/static/font/Gravity-Bold.woff2 and /dev/null differ diff --git a/static/font/Gravity-BoldItalic.woff b/static/font/Gravity-BoldItalic.woff deleted file mode 100644 index 674ef3e..0000000 Binary files a/static/font/Gravity-BoldItalic.woff and /dev/null differ diff --git a/static/font/Gravity-BoldItalic.woff2 b/static/font/Gravity-BoldItalic.woff2 deleted file mode 100644 index 7489325..0000000 Binary files a/static/font/Gravity-BoldItalic.woff2 and /dev/null differ diff --git a/static/font/Gravity-Book.woff b/static/font/Gravity-Book.woff deleted file mode 100644 index ae705ec..0000000 Binary files a/static/font/Gravity-Book.woff and /dev/null differ diff --git a/static/font/Gravity-Book.woff2 b/static/font/Gravity-Book.woff2 deleted file mode 100644 index 5e90874..0000000 Binary files a/static/font/Gravity-Book.woff2 and /dev/null differ diff --git a/static/font/Gravity-BookItalic.woff b/static/font/Gravity-BookItalic.woff deleted file mode 100644 index 5e1d14c..0000000 Binary files a/static/font/Gravity-BookItalic.woff and /dev/null differ diff --git a/static/font/Gravity-BookItalic.woff2 b/static/font/Gravity-BookItalic.woff2 deleted file mode 100644 index 4752f17..0000000 Binary files a/static/font/Gravity-BookItalic.woff2 and /dev/null differ diff --git a/static/font/Gravity-Italic.woff b/static/font/Gravity-Italic.woff deleted file mode 100644 index 8b23e2a..0000000 Binary files a/static/font/Gravity-Italic.woff and /dev/null differ diff --git a/static/font/Gravity-Italic.woff2 b/static/font/Gravity-Italic.woff2 deleted file mode 100644 index 83d4e4c..0000000 Binary files a/static/font/Gravity-Italic.woff2 and /dev/null differ diff --git a/static/font/Gravity-Light.woff b/static/font/Gravity-Light.woff deleted file mode 100644 index fbd80fb..0000000 Binary files a/static/font/Gravity-Light.woff and /dev/null differ diff --git a/static/font/Gravity-Light.woff2 b/static/font/Gravity-Light.woff2 deleted file mode 100644 index a0f022d..0000000 Binary files a/static/font/Gravity-Light.woff2 and /dev/null differ diff --git a/static/font/Gravity-LightItalic.woff b/static/font/Gravity-LightItalic.woff deleted file mode 100644 index b30c6c0..0000000 Binary files a/static/font/Gravity-LightItalic.woff and /dev/null differ diff --git a/static/font/Gravity-LightItalic.woff2 b/static/font/Gravity-LightItalic.woff2 deleted file mode 100644 index 4b1015f..0000000 Binary files a/static/font/Gravity-LightItalic.woff2 and /dev/null differ diff --git a/static/font/Gravity-Regular.woff b/static/font/Gravity-Regular.woff deleted file mode 100644 index 975db9c..0000000 Binary files a/static/font/Gravity-Regular.woff and /dev/null differ diff --git a/static/font/Gravity-Regular.woff2 b/static/font/Gravity-Regular.woff2 deleted file mode 100644 index 0c8b99e..0000000 Binary files a/static/font/Gravity-Regular.woff2 and /dev/null differ diff --git a/static/font/Gravity-UltraLight.woff b/static/font/Gravity-UltraLight.woff deleted file mode 100644 index e9126ec..0000000 Binary files a/static/font/Gravity-UltraLight.woff and /dev/null differ diff --git a/static/font/Gravity-UltraLight.woff2 b/static/font/Gravity-UltraLight.woff2 deleted file mode 100644 index 5b913c8..0000000 Binary files a/static/font/Gravity-UltraLight.woff2 and /dev/null differ diff --git a/static/font/Gravity-UltraLightItalic.woff b/static/font/Gravity-UltraLightItalic.woff deleted file mode 100644 index f9ee0c1..0000000 Binary files a/static/font/Gravity-UltraLightItalic.woff and /dev/null differ diff --git a/static/font/Gravity-UltraLightItalic.woff2 b/static/font/Gravity-UltraLightItalic.woff2 deleted file mode 100644 index 7dd35c7..0000000 Binary files a/static/font/Gravity-UltraLightItalic.woff2 and /dev/null differ diff --git a/static/images/favicon.ico b/static/images/favicon.ico deleted file mode 100644 index 5ee2b1b..0000000 --- a/static/images/favicon.ico +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - diff --git a/static/images/lomes.svg b/static/images/lomes.svg deleted file mode 100644 index a9886b3..0000000 --- a/static/images/lomes.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index d386b72..0000000 --- a/templates/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - LoMeS | Meshtastic - - - - - - - - Welcome to LoMeS - - - A Local Meshtastic Server in development - If you see this site, means "LoMeS" development environment is running! - Thanks for collaborating and trying to make things more real... - - - Configuration Summary - - - User executing flask : {{user}} - Machine time : {{time}} - {{sysinfo}} - - - - - -
If you see this site, means "LoMeS" development environment is running!
Thanks for collaborating and trying to make things more real...