mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-03 07:15:05 +02:00
Compare commits
12 Commits
gitlab_sup
...
feat/post-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53fcf1793a | ||
|
|
0dbee93410 | ||
|
|
1a7d1da029 | ||
|
|
f6ccf8be5e | ||
|
|
ec81640d67 | ||
|
|
03a301d736 | ||
|
|
be81d6255e | ||
|
|
c9da2daec2 | ||
|
|
9015023e8c | ||
|
|
e2a51d4941 | ||
|
|
b4e0bb0686 | ||
|
|
1109fe4b0d |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -448,11 +448,32 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## 2026-05-01
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- paperless-ngx: refresh NLTK data on update [@kurtislanderson](https://github.com/kurtislanderson) ([#14144](https://github.com/community-scripts/ProxmoxVE/pull/14144))
|
||||||
|
- [Pelican Panel] stop deleting the public storage [@LetterN](https://github.com/LetterN) ([#14145](https://github.com/community-scripts/ProxmoxVE/pull/14145))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Mail-Archiver: update dependencies [@tremor021](https://github.com/tremor021) ([#14152](https://github.com/community-scripts/ProxmoxVE/pull/14152))
|
||||||
|
|
||||||
## 2026-04-30
|
## 2026-04-30
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
|
|
||||||
- Neko ([#14121](https://github.com/community-scripts/ProxmoxVE/pull/14121))
|
- Nagios ([#14126](https://github.com/community-scripts/ProxmoxVE/pull/14126))
|
||||||
|
- Neko ([#14121](https://github.com/community-scripts/ProxmoxVE/pull/14121))
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- alpine-docker: install openssl as core dependency | alpine-komodo: check & install openssl if missing [@MickLesk](https://github.com/MickLesk) ([#14134](https://github.com/community-scripts/ProxmoxVE/pull/14134))
|
||||||
|
- endurain: update source references to Codeberg [@MickLesk](https://github.com/MickLesk) ([#14128](https://github.com/community-scripts/ProxmoxVE/pull/14128))
|
||||||
|
|
||||||
### 💾 Core
|
### 💾 Core
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: johanngrobe
|
# Author: johanngrobe
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/joaovitoriasilva/endurain
|
# Source: https://codeberg.org/endurain-project/endurain
|
||||||
|
|
||||||
APP="Endurain"
|
APP="Endurain"
|
||||||
var_tags="${var_tags:-sport;social-media}"
|
var_tags="${var_tags:-sport;social-media}"
|
||||||
@@ -28,7 +28,7 @@ function update_script() {
|
|||||||
msg_error "No ${APP} installation found!"
|
msg_error "No ${APP} installation found!"
|
||||||
exit 233
|
exit 233
|
||||||
fi
|
fi
|
||||||
if check_for_gh_release "endurain" "endurain-project/endurain"; then
|
if check_for_codeberg_release "endurain" "endurain-project/endurain"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop endurain
|
systemctl stop endurain
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
@@ -38,7 +38,7 @@ function update_script() {
|
|||||||
cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
|
cp /opt/endurain/frontend/app/dist/env.js /opt/endurain.env.js
|
||||||
msg_ok "Created Backup"
|
msg_ok "Created Backup"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"
|
CLEAN_INSTALL=1 fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"
|
||||||
|
|
||||||
msg_info "Preparing Update"
|
msg_info "Preparing Update"
|
||||||
cd /opt/endurain
|
cd /opt/endurain
|
||||||
|
|||||||
6
ct/headers/nagios
Normal file
6
ct/headers/nagios
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
_ __ _
|
||||||
|
/ | / /___ _____ _(_)___ _____
|
||||||
|
/ |/ / __ `/ __ `/ / __ \/ ___/
|
||||||
|
/ /| / /_/ / /_/ / / /_/ (__ )
|
||||||
|
/_/ |_/\__,_/\__, /_/\____/____/
|
||||||
|
/____/
|
||||||
@@ -28,6 +28,8 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ensure_dependencies libgssapi-krb5-2
|
||||||
|
|
||||||
if check_for_gh_release "mail-archiver" "s1t5/mail-archiver"; then
|
if check_for_gh_release "mail-archiver" "s1t5/mail-archiver"; then
|
||||||
msg_info "Stopping Mail-Archiver"
|
msg_info "Stopping Mail-Archiver"
|
||||||
systemctl stop mail-archiver
|
systemctl stop mail-archiver
|
||||||
|
|||||||
90
ct/nagios.sh
Normal file
90
ct/nagios.sh
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: CanbiZ (MickLesk)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/NagiosEnterprises/nagioscore
|
||||||
|
|
||||||
|
APP="Nagios"
|
||||||
|
var_tags="${var_tags:-monitoring;alerts;infrastructure}"
|
||||||
|
var_cpu="${var_cpu:-2}"
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-20}"
|
||||||
|
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 [[ ! -f /usr/local/nagios/etc/nagios.cfg ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Backing up Configuration"
|
||||||
|
cp -a /usr/local/nagios/etc /opt/nagios-etc-backup
|
||||||
|
msg_ok "Backed up Configuration"
|
||||||
|
|
||||||
|
if check_for_gh_release "nagios" "NagiosEnterprises/nagioscore"; then
|
||||||
|
msg_info "Stopping Nagios"
|
||||||
|
systemctl stop nagios
|
||||||
|
msg_ok "Stopped Nagios"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball"
|
||||||
|
|
||||||
|
msg_info "Building Nagios Core"
|
||||||
|
cd /opt/nagios
|
||||||
|
$STD ./configure --with-httpd-conf=/etc/apache2/sites-enabled
|
||||||
|
$STD make all
|
||||||
|
$STD make install-groups-users
|
||||||
|
usermod -a -G nagios www-data
|
||||||
|
$STD make install
|
||||||
|
$STD make install-daemoninit
|
||||||
|
$STD make install-commandmode
|
||||||
|
$STD make install-webconf
|
||||||
|
$STD a2enmod rewrite
|
||||||
|
$STD a2enmod cgi
|
||||||
|
msg_ok "Built Nagios Core"
|
||||||
|
|
||||||
|
msg_info "Starting Nagios"
|
||||||
|
systemctl restart apache2
|
||||||
|
systemctl start nagios
|
||||||
|
msg_ok "Started Nagios"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_for_gh_release "nagios-plugins" "nagios-plugins/nagios-plugins"; then
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "nagios-plugins" "nagios-plugins/nagios-plugins" "tarball"
|
||||||
|
msg_info "Building Nagios Plugins"
|
||||||
|
cd /opt/nagios-plugins
|
||||||
|
$STD ./tools/setup
|
||||||
|
$STD ./configure
|
||||||
|
$STD make
|
||||||
|
$STD make install
|
||||||
|
msg_ok "Built Nagios Plugins"
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Restoring Configuration"
|
||||||
|
rm -rf /usr/local/nagios/etc
|
||||||
|
cp -a /opt/nagios-etc-backup /usr/local/nagios/etc
|
||||||
|
rm -rf /opt/nagios-etc-backup
|
||||||
|
msg_ok "Restored Configuration"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
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}/nagios${CL}"
|
||||||
@@ -164,6 +164,14 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
msg_info "Updating NLTK Data"
|
||||||
|
cd /opt/paperless
|
||||||
|
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data snowball_data
|
||||||
|
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data stopwords
|
||||||
|
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data punkt_tab ||
|
||||||
|
$STD uv run python -m nltk.downloader -d /usr/share/nltk_data punkt
|
||||||
|
msg_ok "Updated NLTK Data"
|
||||||
|
|
||||||
msg_info "Starting all Paperless-ngx Services"
|
msg_info "Starting all Paperless-ngx Services"
|
||||||
systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue
|
systemctl start paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
@@ -45,15 +45,21 @@ function update_script() {
|
|||||||
$STD php artisan down
|
$STD php artisan down
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
cp -r /opt/pelican-panel/.env /opt/
|
cp -a /opt/pelican-panel/.env /opt/backup
|
||||||
|
cp -a /opt/pelican-panel/storage/app/public /opt/backup/storage/app/
|
||||||
|
|
||||||
SQLITE_INSTALL=$(ls /opt/pelican-panel/database/*.sqlite 1>/dev/null 2>&1 && echo "true" || echo "false")
|
SQLITE_INSTALL=$(ls /opt/pelican-panel/database/*.sqlite 1>/dev/null 2>&1 && echo "true" || echo "false")
|
||||||
$SQLITE_INSTALL && cp -r /opt/pelican-panel/database/*.sqlite /opt/
|
$SQLITE_INSTALL && cp -r /opt/pelican-panel/database/*.sqlite /opt/backup
|
||||||
rm -rf * .*
|
|
||||||
|
find /opt/pelican-panel -mindepth 1 -maxdepth 1 ! -name 'backup' ! -name 'plugins' -exec rm -rf {} +
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "pelican-panel" "pelican-dev/panel" "prebuild" "latest" "/opt/pelican-panel" "panel.tar.gz"
|
fetch_and_deploy_gh_release "pelican-panel" "pelican-dev/panel" "prebuild" "latest" "/opt/pelican-panel" "panel.tar.gz"
|
||||||
|
|
||||||
msg_info "Updating Pelican Panel"
|
msg_info "Updating Pelican Panel"
|
||||||
mv /opt/.env /opt/pelican-panel/
|
cp -a /opt/backup/.env /opt/pelican-panel/
|
||||||
$SQLITE_INSTALL && mv /opt/*.sqlite /opt/pelican-panel/database/
|
$SQLITE_INSTALL && mv /opt/backup/*.sqlite /opt/pelican-panel/database/
|
||||||
|
cp -a /opt/backup/storage/app/public /opt/pelican-panel/storage/app/
|
||||||
|
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
$STD php artisan p:environment:setup
|
$STD php artisan p:environment:setup
|
||||||
$STD php artisan view:clear
|
$STD php artisan view:clear
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apk add tzdata
|
$STD apk add tzdata openssl
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Docker"
|
msg_info "Installing Docker"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: johanngrobe
|
# Author: johanngrobe
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/joaovitoriasilva/endurain
|
# Source: https://codeberg.org/endurain-project/endurain
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -21,7 +21,7 @@ PYTHON_VERSION="3.13" setup_uv
|
|||||||
NODE_VERSION="24" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
PG_VERSION="17" PG_MODULES="postgis" setup_postgresql
|
PG_VERSION="17" PG_MODULES="postgis" setup_postgresql
|
||||||
PG_DB_NAME="enduraindb" PG_DB_USER="endurain" setup_postgresql_db
|
PG_DB_NAME="enduraindb" PG_DB_USER="endurain" setup_postgresql_db
|
||||||
fetch_and_deploy_gh_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"
|
fetch_and_deploy_codeberg_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain"
|
||||||
|
|
||||||
msg_info "Setting up Endurain"
|
msg_info "Setting up Endurain"
|
||||||
cd /opt/endurain
|
cd /opt/endurain
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ setup_deb822_repo \
|
|||||||
"main"
|
"main"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
dotnet-sdk-10.0 \
|
dotnet-sdk-10.0 \
|
||||||
aspnetcore-runtime-8.0
|
aspnetcore-runtime-8.0 \
|
||||||
|
libgssapi-krb5-2
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
|||||||
78
install/nagios-install.sh
Normal file
78
install/nagios-install.sh
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: CanbiZ (MickLesk)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/NagiosEnterprises/nagioscore
|
||||||
|
|
||||||
|
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 \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
build-essential \
|
||||||
|
bc \
|
||||||
|
dc \
|
||||||
|
gawk \
|
||||||
|
gettext \
|
||||||
|
gperf \
|
||||||
|
libgd-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
libnet-snmp-perl \
|
||||||
|
libssl-dev \
|
||||||
|
snmp \
|
||||||
|
apache2 \
|
||||||
|
apache2-utils
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
PHP_APACHE="YES" setup_php
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "nagios" "NagiosEnterprises/nagioscore" "tarball"
|
||||||
|
|
||||||
|
msg_info "Building Nagios Core"
|
||||||
|
cd /opt/nagios
|
||||||
|
$STD ./configure --with-httpd-conf=/etc/apache2/sites-enabled
|
||||||
|
$STD make all
|
||||||
|
$STD make install-groups-users
|
||||||
|
usermod -a -G nagios www-data
|
||||||
|
$STD make install
|
||||||
|
$STD make install-daemoninit
|
||||||
|
$STD make install-commandmode
|
||||||
|
$STD make install-config
|
||||||
|
$STD make install-webconf
|
||||||
|
$STD a2enmod rewrite
|
||||||
|
$STD a2enmod cgi
|
||||||
|
msg_ok "Built Nagios Core"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "nagios-plugins" "nagios-plugins/nagios-plugins" "tarball"
|
||||||
|
|
||||||
|
msg_info "Building Nagios Plugins"
|
||||||
|
cd /opt/nagios-plugins
|
||||||
|
$STD ./tools/setup
|
||||||
|
$STD ./configure
|
||||||
|
$STD make
|
||||||
|
$STD make install
|
||||||
|
msg_ok "Built Nagios Plugins"
|
||||||
|
|
||||||
|
msg_info "Configuring Web Authentication"
|
||||||
|
$STD htpasswd -bc /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin
|
||||||
|
chown root:www-data /usr/local/nagios/etc/htpasswd.users
|
||||||
|
chmod 640 /usr/local/nagios/etc/htpasswd.users
|
||||||
|
msg_ok "Configured Web Authentication"
|
||||||
|
|
||||||
|
msg_info "Starting Services"
|
||||||
|
systemctl enable -q apache2
|
||||||
|
systemctl restart apache2
|
||||||
|
systemctl enable -q --now nagios
|
||||||
|
msg_ok "Started Services"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
@@ -1062,6 +1062,7 @@ load_vars_file() {
|
|||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
||||||
|
var_post_install
|
||||||
)
|
)
|
||||||
|
|
||||||
# Whitelist check helper
|
# Whitelist check helper
|
||||||
@@ -1279,6 +1280,7 @@ default_var_settings() {
|
|||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
||||||
|
var_post_install
|
||||||
)
|
)
|
||||||
|
|
||||||
# Snapshot: environment variables (highest precedence)
|
# Snapshot: environment variables (highest precedence)
|
||||||
@@ -1374,6 +1376,11 @@ var_verbose=no
|
|||||||
# GitHub Personal Access Token (optional – avoids API rate limits during installs)
|
# GitHub Personal Access Token (optional – avoids API rate limits during installs)
|
||||||
# Create at https://github.com/settings/tokens – read-only public access is sufficient
|
# Create at https://github.com/settings/tokens – read-only public access is sufficient
|
||||||
# var_github_token=ghp_your_token_here
|
# var_github_token=ghp_your_token_here
|
||||||
|
|
||||||
|
# Optional post-install script (host-side path to a *.sh on the Proxmox host)
|
||||||
|
# Runs ON THE HOST after the container is fully provisioned.
|
||||||
|
# Available env vars: APP, NSAPP, CTID, IP, HN, STORAGE, BRG
|
||||||
|
# var_post_install=/opt/post-install/myhook.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Now choose storages (always prompt unless just one exists)
|
# Now choose storages (always prompt unless just one exists)
|
||||||
@@ -1452,6 +1459,7 @@ if ! declare -p VAR_WHITELIST >/dev/null 2>&1; then
|
|||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
||||||
|
var_post_install
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1664,6 +1672,7 @@ _build_current_app_vars_tmp() {
|
|||||||
|
|
||||||
[ -n "$_tpl_storage" ] && echo "var_template_storage=$(_sanitize_value "$_tpl_storage")"
|
[ -n "$_tpl_storage" ] && echo "var_template_storage=$(_sanitize_value "$_tpl_storage")"
|
||||||
[ -n "$_ct_storage" ] && echo "var_container_storage=$(_sanitize_value "$_ct_storage")"
|
[ -n "$_ct_storage" ] && echo "var_container_storage=$(_sanitize_value "$_ct_storage")"
|
||||||
|
[ -n "${var_post_install:-}" ] && echo "var_post_install=$(_sanitize_value "${var_post_install}")"
|
||||||
} >"$tmpf"
|
} >"$tmpf"
|
||||||
|
|
||||||
echo "$tmpf"
|
echo "$tmpf"
|
||||||
@@ -1808,7 +1817,7 @@ advanced_settings() {
|
|||||||
TAGS="community-script${var_tags:+;${var_tags}}"
|
TAGS="community-script${var_tags:+;${var_tags}}"
|
||||||
fi
|
fi
|
||||||
local STEP=1
|
local STEP=1
|
||||||
local MAX_STEP=28
|
local MAX_STEP=29
|
||||||
|
|
||||||
# Store values for back navigation - inherit from var_* app defaults
|
# Store values for back navigation - inherit from var_* app defaults
|
||||||
local _ct_type="${var_unprivileged:-1}"
|
local _ct_type="${var_unprivileged:-1}"
|
||||||
@@ -1842,6 +1851,7 @@ advanced_settings() {
|
|||||||
local _enable_mknod="${var_mknod:-0}"
|
local _enable_mknod="${var_mknod:-0}"
|
||||||
local _mount_fs="${var_mount_fs:-}"
|
local _mount_fs="${var_mount_fs:-}"
|
||||||
local _protect_ct="${var_protection:-no}"
|
local _protect_ct="${var_protection:-no}"
|
||||||
|
local _post_install="${var_post_install:-}"
|
||||||
|
|
||||||
# Detect host timezone for default (if not set via var_timezone)
|
# Detect host timezone for default (if not set via var_timezone)
|
||||||
local _host_timezone=""
|
local _host_timezone=""
|
||||||
@@ -2753,7 +2763,8 @@ Features:
|
|||||||
Advanced:
|
Advanced:
|
||||||
Timezone: $tz_display
|
Timezone: $tz_display
|
||||||
APT Cacher: $apt_display
|
APT Cacher: $apt_display
|
||||||
Verbose: $_verbose"
|
Verbose: $_verbose
|
||||||
|
Post-Install Script: ${_post_install:-(none)}"
|
||||||
|
|
||||||
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
--title "CONFIRM SETTINGS" \
|
--title "CONFIRM SETTINGS" \
|
||||||
@@ -2796,6 +2807,7 @@ Advanced:
|
|||||||
APT_CACHER="$_apt_cacher"
|
APT_CACHER="$_apt_cacher"
|
||||||
APT_CACHER_IP="$_apt_cacher_ip"
|
APT_CACHER_IP="$_apt_cacher_ip"
|
||||||
VERBOSE="$_verbose"
|
VERBOSE="$_verbose"
|
||||||
|
var_post_install="$_post_install"
|
||||||
|
|
||||||
# Update var_* based on user choice (for functions that check these)
|
# Update var_* based on user choice (for functions that check these)
|
||||||
var_gpu="$_enable_gpu"
|
var_gpu="$_enable_gpu"
|
||||||
@@ -6305,6 +6317,25 @@ EOF
|
|||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Optional host-side post-install hook
|
||||||
|
# Path comes from var_post_install (default.vars / app.vars / advanced settings).
|
||||||
|
# Runs ON THE PROXMOX HOST after the container is up and configured.
|
||||||
|
# Exposed env vars: APP, NSAPP, CTID, IP, HN, STORAGE, BRG.
|
||||||
|
if [[ -n "${var_post_install:-}" ]]; then
|
||||||
|
if [[ -f "${var_post_install}" ]]; then
|
||||||
|
msg_info "Running post-install script: ${var_post_install}"
|
||||||
|
if APP="$APP" NSAPP="${NSAPP:-}" CTID="$CTID" IP="$IP" HN="${HN:-}" \
|
||||||
|
STORAGE="${STORAGE:-}" BRG="${BRG:-}" \
|
||||||
|
bash "${var_post_install}"; then
|
||||||
|
msg_ok "Ran post-install script"
|
||||||
|
else
|
||||||
|
msg_error "Post-install script exited with non-zero status (rc=$?)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
msg_error "Post-install script not found on host: ${var_post_install}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
INSTALL_COMPLETE=true
|
INSTALL_COMPLETE=true
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,6 +151,23 @@ function check_proxmox_host() {
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# CHECK / INSTALL DOCKER
|
# CHECK / INSTALL DOCKER
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
function ensure_openssl() {
|
||||||
|
if command -v openssl &>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
msg_info "Installing openssl"
|
||||||
|
if [[ -f /etc/alpine-release ]]; then
|
||||||
|
$STD apk add openssl
|
||||||
|
elif command -v apt-get &>/dev/null; then
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y openssl
|
||||||
|
else
|
||||||
|
msg_error "openssl is required but could not be installed automatically."
|
||||||
|
exit 10
|
||||||
|
fi
|
||||||
|
msg_ok "Installed openssl"
|
||||||
|
}
|
||||||
|
|
||||||
function check_or_install_docker() {
|
function check_or_install_docker() {
|
||||||
if command -v docker &>/dev/null; then
|
if command -v docker &>/dev/null; then
|
||||||
msg_ok "Docker $(docker --version | cut -d' ' -f3 | tr -d ',') is available"
|
msg_ok "Docker $(docker --version | cut -d' ' -f3 | tr -d ',') is available"
|
||||||
@@ -160,6 +177,7 @@ function check_or_install_docker() {
|
|||||||
msg_error "Docker Compose plugin is not available. Please install it."
|
msg_error "Docker Compose plugin is not available. Please install it."
|
||||||
exit 10
|
exit 10
|
||||||
fi
|
fi
|
||||||
|
ensure_openssl
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -183,6 +201,8 @@ function check_or_install_docker() {
|
|||||||
$STD sh <(curl -fsSL https://get.docker.com)
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
fi
|
fi
|
||||||
msg_ok "Installed Docker"
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
|
ensure_openssl
|
||||||
}
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user