Compare commits

..

1 Commits

Author SHA1 Message Date
CanbiZ
c724906755 Add helper functions for MariaDB and PostgreSQL setup
Introduces setup_mariadb_db and setup_postgresql_db functions to automate database/user creation, credential management, and optional grants/extensions. Also updates cleanup_lxc to use $STD for cache cleaning commands for consistency.
2025-11-10 16:46:39 +01:00
5 changed files with 95 additions and 94 deletions

View File

@@ -10,26 +10,15 @@
> [!CAUTION] > [!CAUTION]
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes. Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
## 2025-11-11
## 2025-11-10 ## 2025-11-10
### 🚀 Updated Scripts ### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Plex: extend checking for deb822 source [@Matt17000](https://github.com/Matt17000) ([#9036](https://github.com/community-scripts/ProxmoxVE/pull/9036))
- #### ✨ New Features - #### ✨ New Features
- tools.func: add helper functions for MariaDB and PostgreSQL setup [@MickLesk](https://github.com/MickLesk) ([#9026](https://github.com/community-scripts/ProxmoxVE/pull/9026))
- core: update message for no available updates scenario (if pinned) [@MickLesk](https://github.com/MickLesk) ([#9021](https://github.com/community-scripts/ProxmoxVE/pull/9021)) - core: update message for no available updates scenario (if pinned) [@MickLesk](https://github.com/MickLesk) ([#9021](https://github.com/community-scripts/ProxmoxVE/pull/9021))
- Migrate Open WebUI to uv-based installation [@MickLesk](https://github.com/MickLesk) ([#9019](https://github.com/community-scripts/ProxmoxVE/pull/9019)) - Migrate Open WebUI to uv-based installation [@MickLesk](https://github.com/MickLesk) ([#9019](https://github.com/community-scripts/ProxmoxVE/pull/9019))
- #### 🔧 Refactor
- Refactor: phpIPAM [@MickLesk](https://github.com/MickLesk) ([#9027](https://github.com/community-scripts/ProxmoxVE/pull/9027))
## 2025-11-09 ## 2025-11-09
### 🚀 Updated Scripts ### 🚀 Updated Scripts

View File

@@ -33,22 +33,17 @@ function update_script() {
systemctl stop apache2 systemctl stop apache2
msg_ok "Stopped Service" msg_ok "Stopped Service"
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql,gmp,snmp,ldap,apcu" setup_php
msg_info "Installing PHP-PEAR"
$STD apt install -y \
php-pear \
php-dev
msg_ok "Installed PHP-PEAR"
mv /opt/phpipam/ /opt/phpipam-backup mv /opt/phpipam/ /opt/phpipam-backup
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "phpipam" "phpipam/phpipam" "prebuild" "latest" "/opt/phpipam" "phpipam-v*.zip" fetch_and_deploy_gh_release "phpipam" "phpipam/phpipam" "prebuild" "latest" "/opt/phpipam" "phpipam-v*.zip"
cp /opt/phpipam-backup/config.php /opt/phpipam cp /opt/phpipam-backup/config.php /opt/phpipam
rm -r /opt/phpipam-backup
msg_info "Starting Service" msg_info "Starting Service"
systemctl start apache2 systemctl start apache2
msg_ok "Started Service" msg_ok "Started Service"
msg_info "Cleaning up"
rm -r /opt/phpipam-backup
msg_ok "Cleaned"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
fi fi
exit exit

View File

@@ -23,7 +23,7 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]] && [[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi

View File

@@ -1,68 +1,18 @@
[ [
{ {
"name": "chrisvel/tududi", "name": "dgtlmoon/changedetection.io",
"version": "v0.86", "version": "0.50.41",
"date": "2025-11-10T20:54:25Z" "date": "2025-11-10T11:00:46Z"
}, },
{ {
"name": "pommee/goaway", "name": "emqx/emqx",
"version": "v0.62.17", "version": "e5.10.2",
"date": "2025-11-10T19:45:49Z" "date": "2025-11-10T10:58:21Z"
},
{
"name": "chrisbenincasa/tunarr",
"version": "v0.22.13",
"date": "2025-11-10T18:12:24Z"
}, },
{ {
"name": "autobrr/autobrr", "name": "autobrr/autobrr",
"version": "v1.69.0", "version": "v1.69.0",
"date": "2025-11-10T17:22:00Z" "date": "2025-11-10T10:57:40Z"
},
{
"name": "meilisearch/meilisearch",
"version": "latest",
"date": "2025-11-10T17:01:21Z"
},
{
"name": "gtsteffaniak/filebrowser",
"version": "v1.0.1-stable",
"date": "2025-11-10T16:51:44Z"
},
{
"name": "msgbyte/tianji",
"version": "v1.30.9",
"date": "2025-11-10T16:23:29Z"
},
{
"name": "fuma-nama/fumadocs",
"version": "fumadocs-mdx@13.0.6",
"date": "2025-11-10T14:43:06Z"
},
{
"name": "n8n-io/n8n",
"version": "v1.0.0",
"date": "2025-11-07T12:52:42Z"
},
{
"name": "grokability/snipe-it",
"version": "v8.3.5",
"date": "2025-11-10T14:12:12Z"
},
{
"name": "SigNoz/signoz",
"version": "v0.101.0-rc.1",
"date": "2025-11-10T13:08:55Z"
},
{
"name": "dgtlmoon/changedetection.io",
"version": "0.50.42",
"date": "2025-11-10T12:32:49Z"
},
{
"name": "emqx/emqx",
"version": "e6.0.1",
"date": "2025-11-10T11:58:39Z"
}, },
{ {
"name": "documenso/documenso", "name": "documenso/documenso",
@@ -124,6 +74,11 @@
"version": "v2.4.5", "version": "v2.4.5",
"date": "2025-11-09T17:14:01Z" "date": "2025-11-09T17:14:01Z"
}, },
{
"name": "msgbyte/tianji",
"version": "v1.30.7",
"date": "2025-11-09T16:20:57Z"
},
{ {
"name": "TechnitiumSoftware/DnsServer", "name": "TechnitiumSoftware/DnsServer",
"version": "v14.0.1", "version": "v14.0.1",
@@ -199,16 +154,31 @@
"version": "v7.13.0", "version": "v7.13.0",
"date": "2025-11-08T13:36:25Z" "date": "2025-11-08T13:36:25Z"
}, },
{
"name": "pommee/goaway",
"version": "v0.62.16",
"date": "2025-11-08T12:15:30Z"
},
{ {
"name": "runtipi/runtipi", "name": "runtipi/runtipi",
"version": "v4.6.3", "version": "v4.6.3",
"date": "2025-11-08T10:06:18Z" "date": "2025-11-08T10:06:18Z"
}, },
{
"name": "fuma-nama/fumadocs",
"version": "fumadocs-openapi@10.0.2",
"date": "2025-11-08T09:58:09Z"
},
{ {
"name": "pocketbase/pocketbase", "name": "pocketbase/pocketbase",
"version": "v0.32.0", "version": "v0.32.0",
"date": "2025-11-08T09:36:27Z" "date": "2025-11-08T09:36:27Z"
}, },
{
"name": "chrisvel/tududi",
"version": "v0.85.1",
"date": "2025-10-31T10:45:26Z"
},
{ {
"name": "home-assistant/core", "name": "home-assistant/core",
"version": "2025.11.1", "version": "2025.11.1",
@@ -249,6 +219,11 @@
"version": "v0.16.0", "version": "v0.16.0",
"date": "2025-11-07T12:55:42Z" "date": "2025-11-07T12:55:42Z"
}, },
{
"name": "n8n-io/n8n",
"version": "v1.0.0",
"date": "2025-11-07T12:52:42Z"
},
{ {
"name": "element-hq/synapse", "name": "element-hq/synapse",
"version": "v1.142.0rc2", "version": "v1.142.0rc2",
@@ -294,6 +269,11 @@
"version": "v2.19.5", "version": "v2.19.5",
"date": "2025-11-06T20:20:13Z" "date": "2025-11-06T20:20:13Z"
}, },
{
"name": "chrisbenincasa/tunarr",
"version": "v0.22.12",
"date": "2025-11-06T18:43:51Z"
},
{ {
"name": "MariaDB/server", "name": "MariaDB/server",
"version": "mariadb-11.8.4", "version": "mariadb-11.8.4",
@@ -314,11 +294,21 @@
"version": "v2025.11.2", "version": "v2025.11.2",
"date": "2025-11-06T12:08:24Z" "date": "2025-11-06T12:08:24Z"
}, },
{
"name": "meilisearch/meilisearch",
"version": "prototype-v1.24.0.s3-snapshots-5",
"date": "2025-11-06T11:43:12Z"
},
{ {
"name": "transmission/transmission", "name": "transmission/transmission",
"version": "4.0.1-beta.1", "version": "4.0.1-beta.1",
"date": "2024-12-13T00:16:24Z" "date": "2024-12-13T00:16:24Z"
}, },
{
"name": "SigNoz/signoz",
"version": "v0.100.1",
"date": "2025-11-06T07:53:11Z"
},
{ {
"name": "apache/tomcat", "name": "apache/tomcat",
"version": "9.0.112", "version": "9.0.112",
@@ -357,7 +347,7 @@
{ {
"name": "javedh-dev/tracktor", "name": "javedh-dev/tracktor",
"version": "0.5.1", "version": "0.5.1",
"date": "2025-11-05T16:14:37Z" "date": "2025-11-05T15:51:02Z"
}, },
{ {
"name": "zitadel/zitadel", "name": "zitadel/zitadel",
@@ -494,6 +484,11 @@
"version": "v25.11.0", "version": "v25.11.0",
"date": "2025-11-04T00:32:21Z" "date": "2025-11-04T00:32:21Z"
}, },
{
"name": "gtsteffaniak/filebrowser",
"version": "v1.0.0-stable",
"date": "2025-11-03T22:24:23Z"
},
{ {
"name": "jupyter/notebook", "name": "jupyter/notebook",
"version": "@jupyter-notebook/ui-components@7.5.0-rc.0", "version": "@jupyter-notebook/ui-components@7.5.0-rc.0",
@@ -849,6 +844,11 @@
"version": "0.20.4", "version": "0.20.4",
"date": "2025-10-18T10:00:42Z" "date": "2025-10-18T10:00:42Z"
}, },
{
"name": "grokability/snipe-it",
"version": "v8.3.4",
"date": "2025-10-17T18:13:24Z"
},
{ {
"name": "NodeBB/NodeBB", "name": "NodeBB/NodeBB",
"version": "v4.6.1", "version": "v4.6.1",

View File

@@ -13,27 +13,39 @@ setting_up_container
network_check network_check
update_os update_os
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql,gmp,snmp,ldap,apcu" setup_php msg_info "Installing Dependencies"
$STD apt install -y php-pear
msg_info "Installing PHP-PEAR" msg_ok "Installed Dependencies"
$STD apt install -y \
php-pear \
php-dev
msg_ok "Installed PHP-PEAR"
PHP_VERSION="8.2" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql,imap,apcu,pspell,tidy,xmlrpc,gmp,ldap,common,snmp" setup_php
setup_mariadb setup_mariadb
MARIADB_DB_NAME="phpipam" MARIADB_DB_USER="phpipam" setup_mariadb_db
msg_info "Setting up MariaDB"
DB_NAME=phpipam
DB_USER=phpipam
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "phpIPAM-Credentials"
echo "phpIPAM Database User: $DB_USER"
echo "phpIPAM Database Password: $DB_PASS"
echo "phpIPAM Database Name: $DB_NAME"
} >>~/phpipam.creds
msg_ok "Set up MariaDB"
fetch_and_deploy_gh_release "phpipam" "phpipam/phpipam" "prebuild" "latest" "/opt/phpipam" "phpipam-v*.zip" fetch_and_deploy_gh_release "phpipam" "phpipam/phpipam" "prebuild" "latest" "/opt/phpipam" "phpipam-v*.zip"
msg_info "Installing phpIPAM" msg_info "Installing phpIPAM"
$STD mariadb -u root "${MARIADB_DB_NAME}" </opt/phpipam/db/SCHEMA.sql $STD mariadb -u root "${DB_NAME}" </opt/phpipam/db/SCHEMA.sql
cp /opt/phpipam/config.dist.php /opt/phpipam/config.php cp /opt/phpipam/config.dist.php /opt/phpipam/config.php
sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \ sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \
-e "s/\(\$db\['user'\] = \).*/\1'$MARIADB_DB_USER';/" \ -e "s/\(\$db\['user'\] = \).*/\1'$DB_USER';/" \
-e "s/\(\$db\['pass'\] = \).*/\1'$MARIADB_DB_PASS';/" \ -e "s/\(\$db\['pass'\] = \).*/\1'$DB_PASS';/" \
-e "s/\(\$db\['name'\] = \).*/\1'$MARIADB_DB_NAME';/" \ -e "s/\(\$db\['name'\] = \).*/\1'$DB_NAME';/" \
/opt/phpipam/config.php /opt/phpipam/config.php
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.4/apache2/php.ini sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini
msg_ok "Installed phpIPAM" msg_ok "Installed phpIPAM"
msg_info "Creating Service" msg_info "Creating Service"
@@ -59,4 +71,9 @@ msg_ok "Created Service"
motd_ssh motd_ssh
customize customize
cleanup_lxc
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned"