mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-31 04:50:14 +00:00
Compare commits
16 Commits
4128e279b1
...
e7b8d5826a
Author | SHA1 | Date | |
---|---|---|---|
|
e7b8d5826a | ||
|
c6c026e221 | ||
|
4dcf0dc0b8 | ||
|
81c327c317 | ||
|
c9eb13a20c | ||
|
c42438be11 | ||
|
dfc006271c | ||
|
e64ecb9773 | ||
|
85109ecf11 | ||
|
fb67025f3b | ||
|
f545c8ae5b | ||
|
70d75bf53e | ||
|
783e9b160d | ||
|
bdb2816e87 | ||
|
d9a4586eec | ||
|
3904fb1981 |
@ -23,10 +23,13 @@ Do not break established syntax in this file, as it is automatically updated by
|
|||||||
|
|
||||||
### ✨ New Scripts
|
### ✨ New Scripts
|
||||||
|
|
||||||
|
- New Script: UrBackup Server [@kris701](https://github.com/kris701) ([#1569](https://github.com/community-scripts/ProxmoxVE/pull/1569))
|
||||||
- New Script: Proxmox Mail Gateway Post Installer [@thost96](https://github.com/thost96) ([#1559](https://github.com/community-scripts/ProxmoxVE/pull/1559))
|
- New Script: Proxmox Mail Gateway Post Installer [@thost96](https://github.com/thost96) ([#1559](https://github.com/community-scripts/ProxmoxVE/pull/1559))
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Update Kimai Dependency: Use PHP 8.3 [@MickLesk](https://github.com/MickLesk) ([#1609](https://github.com/community-scripts/ProxmoxVE/pull/1609))
|
||||||
|
- Feature: Add xCaddy for external Modules on Caddy-LXC [@MickLesk](https://github.com/MickLesk) ([#1613](https://github.com/community-scripts/ProxmoxVE/pull/1613))
|
||||||
- Fix Pocketbase URL after install [@MickLesk](https://github.com/MickLesk) ([#1597](https://github.com/community-scripts/ProxmoxVE/pull/1597))
|
- Fix Pocketbase URL after install [@MickLesk](https://github.com/MickLesk) ([#1597](https://github.com/community-scripts/ProxmoxVE/pull/1597))
|
||||||
- Unifi.sh fix wrong URL after Install [@thost96](https://github.com/thost96) ([#1601](https://github.com/community-scripts/ProxmoxVE/pull/1601))
|
- Unifi.sh fix wrong URL after Install [@thost96](https://github.com/thost96) ([#1601](https://github.com/community-scripts/ProxmoxVE/pull/1601))
|
||||||
|
|
||||||
@ -37,6 +40,8 @@ Do not break established syntax in this file, as it is automatically updated by
|
|||||||
|
|
||||||
### 🧰 Maintenance
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- [core] Update build.func: Add defaults to Advanced mode [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1548](https://github.com/community-scripts/ProxmoxVE/pull/1548))
|
||||||
|
- Update build.func: Fix Advanced Tags (Remove all if empty / overwrite if default cleared) [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1612](https://github.com/community-scripts/ProxmoxVE/pull/1612))
|
||||||
- Add new Check for LXC MaxKeys by @cricalix [@MickLesk](https://github.com/MickLesk) ([#1602](https://github.com/community-scripts/ProxmoxVE/pull/1602))
|
- Add new Check for LXC MaxKeys by @cricalix [@MickLesk](https://github.com/MickLesk) ([#1602](https://github.com/community-scripts/ProxmoxVE/pull/1602))
|
||||||
|
|
||||||
## 2025-01-19
|
## 2025-01-19
|
||||||
|
@ -10,7 +10,7 @@ APP="Caddy"
|
|||||||
var_tags="webserver"
|
var_tags="webserver"
|
||||||
var_cpu="1"
|
var_cpu="1"
|
||||||
var_ram="512"
|
var_ram="512"
|
||||||
var_disk="2"
|
var_disk="4"
|
||||||
var_os="debian"
|
var_os="debian"
|
||||||
var_version="12"
|
var_version="12"
|
||||||
var_unprivileged="1"
|
var_unprivileged="1"
|
||||||
@ -46,4 +46,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}"
|
||||||
|
71
ct/projectsend.sh
Normal file
71
ct/projectsend.sh
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: bvdberg01
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://www.projectsend.org/
|
||||||
|
|
||||||
|
# App Default Values
|
||||||
|
APP="ProjectSend"
|
||||||
|
var_tags="media"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="1024"
|
||||||
|
var_disk="8"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
# App Output & Base Settings
|
||||||
|
header_info "$APP"
|
||||||
|
base_settings
|
||||||
|
|
||||||
|
# Core
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
if [[ ! -d /opt/projectsend ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/projectsend/projectsend/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop apache2
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP} to v${RELEASE}"
|
||||||
|
cd /opt
|
||||||
|
wget -q "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip"
|
||||||
|
unzip -o -q "projectsend-r${RELEASE}.zip" -d projectsend
|
||||||
|
chown -R www-data:www-data /opt/projectsend
|
||||||
|
chmod -R 775 /opt/projectsend
|
||||||
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start apache2
|
||||||
|
msg_ok "Started Service"
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf "/opt/projectsend-r${RELEASE}.zip"
|
||||||
|
msg_ok "Cleaned"
|
||||||
|
msg_ok "Updated Successfully"
|
||||||
|
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}${CL}"
|
@ -1,9 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
|
||||||
# License: MIT
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@ -14,7 +13,14 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y {debian-keyring,debian-archive-keyring,apt-transport-https,gpg,curl,sudo,mc}
|
$STD apt-get install -y \
|
||||||
|
debian-keyring \
|
||||||
|
debian-archive-keyring \
|
||||||
|
apt-transport-https \
|
||||||
|
gpg \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Caddy"
|
msg_info "Installing Caddy"
|
||||||
@ -24,6 +30,29 @@ $STD apt-get update
|
|||||||
$STD apt-get install -y caddy
|
$STD apt-get install -y caddy
|
||||||
msg_ok "Installed Caddy"
|
msg_ok "Installed Caddy"
|
||||||
|
|
||||||
|
read -r -p "Would you like to install xCaddy Addon? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
msg_info "Installing Golang"
|
||||||
|
cd /opt
|
||||||
|
set +o pipefail
|
||||||
|
GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1)
|
||||||
|
wget -q https://golang.org/dl/$GOLANG
|
||||||
|
tar -xzf $GOLANG -C /usr/local
|
||||||
|
ln -s /usr/local/go/bin/go /usr/local/bin/go
|
||||||
|
set -o pipefail
|
||||||
|
rm -rf /opt/go*
|
||||||
|
msg_ok "Installed Golang"
|
||||||
|
|
||||||
|
msg_info "Setup xCaddy"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
wget -q https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb
|
||||||
|
$STD dpkg -i xcaddy_${RELEASE:1}_linux_amd64.deb
|
||||||
|
rm -rf /opt/xcaddy*
|
||||||
|
$STD xcaddy build
|
||||||
|
msg_ok "Setup xCaddy"
|
||||||
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
|
@ -32,11 +32,15 @@ $STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/de
|
|||||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||||
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
|
|
||||||
msg_ok "Setup PHP8.4 Repository"
|
msg_ok "Setup PHP8.4 Repository"
|
||||||
|
|
||||||
|
msg_info "Setup PHP"
|
||||||
|
$STD apt-get remove -y php8.2*
|
||||||
|
#$STD apt-get remove -y php8.3*
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
php8.4-{mbstring,gd,intl,common,mysql,zip,xml} \
|
php8.3 \
|
||||||
libapache2-mod-php8.4
|
php8.3-{mbstring,gd,intl,common,mysql,zip,xml} \
|
||||||
|
libapache2-mod-php8.3
|
||||||
msg_info "Setup PHP"
|
msg_info "Setup PHP"
|
||||||
|
|
||||||
msg_info "Setting up database"
|
msg_info "Setting up database"
|
||||||
@ -83,6 +87,7 @@ send "helper-scripts.com\r"
|
|||||||
|
|
||||||
expect eof
|
expect eof
|
||||||
EOF
|
EOF
|
||||||
|
$STD composer update --no-interaction
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
msg_ok "Installed Kimai"
|
msg_ok "Installed Kimai"
|
||||||
|
|
||||||
|
91
install/projectsend-install.sh
Normal file
91
install/projectsend-install.sh
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: bvdberg01
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
|
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 \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
mc \
|
||||||
|
mariadb-server \
|
||||||
|
apache2 \
|
||||||
|
libapache2-mod-php \
|
||||||
|
php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip}
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up MariaDB"
|
||||||
|
DB_NAME=projectsend
|
||||||
|
DB_USER=projectsend
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
$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 "projectsend-Credentials"
|
||||||
|
echo "projectsend Database User: $DB_USER"
|
||||||
|
echo "projectsend Database Password: $DB_PASS"
|
||||||
|
echo "projectsend Database Name: $DB_NAME"
|
||||||
|
} >> ~/projectsend.creds
|
||||||
|
msg_ok "Set up MariaDB"
|
||||||
|
|
||||||
|
msg_info "Installing projectsend"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/projectsend/projectsend/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
cd /opt
|
||||||
|
wget -q "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip"
|
||||||
|
mkdir projectsend
|
||||||
|
unzip -q "projectsend-r${RELEASE}.zip" -d projectsend
|
||||||
|
mv /opt/projectsend/includes/sys.config.sample.php /opt/projectsend/includes/sys.config.php
|
||||||
|
chown -R www-data:www-data /opt/projectsend
|
||||||
|
chmod -R 775 /opt/projectsend
|
||||||
|
chmod 644 /opt/projectsend/includes/sys.config.php
|
||||||
|
sed -i -e "s/\(define('DB_NAME', \).*/\1'$DB_NAME');/" \
|
||||||
|
-e "s/\(define('DB_USER', \).*/\1'$DB_USER');/" \
|
||||||
|
-e "s/\(define('DB_PASSWORD', \).*/\1'$DB_PASS');/" \
|
||||||
|
/opt/projectsend/includes/sys.config.php
|
||||||
|
sed -i -e "s/^\(memory_limit = \).*/\1 256M/" \
|
||||||
|
-e "s/^\(post_max_size = \).*/\1 256M/" \
|
||||||
|
-e "s/^\(upload_max_filesize = \).*/\1 256M/" \
|
||||||
|
-e "s/^\(max_execution_time = \).*/\1 300/" \
|
||||||
|
/etc/php/8.2/apache2/php.ini
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed projectsend"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/projectsend.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName projectsend
|
||||||
|
DocumentRoot /opt/projectsend
|
||||||
|
<Directory /opt/projectsend>
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/projectsend_error.log
|
||||||
|
CustomLog /var/log/apache2/projectsend_access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
$STD a2ensite projectsend
|
||||||
|
$STD a2enmod rewrite
|
||||||
|
$STD a2dissite 000-default.conf
|
||||||
|
$STD systemctl reload apache2
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf "/opt/projectsend-r${RELEASE}.zip"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
@ -20,7 +20,7 @@
|
|||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 1,
|
"cpu": 1,
|
||||||
"ram": 512,
|
"ram": 512,
|
||||||
"hdd": 2,
|
"hdd": 4,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "12"
|
||||||
}
|
}
|
||||||
@ -30,5 +30,14 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
}
|
{
|
||||||
|
"text": "if you need an internal module run: `caddy add-package PACKAGENAME`",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "if you need an external module run: `xcaddy build --with github.com/caddy-dns/cloudflare`",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
39
json/projectsend.json
Normal file
39
json/projectsend.json
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"name": "ProjectSend",
|
||||||
|
"slug": "projectsend",
|
||||||
|
"categories": [
|
||||||
|
12
|
||||||
|
],
|
||||||
|
"date_created": "2025-01-20",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 80,
|
||||||
|
"documentation": "https://docs.projectsend.org/",
|
||||||
|
"website": "https://projectsend.org/",
|
||||||
|
"logo": "https://camo.githubusercontent.com/378a455e1cf6f36c5427b2bdfd78b0defd829be9b8c6b073f83931693e1665d5/68747470733a2f2f7777772e70726f6a65637473656e642e6f72672f70726f6a65637473656e642d6c6f676f2d6e65772e706e67",
|
||||||
|
"description": "ProjectSend is a free, open source software that lets you share files with your clients, focused on ease of use and privacy. It supports clients groups, system users roles, statistics, multiple languages, detailed logs... and much more!",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/projectsend.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 1,
|
||||||
|
"ram": 1024,
|
||||||
|
"hdd": 8,
|
||||||
|
"os": "debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "After running the update script, logging in as a system user in ProjectSend is necessary to upgrade the database.",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
### Generated on 01-20-2025
|
### Generated on 01-21-2025
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
### 2fauth.sh
|
### 2fauth.sh
|
||||||
@ -1459,6 +1459,15 @@ APP=PostgreSQL
|
|||||||
/_/ \____/____/\__/\__, /_/ \___/____/\___\_\/_____/
|
/_/ \____/____/\__/\__, /_/ \___/____/\___\_\/_____/
|
||||||
/____/
|
/____/
|
||||||
|
|
||||||
|
### projectsend.sh
|
||||||
|
APP=ProjectSend
|
||||||
|
____ _ __ _____ __
|
||||||
|
/ __ \_________ (_)__ _____/ /_/ ___/___ ____ ____/ /
|
||||||
|
/ /_/ / ___/ __ \ / / _ \/ ___/ __/\__ \/ _ \/ __ \/ __ /
|
||||||
|
/ ____/ / / /_/ / / / __/ /__/ /_ ___/ / __/ / / / /_/ /
|
||||||
|
/_/ /_/ \____/_/ /\___/\___/\__//____/\___/_/ /_/\__,_/
|
||||||
|
/___/
|
||||||
|
|
||||||
### prometheus-alertmanager.sh
|
### prometheus-alertmanager.sh
|
||||||
APP=Prometheus-Alertmanager
|
APP=Prometheus-Alertmanager
|
||||||
____ __ __ ___ __
|
____ __ __ ___ __
|
||||||
|
193
misc/build.func
193
misc/build.func
@ -382,74 +382,167 @@ exit_script() {
|
|||||||
# This function allows the user to configure advanced settings for the script.
|
# This function allows the user to configure advanced settings for the script.
|
||||||
advanced_settings() {
|
advanced_settings() {
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58
|
||||||
if [ "$var_os" != "alpine" ]; then
|
if [ "$var_os" != "alpine" ]; then
|
||||||
|
var_default_os="${var_os}"
|
||||||
var_os=""
|
var_os=""
|
||||||
while [ -z "$var_os" ]; do
|
while [ -z "$var_os" ]; do
|
||||||
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution:" 10 58 2 \
|
if [ "$var_default_os" == "debian" ]; then
|
||||||
"debian" "" OFF \
|
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
|
||||||
"ubuntu" "" OFF \
|
"debian" "" ON \
|
||||||
3>&1 1>&2 2>&3); then
|
"ubuntu" "" OFF \
|
||||||
if [ -n "$var_os" ]; then
|
3>&1 1>&2 2>&3); then
|
||||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
if [ -n "$var_os" ]; then
|
||||||
|
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$var_default_os" == "ubuntu" ]; then
|
||||||
|
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
|
||||||
|
"debian" "" OFF \
|
||||||
|
"ubuntu" "" ON \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
if [ -n "$var_os" ]; then
|
||||||
|
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
exit_script
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$var_os" == "debian" ]; then
|
if [ "$var_os" == "debian" ]; then
|
||||||
|
var_default_version="${var_version}"
|
||||||
var_version=""
|
var_version=""
|
||||||
while [ -z "$var_version" ]; do
|
while [ -z "$var_version" ]; do
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
|
if [ "$var_default_version" == "11" ]; then
|
||||||
"11" "Bullseye" OFF \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
|
||||||
"12" "Bookworm" OFF \
|
"11" "Bullseye" ON \
|
||||||
3>&1 1>&2 2>&3); then
|
"12" "Bookworm" OFF \
|
||||||
if [ -n "$var_version" ]; then
|
3>&1 1>&2 2>&3); then
|
||||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
if [ -n "$var_version" ]; then
|
||||||
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$var_default_version" == "12" ]; then
|
||||||
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
|
||||||
|
"11" "Bullseye" OFF \
|
||||||
|
"12" "Bookworm" ON \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
if [ -n "$var_version" ]; then
|
||||||
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
exit_script
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$var_os" == "ubuntu" ]; then
|
if [ "$var_os" == "ubuntu" ]; then
|
||||||
|
var_default_version="${var_version}"
|
||||||
var_version=""
|
var_version=""
|
||||||
while [ -z "$var_version" ]; do
|
while [ -z "$var_version" ]; do
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
if [ "$var_default_version" == "20.04" ]; then
|
||||||
"20.04" "Focal" OFF \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
"22.04" "Jammy" OFF \
|
"20.04" "Focal" ON \
|
||||||
"24.04" "Noble" OFF \
|
"22.04" "Jammy" OFF \
|
||||||
"24.10" "Oracular" OFF \
|
"24.04" "Noble" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
"24.10" "Oracular" OFF \
|
||||||
if [ -n "$var_version" ]; then
|
3>&1 1>&2 2>&3); then
|
||||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
if [ -n "$var_version" ]; then
|
||||||
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$var_default_version" == "22.04" ]; then
|
||||||
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
|
"20.04" "Focal" OFF \
|
||||||
|
"22.04" "Jammy" ON \
|
||||||
|
"24.04" "Noble" OFF \
|
||||||
|
"24.10" "Oracular" OFF \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
if [ -n "$var_version" ]; then
|
||||||
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$var_default_version" == "24.04" ]; then
|
||||||
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
|
"20.04" "Focal" OFF \
|
||||||
|
"22.04" "Jammy" OFF \
|
||||||
|
"24.04" "Noble" ON \
|
||||||
|
"24.10" "Oracular" OFF \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
if [ -n "$var_version" ]; then
|
||||||
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$var_default_version" == "24.10" ]; then
|
||||||
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
|
"20.04" "Focal" OFF \
|
||||||
|
"22.04" "Jammy" OFF \
|
||||||
|
"24.04" "Noble" OFF \
|
||||||
|
"24.10" "Oracular" ON \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
if [ -n "$var_version" ]; then
|
||||||
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_script
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
exit_script
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
# Setting Default Tag for Advanced Settings
|
# Setting Default Tag for Advanced Settings
|
||||||
TAGS="community-script;${var_tags:-}"
|
TAGS="community-script;${var_tags:-}"
|
||||||
|
CT_DEFAULT_TYPE="${CT_TYPE}"
|
||||||
CT_TYPE=""
|
CT_TYPE=""
|
||||||
while [ -z "$CT_TYPE" ]; do
|
while [ -z "$CT_TYPE" ]; do
|
||||||
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
if [ "$CT_DEFAULT_TYPE" == "1" ]; then
|
||||||
"1" "Unprivileged" OFF \
|
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||||
"0" "Privileged" OFF \
|
"1" "Unprivileged" ON \
|
||||||
3>&1 1>&2 2>&3); then
|
"0" "Privileged" OFF \
|
||||||
if [ -n "$CT_TYPE" ]; then
|
3>&1 1>&2 2>&3); then
|
||||||
CT_TYPE_DESC="Unprivileged"
|
if [ -n "$CT_TYPE" ]; then
|
||||||
if [ "$CT_TYPE" -eq 0 ]; then
|
CT_TYPE_DESC="Unprivileged"
|
||||||
CT_TYPE_DESC="Privileged"
|
if [ "$CT_TYPE" -eq 0 ]; then
|
||||||
|
CT_TYPE_DESC="Privileged"
|
||||||
|
fi
|
||||||
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||||
fi
|
fi
|
||||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
else
|
||||||
|
exit_script
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$CT_DEFAULT_TYPE" == "0" ]; then
|
||||||
|
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||||
|
"1" "Unprivileged" OFF \
|
||||||
|
"0" "Privileged" ON \
|
||||||
|
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
|
||||||
else
|
|
||||||
exit_script
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -597,7 +690,7 @@ advanced_settings() {
|
|||||||
APT_CACHER=""
|
APT_CACHER=""
|
||||||
APT_CACHER_IP=""
|
APT_CACHER_IP=""
|
||||||
else
|
else
|
||||||
if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then
|
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}"
|
APT_CACHER="${APT_CACHER_IP:+yes}"
|
||||||
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
|
||||||
else
|
else
|
||||||
@ -612,7 +705,7 @@ advanced_settings() {
|
|||||||
fi
|
fi
|
||||||
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
||||||
|
|
||||||
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
|
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default [1500])" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
MTU1="Default"
|
MTU1="Default"
|
||||||
MTU=""
|
MTU=""
|
||||||
@ -649,7 +742,7 @@ advanced_settings() {
|
|||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
|
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
|
if [ -z $MAC1 ]; then
|
||||||
MAC1="Default"
|
MAC1="Default"
|
||||||
MAC=""
|
MAC=""
|
||||||
@ -661,7 +754,7 @@ advanced_settings() {
|
|||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
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
|
if [ -z $VLAN1 ]; then
|
||||||
VLAN1="Default"
|
VLAN1="Default"
|
||||||
VLAN=""
|
VLAN=""
|
||||||
@ -675,14 +768,10 @@ advanced_settings() {
|
|||||||
|
|
||||||
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 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
|
if [ -n "${ADV_TAGS}" ]; then
|
||||||
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') # Remove whitespace from ADV_TAGS
|
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]')
|
||||||
if [[ "$ADV_TAGS" != *"community-script"* ]]; then
|
TAGS="${ADV_TAGS}"
|
||||||
TAGS="community-script;${ADV_TAGS}"
|
|
||||||
else
|
|
||||||
TAGS="${ADV_TAGS}" # ADV_TAGS already contains "community-script"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
TAGS="community-script;"
|
TAGS=";"
|
||||||
fi
|
fi
|
||||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user