mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-02 03:57:37 +00:00
Compare commits
27 Commits
2025-05-15
...
2025-05-18
Author | SHA1 | Date | |
---|---|---|---|
5ccff37e3b | |||
c5ca62ec38 | |||
bc5fc031e7 | |||
4ead65f948 | |||
b602416a7e | |||
cb431da23b | |||
19ddb4b2b1 | |||
1378d55fae | |||
8f647b9abe | |||
8a481e1423 | |||
42ee79ac30 | |||
5a6dc35fe0 | |||
73c08a8c5e | |||
67feae778e | |||
7dd49d634e | |||
06191ca260 | |||
0118974ba7 | |||
22e5a54941 | |||
ce7442bab7 | |||
54c522e39b | |||
dfa08625e3 | |||
f6d411b992 | |||
9359f6d883 | |||
b021a2c139 | |||
4de228d41b | |||
7d2e8eaaad | |||
ce69a571bc |
14
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md
vendored
14
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md
vendored
@ -108,13 +108,13 @@ Example:
|
||||
|
||||
```bash
|
||||
APP="SnipeIT"
|
||||
var_tags="asset-management;foss"
|
||||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
var_tags="${var_tags:-asset-management;foss}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
```
|
||||
|
||||
## 2.2 **📋 App output & base settings**
|
||||
|
104
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh
vendored
104
.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh
vendored
@ -6,22 +6,22 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Source: [SOURCE_URL]
|
||||
|
||||
# App Default Values
|
||||
APP="[APP_NAME]"
|
||||
# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole"
|
||||
var_tags="[TAGS]"
|
||||
APP="[APP_NAME]"
|
||||
# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp)
|
||||
var_cpu="[CPU]"
|
||||
var_tags="${var_tags:-[TAGS]}"
|
||||
# Number of cores (1-X) (e.g. 4) - default are 2
|
||||
var_ram="[RAM]"
|
||||
var_cpu="${var_cpu:-[CPU]}"
|
||||
# Amount of used RAM in MB (e.g. 2048 or 4096)
|
||||
var_disk="[DISK]"
|
||||
var_ram="${var_ram:-[RAM]}"
|
||||
# Amount of used disk space in GB (e.g. 4 or 10)
|
||||
var_os="[OS]"
|
||||
var_disk="${var_disk:-[DISK]}"
|
||||
# Default OS (e.g. debian, ubuntu, alpine)
|
||||
var_version="[VERSION]"
|
||||
var_os="${var_os:-[OS]}"
|
||||
# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine)
|
||||
var_unprivileged="[UNPRIVILEGED]"
|
||||
var_version="${var_version:-[VERSION]}"
|
||||
# 1 = unprivileged container, 0 = privileged container
|
||||
var_unprivileged="${var_unprivileged:-[UNPRIVILEGED]}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
@ -29,51 +29,51 @@ color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
# Check if installation is present | -f for file, -d for folder
|
||||
if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Crawling the new version and checking whether an update is required
|
||||
RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
# Stopping Services
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop [SERVICE_NAME]
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
# Creating Backup
|
||||
msg_info "Creating Backup"
|
||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS]
|
||||
msg_ok "Backup Created"
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
[UPDATE_COMMANDS]
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
# Starting Services
|
||||
msg_info "Starting $APP"
|
||||
systemctl start [SERVICE_NAME]
|
||||
msg_ok "Started $APP"
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf [TEMP_FILES]
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
# Last Action
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
# Check if installation is present | -f for file, -d for folder
|
||||
if [[ ! -f [INSTALLATION_CHECK_PATH] ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Crawling the new version and checking whether an update is required
|
||||
RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND])
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
# Stopping Services
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop [SERVICE_NAME]
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
# Creating Backup
|
||||
msg_info "Creating Backup"
|
||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" [IMPORTANT_PATHS]
|
||||
msg_ok "Backup Created"
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
[UPDATE_COMMANDS]
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
# Starting Services
|
||||
msg_info "Starting $APP"
|
||||
systemctl start [SERVICE_NAME]
|
||||
msg_ok "Started $APP"
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf [TEMP_FILES]
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
# Last Action
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
@ -83,4 +83,4 @@ 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}http://${IP}:[PORT]${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:[PORT]${CL}"
|
||||
|
@ -152,7 +152,7 @@ Example for a git release:
|
||||
|
||||
```bash
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
|
||||
curl -fsSL "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip"
|
||||
```
|
||||
|
||||
### 5.2 **Save the version for update checks**
|
||||
@ -163,7 +163,7 @@ wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
|
||||
Example:
|
||||
|
||||
```bash
|
||||
echo "${RELEASE}" >"/opt/AppName_version.txt"
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Source: [SOURCE_URL]
|
||||
|
||||
# Import Functions und Setup
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
@ -31,30 +31,28 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "${APPLICATION} Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >> ~/$APP_NAME.creds
|
||||
echo "${APPLICATION} Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/"$APP_NAME".creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
# Temp
|
||||
|
||||
# Setup App
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/[REPO]/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL -o "${RELEASE}.zip" "https://github.com/[REPO]/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q "${RELEASE}.zip"
|
||||
mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}"
|
||||
#
|
||||
#
|
||||
#
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
#
|
||||
#
|
||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
# Creating Service (if needed)
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
||||
cat <<EOF >/etc/systemd/system/"${APPLICATION}".service
|
||||
[Unit]
|
||||
Description=${APPLICATION} Service
|
||||
After=network.target
|
||||
@ -66,7 +64,7 @@ Restart=always
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now ${APPLICATION}
|
||||
systemctl enable -q --now "${APPLICATION}"
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
@ -74,7 +72,7 @@ customize
|
||||
|
||||
# Cleanup
|
||||
msg_info "Cleaning up"
|
||||
rm -f ${RELEASE}.zip
|
||||
rm -f "${RELEASE}".zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Cleaned"
|
||||
|
36
CHANGELOG.md
36
CHANGELOG.md
@ -14,8 +14,44 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||
|
||||
|
||||
## 2025-05-19
|
||||
|
||||
## 2025-05-18
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- tools.func - Add function to create self-signed certificates [@tremor021](https://github.com/tremor021) ([#4562](https://github.com/community-scripts/ProxmoxVE/pull/4562))
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Homarr: fix the build [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4569](https://github.com/community-scripts/ProxmoxVE/pull/4569))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Fix Dashy Config Path on Frontend [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4570](https://github.com/community-scripts/ProxmoxVE/pull/4570))
|
||||
|
||||
## 2025-05-17
|
||||
|
||||
## 2025-05-16
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- #### 💾 Core
|
||||
|
||||
- [core] Refactor Config File function [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4528](https://github.com/community-scripts/ProxmoxVE/pull/4528))
|
||||
- [core] Fix Bridge detection in Advanced Mode [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4522](https://github.com/community-scripts/ProxmoxVE/pull/4522))
|
||||
- [core] Enable SSH_KEY and SSH without password [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4523](https://github.com/community-scripts/ProxmoxVE/pull/4523))
|
||||
|
||||
- #### 📂 Github
|
||||
|
||||
- Updates to contributor docs/guide [@tremor021](https://github.com/tremor021) ([#4518](https://github.com/community-scripts/ProxmoxVE/pull/4518))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Remove bolt.diy script [@tremor021](https://github.com/tremor021) ([#4541](https://github.com/community-scripts/ProxmoxVE/pull/4541))
|
||||
|
||||
## 2025-05-15
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
@ -1,71 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/stackblitz-labs/bolt.diy/
|
||||
|
||||
APP="boltdiy"
|
||||
TAGS="code;ai"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
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/bolt.diy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/boltdiy_version.txt)" ]] || [[ ! -f /opt/boltdiy_version.txt ]]; then
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop boltdiy
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
temp_dir=$(mktemp -d)
|
||||
temp_file=$(mktemp)
|
||||
cd $temp_dir
|
||||
curl -fsSL "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar xzf $temp_file
|
||||
cp -rf bolt.diy-${RELEASE}/* /opt/bolt.diy
|
||||
cd /opt/bolt.diy
|
||||
$STD pnpm install
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start boltdiy
|
||||
msg_ok "Started $APP"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf $temp_file
|
||||
rm -rf $temp_dir
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
echo "${RELEASE}" >/opt/boltdiy_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
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}http://${IP}:5173${CL}"
|
@ -1,6 +0,0 @@
|
||||
__ ____ ___
|
||||
/ /_ ____ / / /_____/ (_)_ __
|
||||
/ __ \/ __ \/ / __/ __ / / / / /
|
||||
/ /_/ / /_/ / / /_/ /_/ / / /_/ /
|
||||
/_.___/\____/_/\__/\__,_/_/\__, /
|
||||
/____/
|
@ -125,7 +125,7 @@ EOF
|
||||
fetch_and_deploy_gh_release "homarr-labs/homarr"
|
||||
mv /opt/homarr-data-backup/.env /opt/homarr/.env
|
||||
cd /opt/homarr
|
||||
$STD pnpm install
|
||||
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist
|
||||
$STD pnpm build
|
||||
cp /opt/homarr/apps/nextjs/next.config.ts .
|
||||
cp /opt/homarr/apps/nextjs/package.json .
|
||||
|
@ -1,35 +0,0 @@
|
||||
{
|
||||
"name": "bolt.diy",
|
||||
"slug": "boltdiy",
|
||||
"categories": [
|
||||
20
|
||||
],
|
||||
"date_created": "2025-02-23",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 5173,
|
||||
"documentation": "https://stackblitz-labs.github.io/bolt.diy/",
|
||||
"website": "https://github.com/stackblitz-labs/bolt.diy",
|
||||
"logo": "https://github.com/stackblitz-labs/bolt.diy/raw/refs/heads/main/icons/logo-text.svg",
|
||||
"config_path": "/opt/bolt.diy/.env.local",
|
||||
"description": "The official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK!",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/boltdiy.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 3072,
|
||||
"hdd": 6,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -12,7 +12,7 @@
|
||||
"documentation": null,
|
||||
"website": "https://dashy.to/",
|
||||
"logo": "https://github.com/Lissy93/dashy/raw/master/public/web-icons/dashy-logo.png",
|
||||
"config_path": "/opt/dashy/public/conf.yml",
|
||||
"config_path": "/opt/dashy/user-data/conf.yml",
|
||||
"description": "Dashy is a solution that helps you organize your self-hosted services by centralizing access to them through a single interface.",
|
||||
"install_methods": [
|
||||
{
|
||||
|
@ -1,4 +1,169 @@
|
||||
[
|
||||
{
|
||||
"name": "MediaBrowser/Emby.Releases",
|
||||
"version": "4.8.11.0",
|
||||
"date": "2025-03-10T06:39:11Z"
|
||||
},
|
||||
{
|
||||
"name": "Part-DB/Part-DB-server",
|
||||
"version": "v1.17.1",
|
||||
"date": "2025-05-18T21:06:41Z"
|
||||
},
|
||||
{
|
||||
"name": "sbondCo/Watcharr",
|
||||
"version": "v2.1.0",
|
||||
"date": "2025-05-18T18:20:43Z"
|
||||
},
|
||||
{
|
||||
"name": "rogerfar/rdt-client",
|
||||
"version": "v2.0.112",
|
||||
"date": "2025-05-18T17:44:52Z"
|
||||
},
|
||||
{
|
||||
"name": "YunoHost/yunohost",
|
||||
"version": "debian/12.1.6.1",
|
||||
"date": "2025-05-18T17:01:42Z"
|
||||
},
|
||||
{
|
||||
"name": "clusterzx/paperless-ai",
|
||||
"version": "v3.0.0",
|
||||
"date": "2025-05-18T15:32:52Z"
|
||||
},
|
||||
{
|
||||
"name": "kimai/kimai",
|
||||
"version": "2.34.0",
|
||||
"date": "2025-05-18T13:22:17Z"
|
||||
},
|
||||
{
|
||||
"name": "runtipi/runtipi",
|
||||
"version": "v4.1.1",
|
||||
"date": "2025-05-16T17:37:30Z"
|
||||
},
|
||||
{
|
||||
"name": "hansmi/prometheus-paperless-exporter",
|
||||
"version": "v0.0.8",
|
||||
"date": "2025-05-18T11:37:31Z"
|
||||
},
|
||||
{
|
||||
"name": "Prowlarr/Prowlarr",
|
||||
"version": "v1.35.1.5034",
|
||||
"date": "2025-04-30T11:02:36Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.1917",
|
||||
"date": "2025-05-18T05:59:41Z"
|
||||
},
|
||||
{
|
||||
"name": "theonedev/onedev",
|
||||
"version": "v11.9.8",
|
||||
"date": "2025-05-18T01:27:37Z"
|
||||
},
|
||||
{
|
||||
"name": "inventree/InvenTree",
|
||||
"version": "0.17.12",
|
||||
"date": "2025-05-17T19:16:00Z"
|
||||
},
|
||||
{
|
||||
"name": "crafty-controller/crafty-4",
|
||||
"version": "v4.4.8",
|
||||
"date": "2025-05-17T18:47:36Z"
|
||||
},
|
||||
{
|
||||
"name": "Radarr/Radarr",
|
||||
"version": "v5.23.3.9987",
|
||||
"date": "2025-05-17T12:55:29Z"
|
||||
},
|
||||
{
|
||||
"name": "bastienwirtz/homer",
|
||||
"version": "v25.05.2",
|
||||
"date": "2025-05-17T12:53:29Z"
|
||||
},
|
||||
{
|
||||
"name": "BookStackApp/BookStack",
|
||||
"version": "v25.02.5",
|
||||
"date": "2025-05-17T11:24:01Z"
|
||||
},
|
||||
{
|
||||
"name": "Paymenter/Paymenter",
|
||||
"version": "v1.1.1",
|
||||
"date": "2025-05-17T10:10:36Z"
|
||||
},
|
||||
{
|
||||
"name": "evcc-io/evcc",
|
||||
"version": "0.203.6",
|
||||
"date": "2025-05-17T07:30:49Z"
|
||||
},
|
||||
{
|
||||
"name": "prometheus/prometheus",
|
||||
"version": "v0.304.0",
|
||||
"date": "2025-05-17T07:29:09Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.5",
|
||||
"date": "2025-05-17T02:52:33Z"
|
||||
},
|
||||
{
|
||||
"name": "syncthing/syncthing",
|
||||
"version": "v1.29.6",
|
||||
"date": "2025-05-06T07:57:02Z"
|
||||
},
|
||||
{
|
||||
"name": "advplyr/audiobookshelf",
|
||||
"version": "v2.23.0",
|
||||
"date": "2025-05-16T22:13:53Z"
|
||||
},
|
||||
{
|
||||
"name": "home-assistant/core",
|
||||
"version": "2025.5.2",
|
||||
"date": "2025-05-16T21:09:45Z"
|
||||
},
|
||||
{
|
||||
"name": "homarr-labs/homarr",
|
||||
"version": "v1.20.0",
|
||||
"date": "2025-05-16T19:18:10Z"
|
||||
},
|
||||
{
|
||||
"name": "NodeBB/NodeBB",
|
||||
"version": "v4.4.1",
|
||||
"date": "2025-05-16T16:37:51Z"
|
||||
},
|
||||
{
|
||||
"name": "influxdata/influxdb",
|
||||
"version": "v3.0.3",
|
||||
"date": "2025-05-16T15:41:16Z"
|
||||
},
|
||||
{
|
||||
"name": "wavelog/wavelog",
|
||||
"version": "2.0.4",
|
||||
"date": "2025-05-16T15:09:53Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.0.12",
|
||||
"date": "2025-05-15T14:06:52Z"
|
||||
},
|
||||
{
|
||||
"name": "emqx/emqx",
|
||||
"version": "e5.10.0-alpha.1",
|
||||
"date": "2025-05-16T13:30:53Z"
|
||||
},
|
||||
{
|
||||
"name": "wazuh/wazuh",
|
||||
"version": "coverity-w20-4.13.0",
|
||||
"date": "2025-05-14T12:06:20Z"
|
||||
},
|
||||
{
|
||||
"name": "gotson/komga",
|
||||
"version": "1.21.3",
|
||||
"date": "2025-05-16T04:31:05Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "server/public/v0.1.13",
|
||||
"date": "2025-05-16T03:44:25Z"
|
||||
},
|
||||
{
|
||||
"name": "ipfs/kubo",
|
||||
"version": "v0.34.1",
|
||||
@ -9,16 +174,6 @@
|
||||
"version": "v4.100.2",
|
||||
"date": "2025-05-15T23:02:46Z"
|
||||
},
|
||||
{
|
||||
"name": "influxdata/influxdb",
|
||||
"version": "v3.0.3",
|
||||
"date": "2025-05-15T19:56:23Z"
|
||||
},
|
||||
{
|
||||
"name": "clusterzx/paperless-ai",
|
||||
"version": "v2.7.8",
|
||||
"date": "2025-05-15T18:04:54Z"
|
||||
},
|
||||
{
|
||||
"name": "goauthentik/authentik",
|
||||
"version": "version/2025.4.1",
|
||||
@ -59,31 +214,11 @@
|
||||
"version": "v10.5.1",
|
||||
"date": "2025-05-15T09:59:28Z"
|
||||
},
|
||||
{
|
||||
"name": "theonedev/onedev",
|
||||
"version": "v11.9.7",
|
||||
"date": "2025-05-15T07:03:28Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "v10.6.5",
|
||||
"date": "2025-05-15T07:06:52Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.4",
|
||||
"date": "2025-05-11T11:41:32Z"
|
||||
},
|
||||
{
|
||||
"name": "morpheus65535/bazarr",
|
||||
"version": "v1.5.2",
|
||||
"date": "2025-05-11T16:40:55Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.1900",
|
||||
"date": "2025-05-15T06:01:04Z"
|
||||
},
|
||||
{
|
||||
"name": "FlowiseAI/Flowise",
|
||||
"version": "flowise@3.0.0",
|
||||
@ -91,13 +226,8 @@
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.7.0-rc1",
|
||||
"date": "2025-05-14T03:58:02Z"
|
||||
},
|
||||
{
|
||||
"name": "advplyr/audiobookshelf",
|
||||
"version": "v2.22.0",
|
||||
"date": "2025-05-14T22:30:59Z"
|
||||
"version": "v0.7.0",
|
||||
"date": "2025-05-14T23:42:30Z"
|
||||
},
|
||||
{
|
||||
"name": "glanceapp/glance",
|
||||
@ -114,26 +244,11 @@
|
||||
"version": "3.0.2",
|
||||
"date": "2025-05-14T20:38:06Z"
|
||||
},
|
||||
{
|
||||
"name": "NodeBB/NodeBB",
|
||||
"version": "v4.4.0",
|
||||
"date": "2025-05-14T20:36:37Z"
|
||||
},
|
||||
{
|
||||
"name": "esphome/esphome",
|
||||
"version": "2025.4.2",
|
||||
"date": "2025-05-11T22:18:43Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.2.4",
|
||||
"date": "2025-05-08T09:10:10Z"
|
||||
},
|
||||
{
|
||||
"name": "MediaBrowser/Emby.Releases",
|
||||
"version": "4.8.11.0",
|
||||
"date": "2025-03-10T06:39:11Z"
|
||||
},
|
||||
{
|
||||
"name": "Athou/commafeed",
|
||||
"version": "5.9.0",
|
||||
@ -169,21 +284,11 @@
|
||||
"version": "v25.0",
|
||||
"date": "2025-05-12T09:12:04Z"
|
||||
},
|
||||
{
|
||||
"name": "wazuh/wazuh",
|
||||
"version": "coverity-w20-4.13.0",
|
||||
"date": "2025-05-14T12:06:20Z"
|
||||
},
|
||||
{
|
||||
"name": "blakeblackshear/frigate",
|
||||
"version": "v0.14.1",
|
||||
"date": "2024-08-29T22:32:51Z"
|
||||
},
|
||||
{
|
||||
"name": "runtipi/runtipi",
|
||||
"version": "nightly",
|
||||
"date": "2025-05-14T06:48:39Z"
|
||||
},
|
||||
{
|
||||
"name": "TandoorRecipes/recipes",
|
||||
"version": "2.0.0-alpha-4",
|
||||
@ -259,11 +364,6 @@
|
||||
"version": "n8n@1.91.3",
|
||||
"date": "2025-05-08T12:25:10Z"
|
||||
},
|
||||
{
|
||||
"name": "Paymenter/Paymenter",
|
||||
"version": "v1.1.0",
|
||||
"date": "2025-05-12T14:40:27Z"
|
||||
},
|
||||
{
|
||||
"name": "apache/tika",
|
||||
"version": "3.2.0-rc1",
|
||||
@ -294,21 +394,11 @@
|
||||
"version": "v3.5.3",
|
||||
"date": "2025-05-11T15:17:13Z"
|
||||
},
|
||||
{
|
||||
"name": "Prowlarr/Prowlarr",
|
||||
"version": "v1.35.1.5034",
|
||||
"date": "2025-04-30T11:02:36Z"
|
||||
},
|
||||
{
|
||||
"name": "authelia/authelia",
|
||||
"version": "v4.39.3",
|
||||
"date": "2025-05-11T11:12:15Z"
|
||||
},
|
||||
{
|
||||
"name": "Radarr/Radarr",
|
||||
"version": "v5.22.4.9896",
|
||||
"date": "2025-04-23T18:51:12Z"
|
||||
},
|
||||
{
|
||||
"name": "owncast/owncast",
|
||||
"version": "v0.2.3",
|
||||
@ -334,16 +424,6 @@
|
||||
"version": "v1.0.0-beta21",
|
||||
"date": "2025-05-09T23:14:23Z"
|
||||
},
|
||||
{
|
||||
"name": "homarr-labs/homarr",
|
||||
"version": "v1.19.1",
|
||||
"date": "2025-05-09T19:15:10Z"
|
||||
},
|
||||
{
|
||||
"name": "home-assistant/core",
|
||||
"version": "2025.5.1",
|
||||
"date": "2025-05-09T15:05:54Z"
|
||||
},
|
||||
{
|
||||
"name": "crowdsecurity/crowdsec",
|
||||
"version": "v1.6.8",
|
||||
@ -354,11 +434,6 @@
|
||||
"version": "v0.53.0",
|
||||
"date": "2025-05-08T19:56:55Z"
|
||||
},
|
||||
{
|
||||
"name": "BookStackApp/BookStack",
|
||||
"version": "v25.02.4",
|
||||
"date": "2025-05-08T15:03:17Z"
|
||||
},
|
||||
{
|
||||
"name": "apache/tomcat",
|
||||
"version": "10.1.41",
|
||||
@ -449,11 +524,6 @@
|
||||
"version": "v0.107.61",
|
||||
"date": "2025-04-22T12:42:26Z"
|
||||
},
|
||||
{
|
||||
"name": "syncthing/syncthing",
|
||||
"version": "v1.29.6",
|
||||
"date": "2025-05-06T07:57:02Z"
|
||||
},
|
||||
{
|
||||
"name": "linkwarden/linkwarden",
|
||||
"version": "v2.10.2",
|
||||
@ -499,21 +569,11 @@
|
||||
"version": "v3.4.0",
|
||||
"date": "2025-05-05T13:59:23Z"
|
||||
},
|
||||
{
|
||||
"name": "evcc-io/evcc",
|
||||
"version": "0.203.5",
|
||||
"date": "2025-05-05T06:41:02Z"
|
||||
},
|
||||
{
|
||||
"name": "moghtech/komodo",
|
||||
"version": "v1.17.5",
|
||||
"date": "2025-05-04T22:17:06Z"
|
||||
},
|
||||
{
|
||||
"name": "YunoHost/yunohost",
|
||||
"version": "debian/12.0.16",
|
||||
"date": "2025-05-04T22:06:15Z"
|
||||
},
|
||||
{
|
||||
"name": "Lidarr/Lidarr",
|
||||
"version": "v2.11.2.4629",
|
||||
@ -524,11 +584,6 @@
|
||||
"version": "v2.0.0.4645",
|
||||
"date": "2017-03-07T18:56:06Z"
|
||||
},
|
||||
{
|
||||
"name": "bastienwirtz/homer",
|
||||
"version": "v25.05.1",
|
||||
"date": "2025-05-04T12:17:00Z"
|
||||
},
|
||||
{
|
||||
"name": "FreshRSS/FreshRSS",
|
||||
"version": "1.26.2",
|
||||
@ -539,26 +594,11 @@
|
||||
"version": "v25.5.0",
|
||||
"date": "2025-05-03T19:03:17Z"
|
||||
},
|
||||
{
|
||||
"name": "rogerfar/rdt-client",
|
||||
"version": "v2.0.111",
|
||||
"date": "2025-05-03T16:25:30Z"
|
||||
},
|
||||
{
|
||||
"name": "kimai/kimai",
|
||||
"version": "2.33.0",
|
||||
"date": "2025-05-03T10:33:49Z"
|
||||
},
|
||||
{
|
||||
"name": "documenso/documenso",
|
||||
"version": "v1.10.3",
|
||||
"date": "2025-05-02T23:23:25Z"
|
||||
},
|
||||
{
|
||||
"name": "prometheus/prometheus",
|
||||
"version": "v0.304.0-rc.0",
|
||||
"date": "2025-05-02T17:29:18Z"
|
||||
},
|
||||
{
|
||||
"name": "forgejo/forgejo",
|
||||
"version": "v11.0.1",
|
||||
@ -574,11 +614,6 @@
|
||||
"version": "v3.5.4",
|
||||
"date": "2025-05-02T13:42:06Z"
|
||||
},
|
||||
{
|
||||
"name": "emqx/emqx",
|
||||
"version": "e5.9.0",
|
||||
"date": "2025-05-02T11:07:10Z"
|
||||
},
|
||||
{
|
||||
"name": "Koenkk/zigbee2mqtt",
|
||||
"version": "2.3.0",
|
||||
@ -679,11 +714,6 @@
|
||||
"version": "release-1.23.0",
|
||||
"date": "2025-04-24T08:07:21Z"
|
||||
},
|
||||
{
|
||||
"name": "inventree/InvenTree",
|
||||
"version": "0.17.11",
|
||||
"date": "2025-04-24T05:25:55Z"
|
||||
},
|
||||
{
|
||||
"name": "minio/minio",
|
||||
"version": "RELEASE.2025-04-22T22-12-26Z",
|
||||
@ -794,11 +824,6 @@
|
||||
"version": "21.0.1",
|
||||
"date": "2025-04-06T19:22:59Z"
|
||||
},
|
||||
{
|
||||
"name": "wavelog/wavelog",
|
||||
"version": "2.0.3",
|
||||
"date": "2025-04-06T17:35:41Z"
|
||||
},
|
||||
{
|
||||
"name": "jellyfin/jellyfin",
|
||||
"version": "v10.10.7",
|
||||
@ -849,11 +874,6 @@
|
||||
"version": "v6.0.6",
|
||||
"date": "2025-03-30T16:59:06Z"
|
||||
},
|
||||
{
|
||||
"name": "Part-DB/Part-DB-server",
|
||||
"version": "v1.17.0",
|
||||
"date": "2025-03-30T14:21:53Z"
|
||||
},
|
||||
{
|
||||
"name": "aceberg/WatchYourLAN",
|
||||
"version": "2.1.2-alpine",
|
||||
@ -884,11 +904,6 @@
|
||||
"version": "v1.34.0",
|
||||
"date": "2025-03-26T08:48:34Z"
|
||||
},
|
||||
{
|
||||
"name": "hansmi/prometheus-paperless-exporter",
|
||||
"version": "v0.0.7",
|
||||
"date": "2025-03-25T15:11:18Z"
|
||||
},
|
||||
{
|
||||
"name": "nextcloud/nextcloudpi",
|
||||
"version": "v1.55.4",
|
||||
@ -929,11 +944,6 @@
|
||||
"version": "4.0.1-beta.1",
|
||||
"date": "2024-12-13T00:16:24Z"
|
||||
},
|
||||
{
|
||||
"name": "gotson/komga",
|
||||
"version": "1.21.2",
|
||||
"date": "2025-03-12T04:19:30Z"
|
||||
},
|
||||
{
|
||||
"name": "excalidraw/excalidraw",
|
||||
"version": "v0.18.0",
|
||||
@ -1019,11 +1029,6 @@
|
||||
"version": "v28.0",
|
||||
"date": "2025-02-18T15:49:57Z"
|
||||
},
|
||||
{
|
||||
"name": "sbondCo/Watcharr",
|
||||
"version": "v2.0.2",
|
||||
"date": "2025-02-16T21:34:29Z"
|
||||
},
|
||||
{
|
||||
"name": "recyclarr/recyclarr",
|
||||
"version": "v7.4.1",
|
||||
@ -1079,11 +1084,6 @@
|
||||
"version": "1.1.14",
|
||||
"date": "2025-01-25T12:48:28Z"
|
||||
},
|
||||
{
|
||||
"name": "crafty-controller/crafty-4",
|
||||
"version": "v4.4.7",
|
||||
"date": "2025-01-20T15:45:06Z"
|
||||
},
|
||||
{
|
||||
"name": "0xERR0R/blocky",
|
||||
"version": "v0.25",
|
||||
|
@ -16,6 +16,7 @@ update_os
|
||||
msg_info "Installing Transmission"
|
||||
$STD apk add --no-cache transmission-cli transmission-daemon
|
||||
$STD rc-service transmission-daemon start
|
||||
sleep 5
|
||||
$STD rc-service transmission-daemon stop
|
||||
sed -i '{s/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g; s/"rpc-host-whitelist-enabled": true,/"rpc-host-whitelist-enabled": false,/g}' /var/lib/transmission/config/settings.json
|
||||
msg_ok "Installed Transmission"
|
||||
|
@ -1,71 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/stackblitz-labs/bolt.diy/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
gnupg \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Setup Node.js Repository"
|
||||
|
||||
msg_info "Setup Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g pnpm
|
||||
msg_ok "Setup Node.js"
|
||||
|
||||
msg_info "Setup bolt.diy"
|
||||
temp_file=$(mktemp)
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar xzf $temp_file
|
||||
mv bolt.diy-${RELEASE} /opt/bolt.diy
|
||||
cd /opt/bolt.diy
|
||||
$STD pnpm install
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Setup bolt.diy"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/boltdiy.service
|
||||
[Unit]
|
||||
Description=bolt.diy Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/bolt.diy
|
||||
ExecStart=/usr/bin/pnpm run dev --host
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now boltdiy
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f $temp_file
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -47,7 +47,7 @@ TURBO_TELEMETRY_DISABLED=1
|
||||
AUTH_PROVIDERS='credentials'
|
||||
NODE_ENV='production'
|
||||
EOF
|
||||
$STD pnpm install
|
||||
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist
|
||||
$STD pnpm build
|
||||
msg_ok "Installed Homarr"
|
||||
|
||||
|
371
misc/build.func
371
misc/build.func
@ -362,6 +362,76 @@ base_settings() {
|
||||
var_version="12"
|
||||
fi
|
||||
}
|
||||
write_config() {
|
||||
# This function writes the configuration to a file.
|
||||
if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "Write configfile" --yesno "Do you want to write the selections to a config file?" 10 60; then
|
||||
FILEPATH="/opt/community-scripts/${NSAPP}.conf"
|
||||
if [[ ! -f $FILEPATH ]]; then
|
||||
cat <<EOF >"$FILEPATH"
|
||||
# ${NSAPP} Configuration File
|
||||
# Generated on $(date)
|
||||
|
||||
CT_TYPE="${CT_TYPE}"
|
||||
DISK_SIZE="${DISK_SIZE}"
|
||||
CORE_COUNT="${DISK_SIZE}"
|
||||
RAM_SIZE="${RAM_SIZE}"
|
||||
HN="${HN}"
|
||||
BRG="${BRG}"
|
||||
APT_CACHER_IP="${APT_CACHER_IP:-none}"
|
||||
DISABLEIP6="${DISABLEIP6}"
|
||||
PW="${PW:-none}"
|
||||
SSH="${SSH}"
|
||||
SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}"
|
||||
VERBOSE="${VERBOSE}"
|
||||
TAGS="${TAGS:-none}"
|
||||
VLAN="${VLAN:-none}"
|
||||
MTU="${MTU:-1500}"
|
||||
GATE="${GATE:-none}"
|
||||
SD="${SD:-none}"
|
||||
MAC="${MAC:-none}"
|
||||
NS="${NS:-none}"
|
||||
NET="${NET}"
|
||||
|
||||
EOF
|
||||
echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}"
|
||||
else
|
||||
echo -e "${INFO}${BOLD}${RD}Configuration file already exists at ${FILEPATH}${CL}"
|
||||
if whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "Overwrite configfile" --yesno "Do you want to overwrite the existing config file?" 10 60; then
|
||||
rm -f "$FILEPATH"
|
||||
cat <<EOF >"$FILEPATH"
|
||||
# ${NSAPP} Configuration File
|
||||
# Generated on $(date)
|
||||
|
||||
CT_TYPE="${CT_TYPE}"
|
||||
DISK_SIZE="${DISK_SIZE}"
|
||||
CORE_COUNT="${DISK_SIZE}"
|
||||
RAM_SIZE="${RAM_SIZE}"
|
||||
HN="${HN}"
|
||||
BRG="${BRG}"
|
||||
APT_CACHER_IP="${APT_CACHER_IP:-none}"
|
||||
DISABLEIP6="${DISABLEIP6}"
|
||||
PW="${PW:-none}"
|
||||
SSH="${SSH}"
|
||||
SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}"
|
||||
VERBOSE="${VERBOSE}"
|
||||
TAGS="${TAGS:-none}"
|
||||
VLAN="${VLAN:-none}"
|
||||
MTU="${MTU:-1500}"
|
||||
GATE="${GATE:-none}"
|
||||
SD="${SD:-none}"
|
||||
MAC="${MAC:-none}"
|
||||
NS="${NS:-none}"
|
||||
NET="${NET}"
|
||||
|
||||
EOF
|
||||
echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}"
|
||||
else
|
||||
echo -e "${INFO}${BOLD}${RD}Configuration file not overwritten${CL}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# This function displays the default values for various settings.
|
||||
echo_default() {
|
||||
@ -538,7 +608,7 @@ advanced_settings() {
|
||||
iface_indexes_tmpfile=$(mktemp -q -u '.iface-XXXX')
|
||||
|
||||
(grep -Pn '^\s*iface' "${iface_filepath}" | cut -d':' -f1 && wc -l "${iface_filepath}" | cut -d' ' -f1) |
|
||||
awk 'FNR==1 {line=$0; next} {print line":"$0-1; line=$0}' >"${iface_indexes_tmpfile}"
|
||||
awk 'FNR==1 {line=$0; next} {print line":"$0-1; line=$0}' >"${iface_indexes_tmpfile}" || true
|
||||
|
||||
if [ -f "${iface_indexes_tmpfile}" ]; then
|
||||
while read -r pair; do
|
||||
@ -702,8 +772,14 @@ advanced_settings() {
|
||||
exit_script
|
||||
fi
|
||||
|
||||
if [[ "$PW" == -password* ]]; then
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)"
|
||||
|
||||
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||
SSH_AUTHORIZED_KEY=""
|
||||
fi
|
||||
|
||||
if [[ "$PW" == -password* || -n "$SSH_AUTHORIZED_KEY" ]]; then
|
||||
if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||
SSH="yes"
|
||||
else
|
||||
SSH="no"
|
||||
@ -714,15 +790,7 @@ advanced_settings() {
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
fi
|
||||
|
||||
if [[ "${SSH}" == "yes" ]]; then
|
||||
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)"
|
||||
|
||||
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||
echo "Warning: No SSH key provided."
|
||||
fi
|
||||
else
|
||||
SSH_AUTHORIZED_KEY=""
|
||||
fi
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||
VERB="yes"
|
||||
else
|
||||
@ -732,6 +800,7 @@ advanced_settings() {
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
||||
|
||||
else
|
||||
clear
|
||||
header_info
|
||||
@ -808,284 +877,6 @@ EOF
|
||||
|
||||
}
|
||||
|
||||
config_file() {
|
||||
|
||||
CONFIG_FILE="/opt/community-scripts/.settings"
|
||||
|
||||
if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then
|
||||
CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf"
|
||||
fi
|
||||
|
||||
if CONFIG_FILE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 "$CONFIG_FILE" --title "CONFIG FILE" 3>&1 1>&2 2>&3); then
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}"
|
||||
exit
|
||||
else
|
||||
echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}"
|
||||
base_settings
|
||||
source "$CONFIG_FILE"
|
||||
fi
|
||||
fi
|
||||
if [[ -n "$CT_ID" ]]; then
|
||||
if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then
|
||||
MIN_ID=${BASH_REMATCH[1]}
|
||||
MAX_ID=${BASH_REMATCH[2]}
|
||||
if ((MIN_ID >= MAX_ID)); then
|
||||
msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}"
|
||||
exit
|
||||
fi
|
||||
|
||||
LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json 2>/dev/null | grep -oP '"vmid":\s*\K\d+') || true
|
||||
if [[ -n "$LIST_OF_IDS" ]]; then
|
||||
for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do
|
||||
if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then
|
||||
CT_ID=$ID
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
|
||||
elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then
|
||||
LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json 2>/dev/null | grep -oP '"vmid":\s*\K\d+') || true
|
||||
if [[ -n "$LIST_OF_IDS" ]]; then
|
||||
|
||||
if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
else
|
||||
msg_error "Container ID $CT_ID already exists"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
fi
|
||||
else
|
||||
msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$CT_TYPE" -eq 0 ]]; then
|
||||
CT_TYPE_DESC="Privileged"
|
||||
elif [[ "$CT_TYPE" -eq 1 ]]; then
|
||||
CT_TYPE_DESC="Unprivileged"
|
||||
else
|
||||
msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}"
|
||||
exit
|
||||
fi
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||
|
||||
if [[ ! -z "$PW" ]]; then
|
||||
|
||||
if [[ "$PW" == *" "* ]]; then
|
||||
msg_error "Password cannot be empty"
|
||||
exit
|
||||
elif [[ ${#PW} -lt 5 ]]; then
|
||||
msg_error "Password must be at least 5 characters long"
|
||||
exit
|
||||
else
|
||||
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}"
|
||||
fi
|
||||
PW="-password $PW"
|
||||
else
|
||||
PW=""
|
||||
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}Automatic Login${CL}"
|
||||
fi
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
|
||||
if [[ ! -z "$HN" ]]; then
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||
else
|
||||
msg_error "Hostname cannot be empty"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -z "$DISK_SIZE" ]]; then
|
||||
if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||
else
|
||||
msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "DISK_SIZE cannot be empty"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -z "$CORE_COUNT" ]]; then
|
||||
if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||
else
|
||||
msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "CORE_COUNT cannot be empty"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -z "$RAM_SIZE" ]]; then
|
||||
if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||
else
|
||||
msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "RAM_SIZE cannot be empty"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -z "$BRG" ]]; then
|
||||
if grep -q "^iface ${BRG}" /etc/network/interfaces; then
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
else
|
||||
msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "Bridge cannot be empty"
|
||||
exit
|
||||
fi
|
||||
|
||||
local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$'
|
||||
local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$'
|
||||
|
||||
if [[ ! -z $NET ]]; then
|
||||
if [ "$NET" == "dhcp" ]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}"
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
|
||||
elif [[ "$NET" =~ $ip_cidr_regex ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||
if [ ! -z "$GATE" ]; then
|
||||
if [[ "$GATE" =~ $ip_regex ]]; then
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}"
|
||||
GATE=",gw=$GATE"
|
||||
else
|
||||
msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "Gateway IP Address cannot be empty"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -z "$APT_CACHER_IP" ]]; then
|
||||
if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then
|
||||
APT_CACHER="yes"
|
||||
echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}"
|
||||
else
|
||||
msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$DISABLEIP6" == "yes" ]]; then
|
||||
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}"
|
||||
elif [[ "$DISABLEIP6" == "no" ]]; then
|
||||
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}"
|
||||
else
|
||||
msg_error "Disable IPv6 needs to be 'yes' or 'no'"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -z "$MTU" ]]; then
|
||||
if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}"
|
||||
MTU=",mtu=$MTU"
|
||||
else
|
||||
msg_error "MTU must be an integer, was ${MTU}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
MTU=""
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
|
||||
|
||||
fi
|
||||
|
||||
if [[ ! -z "$SD" ]]; then
|
||||
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}"
|
||||
SD="-searchdomain=$SD"
|
||||
else
|
||||
SD=""
|
||||
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}HOST${CL}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "$NS" ]]; then
|
||||
if [[ "$NS" =~ $ip_regex ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}"
|
||||
NS="-nameserver=$NS"
|
||||
else
|
||||
msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
NS=""
|
||||
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}HOST${CL}"
|
||||
fi
|
||||
|
||||
if [[ ! -z "$MAC" ]]; then
|
||||
if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||
MAC=",hwaddr=$MAC"
|
||||
else
|
||||
msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -z "$VLAN" ]]; then
|
||||
if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}"
|
||||
VLAN=",tag=$VLAN"
|
||||
else
|
||||
msg_error "VLAN must be an integer, was ${VLAN}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -z "$TAGS" ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||
fi
|
||||
|
||||
if [[ "$SSH" == "yes" ]]; then
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}"
|
||||
else
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}"
|
||||
fi
|
||||
elif [[ "$SSH" == "no" ]]; then
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
else
|
||||
msg_error "SSH needs to be 'yes' or 'no', was ${SSH}"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ "$VERB" == "yes" ]]; then
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}"
|
||||
elif [[ "$VERB" == "no" ]]; then
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}"
|
||||
else
|
||||
msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERB}"
|
||||
exit
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}"
|
||||
else
|
||||
clear
|
||||
header_info
|
||||
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
|
||||
config_file
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
install_script() {
|
||||
pve_check
|
||||
@ -1149,7 +940,7 @@ install_script() {
|
||||
header_info
|
||||
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
|
||||
METHOD="advanced"
|
||||
base_settings
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/config-file.func)
|
||||
config_file
|
||||
break
|
||||
;;
|
||||
|
576
misc/config-file.func
Normal file
576
misc/config-file.func
Normal file
@ -0,0 +1,576 @@
|
||||
config_file() {
|
||||
CONFIG_FILE="/opt/community-scripts/.settings"
|
||||
|
||||
if [[ -f "/opt/community-scripts/${NSAPP}.conf" ]]; then
|
||||
CONFIG_FILE="/opt/community-scripts/${NSAPP}.conf"
|
||||
fi
|
||||
|
||||
if CONFIG_FILE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Set absolute path to config file" 8 58 "$CONFIG_FILE" --title "CONFIG FILE" 3>&1 1>&2 2>&3); then
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
echo -e "${CROSS}${RD}Config file not found, exiting script!.${CL}"
|
||||
exit
|
||||
else
|
||||
echo -e "${INFO}${BOLD}${DGN}Using config File: ${BGN}$CONFIG_FILE${CL}"
|
||||
source "$CONFIG_FILE"
|
||||
fi
|
||||
fi
|
||||
if [[ -n "${CT_ID-}" ]]; then
|
||||
if [[ "$CT_ID" =~ ^([0-9]{3,4})-([0-9]{3,4})$ ]]; then
|
||||
MIN_ID=${BASH_REMATCH[1]}
|
||||
MAX_ID=${BASH_REMATCH[2]}
|
||||
if ((MIN_ID >= MAX_ID)); then
|
||||
msg_error "Invalid Container ID range. The first number must be smaller than the second number, was ${CT_ID}"
|
||||
exit
|
||||
fi
|
||||
|
||||
LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json 2>/dev/null | grep -oP '"vmid":\s*\K\d+') || true
|
||||
if [[ -n "$LIST_OF_IDS" ]]; then
|
||||
for ((ID = MIN_ID; ID <= MAX_ID; ID++)); do
|
||||
if ! grep -q "^$ID$" <<<"$LIST_OF_IDS"; then
|
||||
CT_ID=$ID
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
|
||||
elif [[ "$CT_ID" =~ ^[0-9]+$ ]]; then
|
||||
LIST_OF_IDS=$(pvesh get /cluster/resources --type vm --output-format json 2>/dev/null | grep -oP '"vmid":\s*\K\d+') || true
|
||||
if [[ -n "$LIST_OF_IDS" ]]; then
|
||||
|
||||
if ! grep -q "^$CT_ID$" <<<"$LIST_OF_IDS"; then
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
else
|
||||
msg_error "Container ID $CT_ID already exists"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
fi
|
||||
else
|
||||
msg_error "Invalid Container ID format. Needs to be 0000-9999 or 0-9999, was ${CT_ID}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 "$NEXTID" --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$CT_ID" ]; then
|
||||
CT_ID="$NEXTID"
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
else
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
|
||||
fi
|
||||
if [[ -n "${CT_TYPE-}" ]]; then
|
||||
if [[ "$CT_TYPE" -eq 0 ]]; then
|
||||
CT_TYPE_DESC="Privileged"
|
||||
elif [[ "$CT_TYPE" -eq 1 ]]; then
|
||||
CT_TYPE_DESC="Unprivileged"
|
||||
else
|
||||
msg_error "Unknown setting for CT_TYPE, should be 1 or 0, was ${CT_TYPE}"
|
||||
exit
|
||||
fi
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||
else
|
||||
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||
"1" "Unprivileged" ON \
|
||||
"0" "Privileged" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$CT_TYPE" ]; then
|
||||
CT_TYPE_DESC="Unprivileged"
|
||||
if [ "$CT_TYPE" -eq 0 ]; then
|
||||
CT_TYPE_DESC="Privileged"
|
||||
fi
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [[ -n "${PW-}" ]]; then
|
||||
if [[ "$PW" == "none" ]]; then
|
||||
PW=""
|
||||
else
|
||||
if [[ "$PW" == *" "* ]]; then
|
||||
msg_error "Password cannot be empty"
|
||||
exit
|
||||
elif [[ ${#PW} -lt 5 ]]; then
|
||||
msg_error "Password must be at least 5 characters long"
|
||||
exit
|
||||
else
|
||||
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}"
|
||||
fi
|
||||
PW="-password $PW"
|
||||
fi
|
||||
else
|
||||
while true; do
|
||||
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD (leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
||||
if [[ -n "$PW1" ]]; then
|
||||
if [[ "$PW1" == *" "* ]]; then
|
||||
whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58
|
||||
elif [ ${#PW1} -lt 5 ]; then
|
||||
whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58
|
||||
else
|
||||
if PW2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then
|
||||
if [[ "$PW1" == "$PW2" ]]; then
|
||||
PW="-password $PW1"
|
||||
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}"
|
||||
break
|
||||
else
|
||||
whiptail --msgbox "Passwords do not match. Please try again." 8 58
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
else
|
||||
PW1="Automatic Login"
|
||||
PW=""
|
||||
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}"
|
||||
break
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -n "${HN-}" ]]; then
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||
else
|
||||
if CT_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 "$NSAPP" --title "HOSTNAME" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$CT_NAME" ]; then
|
||||
HN="$NSAPP"
|
||||
else
|
||||
HN=$(echo "${CT_NAME,,}" | tr -d ' ')
|
||||
fi
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${DISK_SIZE-}" ]]; then
|
||||
if [[ "$DISK_SIZE" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||
else
|
||||
msg_error "DISK_SIZE must be an integer, was ${DISK_SIZE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 "$var_disk" --title "DISK SIZE" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$DISK_SIZE" ]; then
|
||||
DISK_SIZE="$var_disk"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||
else
|
||||
if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
|
||||
echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}"
|
||||
advanced_settings
|
||||
fi
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${CORE_COUNT-}" ]]; then
|
||||
if [[ "$CORE_COUNT" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||
else
|
||||
msg_error "CORE_COUNT must be an integer, was ${CORE_COUNT}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 "$var_cpu" --title "CORE COUNT" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$CORE_COUNT" ]; then
|
||||
CORE_COUNT="$var_cpu"
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||
else
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${RAM_SIZE-}" ]]; then
|
||||
if [[ "$RAM_SIZE" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||
else
|
||||
msg_error "RAM_SIZE must be an integer, was ${RAM_SIZE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 "$var_ram" --title "RAM" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$RAM_SIZE" ]; then
|
||||
RAM_SIZE="$var_ram"
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||
else
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
IFACE_FILEPATH_LIST="/etc/network/interfaces"$'\n'$(find "/etc/network/interfaces.d/" -type f)
|
||||
BRIDGES=""
|
||||
OLD_IFS=$IFS
|
||||
IFS=$'\n'
|
||||
|
||||
for iface_filepath in ${IFACE_FILEPATH_LIST}; do
|
||||
|
||||
iface_indexes_tmpfile=$(mktemp -q -u '.iface-XXXX')
|
||||
( grep -Pn '^\s*iface' "${iface_filepath}" | cut -d':' -f1 && wc -l "${iface_filepath}" | cut -d' ' -f1 ) | awk 'FNR==1 {line=$0; next} {print line":"$0-1; line=$0}' > "${iface_indexes_tmpfile}" || true
|
||||
|
||||
if [ -f "${iface_indexes_tmpfile}" ]; then
|
||||
|
||||
while read -r pair; do
|
||||
start=$(echo "${pair}" | cut -d':' -f1)
|
||||
end=$(echo "${pair}" | cut -d':' -f2)
|
||||
if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*(bridge[-_](ports|stp|fd|vlan-aware|vids)|ovs_type\s+OVSBridge)\b'; then
|
||||
iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}')
|
||||
BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
|
||||
fi
|
||||
|
||||
done < "${iface_indexes_tmpfile}"
|
||||
rm -f "${iface_indexes_tmpfile}"
|
||||
fi
|
||||
|
||||
done
|
||||
IFS=$OLD_IFS
|
||||
BRIDGES=$(echo "$BRIDGES" | grep -v '^\s*$' | sort | uniq)
|
||||
|
||||
if [[ -n "${BRG-}" ]]; then
|
||||
if echo "$BRIDGES" | grep -q "${BRG}"; then
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
else
|
||||
msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces or /etc/network/interfaces.d/sdn"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --menu "Select network bridge:" 15 40 6 $(echo "$BRIDGES" | awk '{print $0, "Bridge"}') 3>&1 1>&2 2>&3)
|
||||
if [ -z "$BRG" ]; then
|
||||
exit_script
|
||||
else
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$'
|
||||
local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$'
|
||||
|
||||
if [[ -n ${NET-} ]]; then
|
||||
if [ "$NET" == "dhcp" ]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}DHCP${CL}"
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
|
||||
elif [[ "$NET" =~ $ip_cidr_regex ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||
if [ ! -z "$GATE" ]; then
|
||||
if [[ "$GATE" =~ $ip_regex ]]; then
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE${CL}"
|
||||
GATE=",gw=$GATE"
|
||||
else
|
||||
msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was ${GATE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "Gateway IP Address cannot be empty"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
msg_error "Invalid IP Address format. Needs to be 0.0.0.0/0, was ${NET}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
while true; do
|
||||
NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Static IPv4 CIDR Address (/24)" 8 58 dhcp --title "IP ADDRESS" 3>&1 1>&2 2>&3)
|
||||
exit_status=$?
|
||||
if [ $exit_status -eq 0 ]; then
|
||||
if [ "$NET" = "dhcp" ]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||
break
|
||||
else
|
||||
if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||
break
|
||||
else
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58
|
||||
fi
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
done
|
||||
if [ "$NET" != "dhcp" ]; then
|
||||
while true; do
|
||||
GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3)
|
||||
if [ -z "$GATE1" ]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58
|
||||
elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58
|
||||
else
|
||||
GATE=",gw=$GATE1"
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
GATE=""
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$var_os" == "alpine" ]; then
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
else
|
||||
if [[ -n "${APT_CACHER_IP-}" ]]; then
|
||||
if [[ ! $APT_CACHER_IP == "none" ]]; then
|
||||
if [[ "$APT_CACHER_IP" =~ $ip_regex ]]; then
|
||||
APT_CACHER="yes"
|
||||
echo -e "${NETWORK}${BOLD}${DGN}APT-CACHER IP Address: ${BGN}$APT_CACHER_IP${CL}"
|
||||
else
|
||||
msg_error "Invalid IP Address format for APT-Cacher. Needs to be 0.0.0.0, was ${APT_CACHER_IP}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
APT_CACHER=""
|
||||
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}No${CL}"
|
||||
fi
|
||||
else
|
||||
if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for none)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then
|
||||
APT_CACHER="${APT_CACHER_IP:+yes}"
|
||||
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
|
||||
if [[ -n $APT_CACHER_IP ]]; then
|
||||
APT_CACHER_IP="none"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${DISABLEIP6-}" == "yes" ]]; then
|
||||
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}Yes${CL}"
|
||||
elif [[ "${DISABLEIP6-}" == "no" ]]; then
|
||||
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}No${CL}"
|
||||
else
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "IPv6" --yesno "Disable IPv6?" 10 58); then
|
||||
DISABLEIP6="yes"
|
||||
else
|
||||
DISABLEIP6="no"
|
||||
fi
|
||||
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
||||
fi
|
||||
|
||||
if [[ -n "${MTU-}" ]]; then
|
||||
if [[ "$MTU" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU${CL}"
|
||||
MTU=",mtu=$MTU"
|
||||
else
|
||||
msg_error "MTU must be an integer, was ${MTU}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [The MTU of your selected vmbr, default is 1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$MTU1" ]; then
|
||||
MTU1="Default"
|
||||
MTU=""
|
||||
else
|
||||
MTU=",mtu=$MTU1"
|
||||
fi
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${SD-}" ]]; then
|
||||
if [[ "$SD" == "none" ]]; then
|
||||
SD=""
|
||||
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}Host${CL}"
|
||||
else
|
||||
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SD${CL}"
|
||||
SD="-searchdomain=$SD"
|
||||
fi
|
||||
else
|
||||
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$SD" ]; then
|
||||
SX=Host
|
||||
SD=""
|
||||
else
|
||||
SX=$SD
|
||||
SD="-searchdomain=$SD"
|
||||
fi
|
||||
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${NS-}" ]]; then
|
||||
if [[ $NS == "none" ]]; then
|
||||
NS=""
|
||||
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}Host${CL}"
|
||||
else
|
||||
if [[ "$NS" =~ $ip_regex ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NS${CL}"
|
||||
NS="-nameserver=$NS"
|
||||
else
|
||||
msg_error "Invalid IP Address format for DNS Server. Needs to be 0.0.0.0, was ${NS}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$NX" ]; then
|
||||
NX=Host
|
||||
NS=""
|
||||
else
|
||||
NS="-nameserver=$NX"
|
||||
fi
|
||||
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${MAC-}" ]]; then
|
||||
if [[ "$MAC" == "none" ]]; then
|
||||
MAC=""
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}Host${CL}"
|
||||
else
|
||||
if [[ "$MAC" =~ ^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$ ]]; then
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||
MAC=",hwaddr=$MAC"
|
||||
else
|
||||
msg_error "MAC Address must be in the format xx:xx:xx:xx:xx:xx, was ${MAC}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for generated MAC)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$MAC1" ]; then
|
||||
MAC1="Default"
|
||||
MAC=""
|
||||
else
|
||||
MAC=",hwaddr=$MAC1"
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${VLAN-}" ]]; then
|
||||
if [[ "$VLAN" == "none" ]]; then
|
||||
VLAN=""
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}Host${CL}"
|
||||
else
|
||||
if [[ "$VLAN" =~ ^-?[0-9]+$ ]]; then
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN${CL}"
|
||||
VLAN=",tag=$VLAN"
|
||||
else
|
||||
msg_error "VLAN must be an integer, was ${VLAN}"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for no VLAN)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$VLAN1" ]; then
|
||||
VLAN1="Default"
|
||||
VLAN=""
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
fi
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${TAGS-}" ]]; then
|
||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||
else
|
||||
TAGS="community-scripts;"
|
||||
if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 "${TAGS}" --title "Advanced Tags" 3>&1 1>&2 2>&3); then
|
||||
if [ -n "${ADV_TAGS}" ]; then
|
||||
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]')
|
||||
TAGS="${ADV_TAGS}"
|
||||
else
|
||||
TAGS=";"
|
||||
fi
|
||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${SSH-}" ]]; then
|
||||
if [[ "$SSH" == "yes" ]]; then
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
if [[ ! -z "$SSH_AUTHORIZED_KEY" ]]; then
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}********************${CL}"
|
||||
else
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}SSH Authorized Key: ${BGN}None${CL}"
|
||||
fi
|
||||
elif [[ "$SSH" == "no" ]]; then
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
else
|
||||
msg_error "SSH needs to be 'yes' or 'no', was ${SSH}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
SSH_AUTHORIZED_KEY="$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)"
|
||||
if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||
SSH_AUTHORIZED_KEY=""
|
||||
fi
|
||||
if [[ "$PW" == -password* || -n "$SSH_AUTHORIZED_KEY" ]]; then
|
||||
if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "SSH ACCESS" --yesno "Enable Root SSH Access?" 10 58); then
|
||||
SSH="yes"
|
||||
else
|
||||
SSH="no"
|
||||
fi
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
else
|
||||
SSH="no"
|
||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${VERBOSE-}" ]]; then
|
||||
if [[ "$VERBOSE" == "yes" ]]; then
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||
elif [[ "$VERBOSE" == "no" ]]; then
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}No${CL}"
|
||||
else
|
||||
msg_error "Verbose Mode needs to be 'yes' or 'no', was ${VERBOSE}"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||
VERBOSE="yes"
|
||||
else
|
||||
VERBOSE="no"
|
||||
fi
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS WITH CONFIG FILE COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above settings${CL}"
|
||||
write_config
|
||||
else
|
||||
clear
|
||||
header_info
|
||||
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
|
||||
config_file
|
||||
fi
|
||||
|
||||
}
|
@ -1180,3 +1180,22 @@ setup_rbenv_stack() {
|
||||
rm -rf "$TMP_DIR"
|
||||
msg_ok "rbenv stack ready (Ruby $RUBY_VERSION)"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Creates and installs self-signed certificates.
|
||||
#
|
||||
# Description:
|
||||
# - Create a self-signed certificate with option to override application name
|
||||
#
|
||||
# Variables:
|
||||
# APP - Application name (default: $APPLICATION variable)
|
||||
# ------------------------------------------------------------------------------
|
||||
create_selfsigned_certs() {
|
||||
local app=${APP:-$(echo "${APPLICATION,,}" | tr -d ' ')}
|
||||
$STD msg_info "Creating Self-Signed Certificate"
|
||||
$STD openssl req -x509 -nodes -days 365 -newkey rsa:4096 \
|
||||
-keyout /etc/ssl/private/"$app"-selfsigned.key \
|
||||
-out /etc/ssl/certs/"$app"-selfsigned.crt \
|
||||
-subj "/C=US/O=$app/OU=Domain Control Validated/CN=localhost"
|
||||
$STD msg_ok "Created Self-Signed Certificate"
|
||||
}
|
||||
|
Reference in New Issue
Block a user