feat: add ESPConnect LXC
This commit is contained in:
54
ct/espconnect.sh
Normal file
54
ct/espconnect.sh
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: John Lombardo
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/thelastoutpostworkshop/ESPConnect
|
||||
|
||||
APP="ESPConnect"
|
||||
var_tags="${var_tags:-iot;esp32;flash}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/espconnect ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect"; then
|
||||
msg_info "Stopping Nginx"
|
||||
systemctl stop nginx
|
||||
msg_ok "Stopped Nginx"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip"
|
||||
|
||||
msg_info "Starting Nginx"
|
||||
systemctl start nginx
|
||||
msg_ok "Started Nginx"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}${CL}"
|
||||
5
ct/headers/espconnect
Normal file
5
ct/headers/espconnect
Normal file
@@ -0,0 +1,5 @@
|
||||
__________ ____ ______ __
|
||||
/ ____/ __ \/ __ \/ ____/___ ____ ____ ___ _____/ /_
|
||||
/ __/ / /_/ / /_/ / / / __ \/ __ \/ __ \/ _ \/ ___/ __/
|
||||
/ /___/ ____/ ____/ /___/ /_/ / / / / / / / __/ /__/ /_
|
||||
/_____/_/ /_/ \____/\____/_/ /_/_/ /_/\___/\___/\__/
|
||||
63
install/espconnect-install.sh
Normal file
63
install/espconnect-install.sh
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: John Lombardo
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/thelastoutpostworkshop/ESPConnect
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
nginx \
|
||||
openssl
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
mkdir -p /etc/ssl/private
|
||||
$STD openssl req -x509 -nodes -newkey rsa:2048 -days 3650 \
|
||||
-keyout /etc/ssl/private/espconnect-selfsigned.key \
|
||||
-out /etc/ssl/certs/espconnect-selfsigned.crt \
|
||||
-subj "/CN=ESPConnect"
|
||||
|
||||
cat <<'EOF' >/etc/nginx/sites-available/espconnect
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl default_server;
|
||||
listen [::]:443 ssl default_server;
|
||||
|
||||
ssl_certificate /etc/ssl/certs/espconnect-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/espconnect-selfsigned.key;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
root /opt/espconnect;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -sf /etc/nginx/sites-available/espconnect /etc/nginx/sites-enabled/espconnect
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD nginx -t
|
||||
systemctl enable -q --now nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
44
json/espconnect.json
Normal file
44
json/espconnect.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "ESPConnect",
|
||||
"slug": "espconnect",
|
||||
"categories": [
|
||||
16,
|
||||
20
|
||||
],
|
||||
"date_created": "2026-04-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 443,
|
||||
"documentation": "https://github.com/thelastoutpostworkshop/ESPConnect",
|
||||
"website": "https://github.com/thelastoutpostworkshop/ESPConnect",
|
||||
"logo": "https://avatars.githubusercontent.com/u/127616157?s=200&v=4",
|
||||
"description": "ESPConnect is a zero-installation web application that lets you explore, back up, and manage ESP32 devices from a browser.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/espconnect.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 4,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "This installs and serves the static ESPConnect web build from the latest GitHub release.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "ESPConnect uses the browser Web Serial API, so the container serves HTTPS with a self-signed certificate; accept the certificate warning before using the app.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user