Merge branch 'dev-stable' into dev-1
This commit is contained in:
commit
03c56cbe2d
28 changed files with 77 additions and 84 deletions
14
assets/config/nginx/nginx_HTTP.conf
Normal file
14
assets/config/nginx/nginx_HTTP.conf
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
###########################################################
|
||||||
|
### ###
|
||||||
|
### MESHPI NGINX CONFIG ###
|
||||||
|
### ###
|
||||||
|
###########################################################
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name DOMAIN IPADDR;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:5000;
|
||||||
|
}
|
||||||
|
}
|
||||||
30
index.html
30
index.html
|
|
@ -1,30 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html" charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width" initial-scale="1.0">
|
|
||||||
|
|
||||||
<title>LoMeS | Meshtastic</title>
|
|
||||||
<link rel="icon" href="{{ url_for('static', filename='data/images/lomes.svg') }}">
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<section>
|
|
||||||
<header>
|
|
||||||
<img class="icon" src="{{ url_for('static', filename='data/images/lomes.svg') }}">
|
|
||||||
<h1>Welcome to LoMeS</h1>
|
|
||||||
</header>
|
|
||||||
<div class="textBox">
|
|
||||||
<h3>A Local Meshtastic Server in development</h3><br>
|
|
||||||
<p><strong>Hi {{user}}</strong></p>
|
|
||||||
<p>If you see this site, means "LoMeS" development environment is running!</p>
|
|
||||||
<p>Thanks for collaborating and trying to make things more real...</p>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="textBox">
|
|
||||||
<h3>Configuration Summary</h3>
|
|
||||||
<div class="confBox">
|
|
||||||
<link rel="import" href="assets/html/data/install_log/log.html">
|
|
||||||
</div>-->
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -13,10 +13,10 @@ echo -e "\n ${LCY}Dependency and Privilege Check running...${CRS}\n"
|
||||||
### PRIVILEGES
|
### PRIVILEGES
|
||||||
|
|
||||||
if (( $(id -u) == 0 )); then ### AM I ROOT ?
|
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
|
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
|
exit 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
@ -28,23 +28,26 @@ dep_check() {
|
||||||
|
|
||||||
if dpkg -s "$pkg" >/dev/null 2>&1; then
|
if dpkg -s "$pkg" >/dev/null 2>&1; then
|
||||||
echo "$pkg" >>/tmp/LoMeS/installed_dev
|
echo "$pkg" >>/tmp/LoMeS/installed_dev
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$pkg" >>/tmp/LoMeS/missing_dev
|
echo "$pkg" >>/tmp/LoMeS/missing_dev
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
for pkg in "${deps[@]}"; do
|
for pkg in "${deps[@]}"; do
|
||||||
dep_check "$pkg"
|
dep_check "$pkg"
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
installed="$(cat /tmp/LoMeS/installed_dev 2>/dev/null)"
|
installed="$(cat /tmp/LoMeS/installed_dev 2>/dev/null)"
|
||||||
missing="$(cat /tmp/LoMeS/missing_dev 2>/dev/null)"
|
missing="$(cat /tmp/LoMeS/missing_dev 2>/dev/null)"
|
||||||
|
|
||||||
if ! [ "$missing" ]; then
|
if ! [ "$missing" ]; then
|
||||||
echo -e " ${GRN}Dependencies met. Proceeding...${CRS}\n"
|
echo -e " ${LCY}- ${GRN}Dependencies met. Proceeding...${CRS}\n"
|
||||||
|
|
||||||
else ### INSTALLING PKGS !
|
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
|
while true; do
|
||||||
echo -e "\n ${YEL}Do you wish to install via APT?"
|
echo -e "\n ${YEL}Do you wish to install via APT?"
|
||||||
|
|
@ -52,8 +55,8 @@ else
|
||||||
echo -e "${CRS}"
|
echo -e "${CRS}"
|
||||||
|
|
||||||
if [[ "$install_dep" = "" || "$install_dep" = "y" || "$install_dep" = "Y" ]]; then
|
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
|
sudo apt update > /dev/null 2>&1 && sudo apt install -y $missing --simulate > /dev/null 2>&1
|
||||||
echo -e " ${GRN}Dependencies installed. Proceeding...${CRS}\n"
|
echo -e " ${LCY}- ${GRN}Dependencies installed. Proceeding...${CRS}\n"
|
||||||
sudo rm /tmp/LoMeS/installed_dev /tmp/LoMeS/missing_dev 2>/dev/null
|
sudo rm /tmp/LoMeS/installed_dev /tmp/LoMeS/missing_dev 2>/dev/null
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
@ -122,12 +125,12 @@ while true; do
|
||||||
fi
|
fi
|
||||||
done
|
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?"
|
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}"
|
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"
|
echo -e " ${YEL}Enter path to certificates folder"
|
||||||
read -p " default = /etc/nginx/ssl --> " cert_path
|
read -p " default = /etc/nginx/ssl --> " cert_path
|
||||||
echo -e "${CRS}"
|
echo -e "${CRS}"
|
||||||
|
|
@ -165,8 +168,28 @@ while true; do
|
||||||
sudo sed -i "s|KEYPATH|$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
|
break
|
||||||
|
|
||||||
elif [[ "$installSSL" == "n" || "$installSSL" = "N" ]]; then
|
elif [[ "$nginxSSL" == "n" || "$nginxSSL" = "N" ]]; then
|
||||||
echo -e "\n ${YEL}Nginx configuration skipped!${CRS}"
|
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
|
break
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -180,7 +203,7 @@ done
|
||||||
sudo rm -rf /var/www/html
|
sudo rm -rf /var/www/html
|
||||||
|
|
||||||
if ! [ "$(sudo nginx -t > /dev/null 2>&1)" ]; then ### NGINX CONF CHECK
|
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
|
else
|
||||||
echo -e "\n ${LRD}Nginx configuration is malformed!${CRS}"
|
echo -e "\n ${LRD}Nginx configuration is malformed!${CRS}"
|
||||||
|
|
@ -188,7 +211,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ "$(sudo nginx -s reload > /dev/null 2>&1)" ]; then ### RELOAD NGINX
|
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
|
else
|
||||||
echo -e "\n ${LRD}Nginx couldn't reload!${CRS}"
|
echo -e "\n ${LRD}Nginx couldn't reload!${CRS}"
|
||||||
|
|
@ -196,7 +219,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ -f "/tmp/LoMeS/install_log" ]; then ### LOG CHECK
|
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
|
else
|
||||||
echo -e "\n ${LRD}Error occured during setup! Please check ${LCY}/tmp/LoMeS/install_log ${LRD}for details...${CRS}"
|
echo -e "\n ${LRD}Error occured during setup! Please check ${LCY}/tmp/LoMeS/install_log ${LRD}for details...${CRS}"
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-UltraLight.woff2') format('woff2'),
|
src: url('font/Gravity-UltraLight.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-UltraLight.woff') format('woff');
|
url('font/Gravity-UltraLight.woff') format('woff');
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-Light.woff2') format('woff2'),
|
src: url('font/Gravity-Light.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-Light.woff') format('woff');
|
url('font/Gravity-Light.woff') format('woff');
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-Bold.woff2') format('woff2'),
|
src: url('font/Gravity-Bold.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-Bold.woff') format('woff');
|
url('font/Gravity-Bold.woff') format('woff');
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-LightItalic.woff2') format('woff2'),
|
src: url('font/Gravity-LightItalic.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-LightItalic.woff') format('woff');
|
url('font/Gravity-LightItalic.woff') format('woff');
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-Italic.woff2') format('woff2'),
|
src: url('font/Gravity-Italic.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-Italic.woff') format('woff');
|
url('font/Gravity-Italic.woff') format('woff');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -51,8 +51,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity Book';
|
font-family: 'Gravity Book';
|
||||||
src: url('data/font/Gravity-Book.woff2') format('woff2'),
|
src: url('font/Gravity-Book.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-Book.woff') format('woff');
|
url('font/Gravity-Book.woff') format('woff');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -60,8 +60,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-BoldItalic.woff2') format('woff2'),
|
src: url('font/Gravity-BoldItalic.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-BoldItalic.woff') format('woff');
|
url('font/Gravity-BoldItalic.woff') format('woff');
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -69,8 +69,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity Book';
|
font-family: 'Gravity Book';
|
||||||
src: url('data/font/Gravity-BookItalic.woff2') format('woff2'),
|
src: url('font/Gravity-BookItalic.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-BookItalic.woff') format('woff');
|
url('font/Gravity-BookItalic.woff') format('woff');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -78,8 +78,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-Regular.woff2') format('woff2'),
|
src: url('font/Gravity-Regular.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-Regular.woff') format('woff');
|
url('font/Gravity-Regular.woff') format('woff');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -87,8 +87,8 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Gravity';
|
font-family: 'Gravity';
|
||||||
src: url('data/font/Gravity-UltraLightItalic.woff2') format('woff2'),
|
src: url('font/Gravity-UltraLightItalic.woff2') format('woff2'),
|
||||||
url('data/font/Gravity-UltraLightItalic.woff') format('woff');
|
url('font/Gravity-UltraLightItalic.woff') format('woff');
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>Hostname</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>IP Address</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Encryption</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
|
@ -4,13 +4,13 @@
|
||||||
<meta name="viewport" content="width=device-width" initial-scale="1.0">
|
<meta name="viewport" content="width=device-width" initial-scale="1.0">
|
||||||
|
|
||||||
<title>LoMeS | Meshtastic</title>
|
<title>LoMeS | Meshtastic</title>
|
||||||
<link rel="icon" href="{{ url_for('static', filename='data/images/lomes.svg') }}">
|
<link rel="icon" href="{{ url_for('static', filename='images/lomes.svg') }}">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<section>
|
<section>
|
||||||
<header>
|
<header>
|
||||||
<img class="icon" src="{{ url_for('static', filename='data/images/lomes.svg') }}">
|
<img class="icon" src="{{ url_for('static', filename='images/lomes.svg') }}">
|
||||||
<h1>Welcome to LoMeS</h1>
|
<h1>Welcome to LoMeS</h1>
|
||||||
</header>
|
</header>
|
||||||
<div class="textBox">
|
<div class="textBox">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue