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
|
||||
|
||||
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
|
||||
|
|
@ -28,23 +28,26 @@ 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)"
|
||||
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 +55,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 +125,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 +168,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 +203,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 +211,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 +219,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}"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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">
|
||||
|
||||
<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') }}">
|
||||
<link rel="icon" href="{{ url_for('static', filename='images/lomes.svg') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<section>
|
||||
<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>
|
||||
</header>
|
||||
<div class="textBox">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue