Compare commits

..

3 Commits

Author SHA1 Message Date
CanbiZ
4008ec5439 Update linkwarden.sh 2025-05-27 15:54:32 +02:00
CanbiZ
ecc96cb327 update fetch_and_deploy function 2025-05-27 15:54:03 +02:00
CanbiZ
e9da20f40e Refactor: Linkwarden + OS Upgrade 2025-05-27 14:35:37 +02:00
40 changed files with 249 additions and 610 deletions

View File

@ -18,13 +18,10 @@ All LXC instances created using this repository come pre-installed with Midnight
### 🆕 New Scripts
- Backrest ([#4766](https://github.com/community-scripts/ProxmoxVE/pull/4766))
- Pulse ([#4728](https://github.com/community-scripts/ProxmoxVE/pull/4728))
- Pulse ([#4728](https://github.com/community-scripts/ProxmoxVE/pull/4728))
### 🚀 Updated Scripts
- Alpine-Vaultwarden: Increase min disk requirements to 1GB [@neyzm](https://github.com/neyzm) ([#4764](https://github.com/community-scripts/ProxmoxVE/pull/4764))
- #### 🐞 Bug Fixes
- lldap: fix update-check [@MickLesk](https://github.com/MickLesk) ([#4742](https://github.com/community-scripts/ProxmoxVE/pull/4742))
@ -33,17 +30,6 @@ All LXC instances created using this repository come pre-installed with Midnight
- Big NodeJS Update: Use Helper Function on all Install-Scripts [@MickLesk](https://github.com/MickLesk) ([#4744](https://github.com/community-scripts/ProxmoxVE/pull/4744))
- #### 🔧 Refactor
- merge MariaDB to tools.func Installer [@MickLesk](https://github.com/MickLesk) ([#4753](https://github.com/community-scripts/ProxmoxVE/pull/4753))
- merge PostgreSQL to tools.func Installer [@MickLesk](https://github.com/MickLesk) ([#4752](https://github.com/community-scripts/ProxmoxVE/pull/4752))
### 🌐 Website
- #### 📝 Script Information
- Increase default RAM allocation for BunkerWeb to 8192MB [@TheophileDiot](https://github.com/TheophileDiot) ([#4762](https://github.com/community-scripts/ProxmoxVE/pull/4762))
## 2025-05-26
### 🆕 New Scripts

View File

@ -9,7 +9,7 @@ APP="Alpine-Vaultwarden"
var_tags="${var_tags:-alpine;vault}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-256}"
var_disk="${var_disk:-1}"
var_disk="${var_disk:-0.5}"
var_os="${var_os:-alpine}"
var_version="${var_version:-3.21}"
var_unprivileged="${var_unprivileged:-1}"

View File

@ -1,66 +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: ksad (enirys31)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://garethgeorge.github.io/backrest/
APP="Backrest"
var_tags="${var_tags:-backup}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-8}"
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/backrest ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/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 ${APP}"
systemctl stop backrest
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP} to ${RELEASE}"
temp_file=$(mktemp)
rm -f /opt/backrest/bin/backrest
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "$temp_file"
tar xzf $temp_file -C /opt/backrest/bin
chmod +x /opt/backrest/bin/backrest
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP}"
systemctl start backrest
msg_ok "Started ${APP}"
msg_info "Cleaning up"
rm -f "$temp_file"
msg_ok "Cleaned up"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${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}:9898${CL}"

View File

@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="BunkerWeb"
var_tags="${var_tags:-webserver}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-8192}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"

View File

@ -1,6 +0,0 @@
____ __ __
/ __ )____ ______/ /__________ _____/ /_
/ __ / __ `/ ___/ //_/ ___/ _ \/ ___/ __/
/ /_/ / /_/ / /__/ ,< / / / __(__ ) /_
/_____/\__,_/\___/_/|_/_/ \___/____/\__/

View File

@ -1,17 +1,17 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://linkwarden.app/
APP="Linkwarden"
var_tags="${var_tags:-bookmark}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-12}"
var_os="${var_os:-ubuntu}"
var_version="${var_version:-22.04}"
var_version="${var_version:-24.04}"
header_info "$APP"
variables
@ -27,48 +27,36 @@ function update_script() {
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
NODE_VERSION="22"
NODE_MODULE="yarn@latest"
install_node_and_modules
if [[ "${RELEASE}" != "$(cat /opt/linkwarden_version.txt)" ]] || [[ ! -f /opt/linkwarden_version.txt ]]; then
NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules
msg_info "Stopping ${APP}"
systemctl stop linkwarden
msg_ok "Stopped ${APP}"
msg_info "Updating Rust"
$STD apt-get install -y build-essential
$STD curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
echo 'export PATH=/usr/local/cargo/bin:$PATH' >>/etc/profile
source /etc/profile
$STD cargo install monolith
msg_ok "Updated Rust"
RUST_CRATES="monolith" install_rust_and_crates
msg_info "Updating ${APP} to ${RELEASE}"
cd /opt
mv /opt/linkwarden/.env /opt/.env
rm -rf /opt/linkwarden
RELEASE=$(curl -fsSL https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip" -o ${RELEASE}.zip
unzip -q ${RELEASE}.zip
mv linkwarden-${RELEASE:1} /opt/linkwarden
fetch_and_deploy_gh_release "linkwarden/linkwarden"
cd /opt/linkwarden
$STD yarn
$STD npx playwright install-deps
$STD yarn playwright install
cp /opt/.env /opt/linkwarden/.env
mv /opt/.env /opt/linkwarden/.env
$STD yarn prisma:generate
$STD yarn web:build
$STD yarn prisma:deploy
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP}"
systemctl start linkwarden
msg_ok "Started ${APP}"
msg_info "Cleaning up"
rm -rf /opt/${RELEASE}.zip
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache ~/.rustup
rm -rf /root/.cache/yarn
rm -rf /opt/linkwarden/.next/cache
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else

View File

@ -1,40 +0,0 @@
{
"name": "Backrest",
"slug": "backrest",
"categories": [
7
],
"date_created": "2025-05-27",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 9898,
"documentation": "https://garethgeorge.github.io/backrest/introduction/getting-started",
"website": "https://garethgeorge.github.io/backrest",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/backrest.webp",
"config_path": "/opt/backrest/config/config.json",
"description": "Backrest is a web-accessible backup solution built on top of restic and providing a WebUI which wraps the restic CLI and makes it easy to create repos, browse snapshots, and restore files. Additionally, Backrest can run in the background and take an opinionated approach to scheduling snapshots and orchestrating repo health operations.",
"install_methods": [
{
"type": "default",
"script": "ct/backrest.sh",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 8,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"type": "info",
"text": "`cat ~/.ssh/id_ed25519.pub` to view ssh public key. This key is used to authenticate with sftp targets. You can add this key on the sftp server."
}
]
}

View File

@ -20,7 +20,7 @@
"script": "ct/bunkerweb.sh",
"resources": {
"cpu": 2,
"ram": 8192,
"ram": 4096,
"hdd": 4,
"os": "debian",
"version": "12"

View File

@ -23,7 +23,7 @@
"ram": 2048,
"hdd": 12,
"os": "ubuntu",
"version": "22.04"
"version": "24.04"
}
}
],

View File

@ -32,7 +32,7 @@
"resources": {
"cpu": 1,
"ram": 256,
"hdd": 1,
"hdd": 0.5,
"os": "alpine",
"version": "3.21"
}

View File

@ -14,8 +14,11 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
lsb-release
lsb-release \
gpg
curl -fsSL https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/deb.sury.org-php.gpg
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
@ -23,11 +26,10 @@ $STD apt-get update
$STD apt-get install -y \
nginx \
composer \
php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,intl,mbstring,mysql,xml,cli}
php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,intl,mbstring,mysql,xml,cli} \
mariadb-server
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Database"
DB_NAME=2fauth_db
DB_USER=2fauth

View File

@ -25,9 +25,10 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules
PG_VERSION="16" PG_MODULES="postgis" install_postgresql
PG_VERSION="16" install_postgresql
msg_info "Set up PostgreSQL Database"
msg_info "Install/Set up PostgreSQL Database"
$STD apt-get install -y postgresql-16-postgis
DB_NAME="adventurelog_db"
DB_USER="adventurelog_user"
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"

View File

@ -14,32 +14,31 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
build-essential \
jq \
libcairo2-dev \
libturbojpeg0 \
libpng-dev \
libtool-bin \
libossp-uuid-dev \
libvncserver-dev \
freerdp2-dev \
libssh2-1-dev \
libtelnet-dev \
libwebsockets-dev \
libpulse-dev \
libvorbis-dev \
libwebp-dev \
libssl-dev \
libpango1.0-dev \
libswscale-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
default-jdk
build-essential \
jq \
libcairo2-dev \
libturbojpeg0 \
libpng-dev \
libtool-bin \
libossp-uuid-dev \
libvncserver-dev \
freerdp2-dev \
libssh2-1-dev \
libtelnet-dev \
libwebsockets-dev \
libpulse-dev \
libvorbis-dev \
libwebp-dev \
libssl-dev \
libpango1.0-dev \
libswscale-dev \
libavcodec-dev \
libavutil-dev \
libavformat-dev \
mariadb-server \
default-jdk
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setup Apache Tomcat"
RELEASE=$(curl -fsSL https://dlcdn.apache.org/tomcat/tomcat-9/ | grep -oP '(?<=href=")v[^"/]+(?=/")' | sed 's/^v//' | sort -V | tail -n1)
mkdir -p /opt/apache-guacamole/tomcat9
@ -80,19 +79,19 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;"
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "Guacamole-Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
echo "Guacamole-Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >>~/guacamole.creds
cd guacamole-auth-jdbc-1.5.5/mysql/schema
cat *.sql | mysql -u root ${DB_NAME}
{
echo "mysql-hostname: 127.0.0.1"
echo "mysql-port: 3306"
echo "mysql-database: $DB_NAME"
echo "mysql-username: $DB_USER"
echo "mysql-password: $DB_PASS"
echo "mysql-hostname: 127.0.0.1"
echo "mysql-port: 3306"
echo "mysql-database: $DB_NAME"
echo "mysql-username: $DB_USER"
echo "mysql-password: $DB_PASS"
} >>/etc/guacamole/guacamole.properties
msg_ok "Setup Database"

View File

@ -37,7 +37,7 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies"
setup_uv
PG_VERSION="16" PG_MODULES="contrib" install_postgresql
PG_VERSION="16" install_postgresql
NODE_VERSION="22" install_node_and_modules
install_go
@ -61,7 +61,8 @@ cat <<EOF >/etc/GeoIP.conf
EOF
msg_ok "Installed GeoIP"
msg_info "Setup PostgreSQL Database"
msg_info "Installing PostgreSQL"
$STD apt-get install -y postgresql-16 postgresql-contrib-16
DB_NAME="authentik"
DB_USER="authentik"
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"

View File

@ -1,54 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: ksad (enirys31)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://garethgeorge.github.io/backrest/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Backrest"
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
temp_file=$(mktemp)
mkdir -p /opt/backrest/{bin,config,data}
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "$temp_file"
tar xzf $temp_file -C /opt/backrest/bin
chmod +x /opt/backrest/bin/backrest
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Backrest"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/backrest.service
[Unit]
Description=Backrest
After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/backrest/bin/backrest
Environment="BACKREST_PORT=9898"
Environment="BACKREST_CONFIG=/opt/backrest/config/config.json"
Environment="BACKREST_DATA=/opt/backrest/data"
Environment="XDG_CACHE_HOME=/opt/backrest/cache"
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now backrest
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"

View File

@ -15,26 +15,25 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
apache2 \
libapache2-mod-php \
php-{pgsql,dom}
postgresql \
apache2 \
libapache2-mod-php \
php-{pgsql,dom}
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
msg_info "Setting up PostgreSQL Database"
msg_info "Setting up PostgreSQL"
DB_NAME=baikal
DB_USER=baikal
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
{
echo "Baikal Credentials"
echo "Baikal Database User: $DB_USER"
echo "Baikal Database Password: $DB_PASS"
echo "Baikal Database Name: $DB_NAME"
echo "Baikal Credentials"
echo "Baikal Database User: $DB_USER"
echo "Baikal Database Password: $DB_PASS"
echo "Baikal Database Name: $DB_NAME"
} >>~/baikal.creds
msg_ok "Set up PostgreSQL Database"
msg_ok "Set up PostgreSQL"
msg_info "Installing Baikal"
RELEASE=$(curl -fsSL https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')

View File

@ -15,16 +15,15 @@ update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
unzip \
apache2 \
php8.2-{mbstring,gd,fpm,curl,intl,ldap,tidy,bz2,mysql,zip,xml} \
composer \
libapache2-mod-php \
make
unzip \
mariadb-server \
apache2 \
php8.2-{mbstring,gd,fpm,curl,intl,ldap,tidy,bz2,mysql,zip,xml} \
composer \
libapache2-mod-php \
make
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Database"
DB_NAME=bookstack
DB_USER=bookstack
@ -33,10 +32,10 @@ $STD sudo mysql -u root -e "CREATE DATABASE $DB_NAME;"
$STD sudo mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
$STD sudo mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "Bookstack-Credentials"
echo "Bookstack Database User: $DB_USER"
echo "Bookstack Database Password: $DB_PASS"
echo "Bookstack Database Name: $DB_NAME"
echo "Bookstack-Credentials"
echo "Bookstack Database User: $DB_USER"
echo "Bookstack Database Password: $DB_PASS"
echo "Bookstack Database Name: $DB_NAME"
} >>~/bookstack.creds
msg_ok "Set up database"

View File

@ -16,11 +16,10 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
php-imap \
debconf-utils
debconf-utils \
mariadb-server
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Database"
ROOT_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$ROOT_PASS'); flush privileges;"

View File

@ -18,14 +18,13 @@ curl -fsSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/p
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" >/etc/apt/sources.list.d/php.list
$STD apt-get update
$STD apt-get install -y \
apache2 \
libapache2-mod-php8.4 \
php8.4-{bcmath,cli,intl,curl,zip,gd,xml,mbstring,mysql} \
composer
apache2 \
libapache2-mod-php8.4 \
php8.4-{bcmath,cli,intl,curl,zip,gd,xml,mbstring,mysql} \
mariadb-server \
composer
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up database"
DB_NAME=firefly
DB_USER=firefly
@ -35,10 +34,10 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;"
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "Firefly-Credentials"
echo "Firefly Database User: $DB_USER"
echo "Firefly Database Password: $DB_PASS"
echo "Firefly Database Name: $DB_NAME"
echo "Firefly-Credentials"
echo "Firefly Database User: $DB_USER"
echo "Firefly Database Password: $DB_PASS"
echo "Firefly Database Name: $DB_NAME"
} >>~/firefly.creds
msg_ok "Set up database"

View File

@ -15,13 +15,12 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
postgresql \
apache2 \
php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \
libapache2-mod-php
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
msg_info "Setting up PostgreSQL"
DB_NAME=freshrss
DB_USER=freshrss

View File

@ -16,11 +16,10 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
nginx \
mariadb-server \
ca-certificates
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Configuring Database"
DB_NAME=ghost
DB_USER=ghostuser

View File

@ -15,15 +15,14 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
git \
apache2 \
php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \
php-cas \
libapache2-mod-php
git \
apache2 \
php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \
php-cas \
libapache2-mod-php \
mariadb-server
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up database"
DB_NAME=glpi_db
DB_USER=glpi
@ -34,10 +33,10 @@ mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';"
mysql -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "GLPI Database Credentials"
echo "Database: $DB_NAME"
echo "Username: $DB_USER"
echo "Password: $DB_PASS"
echo "GLPI Database Credentials"
echo "Database: $DB_NAME"
echo "Username: $DB_USER"
echo "Password: $DB_PASS"
} >>~/glpi_db.creds
msg_ok "Set up database"

View File

@ -20,11 +20,10 @@ $STD apt-get install -y \
git \
expect \
composer \
mariadb-server \
lsb-release
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Adding PHP8.4 Repository"
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb

View File

@ -1,8 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# Co-Author: MickLesk (Canbiz)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://linkwarden.app/
@ -17,25 +16,12 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
make \
git \
build-essential \
cargo
build-essential
msg_ok "Installed Dependencies"
NODE_VERSION="22"
NODE_MODULE="yarn@latest"
install_node_and_modules
PG_VERSION="15"
install_postgresql
msg_info "Installing Rust"
curl -fsSL https://sh.rustup.rs -o rustup-init.sh
$STD bash rustup-init.sh -y --profile minimal
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>~/.bashrc
export PATH="$HOME/.cargo/bin:$PATH"
rm rustup-init.sh
$STD cargo install monolith
msg_ok "Installed Rust"
NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules
PG_VERSION="16" install_postgresql
RUST_CRATES="monolith" install_rust_and_crates
msg_info "Setting up PostgreSQL DB"
DB_NAME=linkwardendb
@ -58,50 +44,24 @@ msg_ok "Set up PostgreSQL DB"
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer"
$STD apt install -y adminer
$STD a2enconf adminer
systemctl reload apache2
IP=$(hostname -I | awk '{print $1}')
echo "" >>~/linkwarden.creds
echo -e "Adminer Interface: \e[32m$IP/adminer/\e[0m" >>~/linkwarden.creds
echo -e "Adminer System: \e[32mPostgreSQL\e[0m" >>~/linkwarden.creds
echo -e "Adminer Server: \e[32mlocalhost:5432\e[0m" >>~/linkwarden.creds
echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds
echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds
echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds
{
echo ""
echo "Adminer-Credentials"
echo "Adminer WebUI: $IP/adminer/"
echo "Adminer Database User: $DB_USER"
echo "Adminer Database Password: $DB_PASS"
echo "Adminer Database Name: $DB_NAME"
} >>~/linkwarden.creds
msg_ok "Installed Adminer"
install_adminer
fi
msg_info "Installing Linkwarden (Patience)"
cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip" -o ${RELEASE}.zip
unzip -q ${RELEASE}.zip
mv linkwarden-${RELEASE:1} /opt/linkwarden
fetch_and_deploy_gh_release "linkwarden/linkwarden"
cd /opt/linkwarden
$STD yarn
$STD npx playwright install-deps
$STD yarn playwright install
IP=$(hostname -I | awk '{print $1}')
env_path="/opt/linkwarden/.env"
echo "
cat <<EOF >/opt/linkwarden/.env
NEXTAUTH_SECRET=${SECRET_KEY}
NEXTAUTH_URL=http://${IP}:3000
DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}
" >$env_path
EOF
$STD yarn prisma:generate
$STD yarn web:build
$STD yarn prisma:deploy
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Linkwarden"
msg_info "Creating Service"
@ -126,7 +86,9 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/${RELEASE}.zip
rm -rf ~/.cargo/registry ~/.cargo/git ~/.cargo/.package-cache ~/.rustup
rm -rf /root/.cache/yarn
rm -rf /opt/linkwarden/.next/cache
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@ -13,12 +13,11 @@ setting_up_container
network_check
update_os
install_mariadb
msg_info "Setup MariaDB"
msg_info "Installing MariaDB"
$STD apt-get install -y mariadb-server
sed -i 's/^# *\(port *=.*\)/\1/' /etc/mysql/my.cnf
sed -i 's/^bind-address/#bind-address/g' /etc/mysql/mariadb.conf.d/50-server.cnf
msg_ok "Setup MariaDB"
msg_ok "Installed MariaDB"
read -r -p "${TAB3}Would you like to add PhpMyAdmin? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then

View File

@ -15,13 +15,13 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
mariadb-server \
apache2 \
libapache2-mod-php \
php-{bcmath,curl,dom,gd,gmp,iconv,intl,json,mbstring,mysqli,opcache,pdo-mysql,redis,tokenizer,xml,zip} \
composer
msg_ok "Installed Dependencies"
install_mariadb
NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules
msg_info "Setting up MariaDB"

View File

@ -17,6 +17,7 @@ msg_info "Installing Dependencies"
$STD apt-get install -y \
apache2 \
redis-server \
postgresql \
build-essential \
libxml2-dev \
libxslt1-dev \
@ -26,8 +27,6 @@ $STD apt-get install -y \
zlib1g-dev
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
msg_info "Installing Python"
$STD apt-get install -y \
python3 \

View File

@ -16,6 +16,7 @@ update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
redis \
postgresql \
build-essential \
imagemagick \
fonts-liberation \
@ -36,8 +37,6 @@ $STD apt-get install -y \
libleptonica-dev
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
msg_info "Setup Python3"
$STD apt-get install -y \
python3 \

View File

@ -15,16 +15,16 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
git \
software-properties-common \
apt-transport-https \
ca-certificates \
nginx \
redis-server
git \
software-properties-common \
apt-transport-https \
ca-certificates \
gnupg2 \
mariadb-server \
nginx \
redis-server
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Adding PHP Repository"
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
@ -35,8 +35,8 @@ msg_ok "Added PHP Repository"
msg_info "Installing PHP"
$STD apt-get remove -y php8.2*
$STD apt-get install -y \
php8.3 \
php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm,redis}
php8.3 \
php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm,redis}
msg_info "Installed PHP"
msg_info "Installing Composer"
@ -62,10 +62,10 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;"
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;"
{
echo "Paymenter Database Credentials"
echo "Database: $DB_NAME"
echo "Username: $DB_USER"
echo "Password: $DB_PASS"
echo "Paymenter Database Credentials"
echo "Database: $DB_NAME"
echo "Username: $DB_USER"
echo "Password: $DB_PASS"
} >>~/paymenter_db.creds
cp .env.example .env
$STD composer install --no-dev --optimize-autoloader --no-interaction

View File

@ -16,12 +16,12 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
lsb-release \
mariadb-server \
mariadb-client \
apache2 \
composer
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Adding PHP8.4 Repository"
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb

View File

@ -15,14 +15,13 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
apache2 \
libapache2-mod-php \
php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \
php-pear
mariadb-server \
apache2 \
libapache2-mod-php \
php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \
php-pear
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up MariaDB"
DB_NAME=phpipam
DB_USER=phpipam
@ -31,10 +30,10 @@ $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 "phpIPAM-Credentials"
echo "phpIPAM Database User: $DB_USER"
echo "phpIPAM Database Password: $DB_PASS"
echo "phpIPAM Database Name: $DB_NAME"
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"
@ -46,10 +45,10 @@ unzip -q "phpipam-v${RELEASE}.zip"
mysql -u root "${DB_NAME}" </opt/phpipam/db/SCHEMA.sql
cp /opt/phpipam/config.dist.php /opt/phpipam/config.php
sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \
-e "s/\(\$db\['user'\] = \).*/\1'$DB_USER';/" \
-e "s/\(\$db\['pass'\] = \).*/\1'$DB_PASS';/" \
-e "s/\(\$db\['name'\] = \).*/\1'$DB_NAME';/" \
/opt/phpipam/config.php
-e "s/\(\$db\['user'\] = \).*/\1'$DB_USER';/" \
-e "s/\(\$db\['pass'\] = \).*/\1'$DB_PASS';/" \
-e "s/\(\$db\['name'\] = \).*/\1'$DB_NAME';/" \
/opt/phpipam/config.php
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed phpIPAM"

View File

@ -15,12 +15,12 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
redis \
nginx
gnupg2 \
mariadb-server \
redis \
nginx
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Adoptium Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg
@ -41,10 +41,10 @@ $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 "Plant-it Credentials"
echo "Plant-it Database User: $DB_USER"
echo "Plant-it Database Password: $DB_PASS"
echo "Plant-it Database Name: $DB_NAME"
echo "Plant-it Credentials"
echo "Plant-it Database User: $DB_USER"
echo "Plant-it Database Password: $DB_PASS"
echo "Plant-it Database Name: $DB_NAME"
} >>~/plant-it.creds
msg_ok "Set up MariaDB"

View File

@ -13,7 +13,19 @@ setting_up_container
network_check
update_os
PG_VERSION="17" install_postgresql
msg_info "Installing Dependencies"
$STD apt-get install -y gnupg
msg_ok "Installed Dependencies"
msg_info "Setting up PostgreSQL Repository"
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
msg_ok "Setup PostgreSQL Repository"
msg_info "Installing PostgreSQL"
$STD apt-get update
$STD apt-get install -y postgresql
cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
# PostgreSQL Client Authentication Configuration File
@ -115,7 +127,7 @@ default_text_search_config = 'pg_catalog.english'
include_dir = 'conf.d'
EOF
systemctl restart postgresql
sudo systemctl restart postgresql
msg_ok "Installed PostgreSQL"
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt

View File

@ -15,13 +15,12 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
apache2 \
libapache2-mod-php \
php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip}
mariadb-server \
apache2 \
libapache2-mod-php \
php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip}
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up MariaDB"
DB_NAME=projectsend
DB_USER=projectsend
@ -30,10 +29,10 @@ $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"
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"
@ -48,14 +47,14 @@ 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
-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
-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"

View File

@ -17,12 +17,12 @@ msg_info "Installing Dependencies"
$STD apt-get install -y \
lsb-release \
redis \
mariadb-server \
mariadb-client \
apache2 \
composer
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Adding PHP8.4 Repository"
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb

View File

@ -20,7 +20,6 @@ $STD apt-get install -y ca-certificates
msg_ok "Installed Dependencies"
NODE_VERSION="22" install_node_and_modules
install_mariadb
msg_info "Installing FFMPEG"
$STD apt-get install -y ffmpeg
@ -42,6 +41,7 @@ sqluser="root"
sqlpass="root"
echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections
echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections
$STD apt-get install -y mariadb-server
service mysql start
mysql -u "$sqluser" -p"$sqlpass" -e "source sql/user.sql" || true
msg_ok "Installed Database"

View File

@ -15,14 +15,13 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
composer \
git \
nginx \
php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli}
composer \
git \
nginx \
php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli} \
mariadb-server
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up database"
DB_NAME=snipeit_db
DB_USER=snipeit
@ -31,10 +30,10 @@ mysql -u root -e "CREATE DATABASE $DB_NAME;"
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "SnipeIT-Credentials"
echo "SnipeIT Database User: $DB_USER"
echo "SnipeIT Database Password: $DB_PASS"
echo "SnipeIT Database Name: $DB_NAME"
echo "SnipeIT-Credentials"
echo "SnipeIT Database User: $DB_USER"
echo "SnipeIT Database Password: $DB_PASS"
echo "SnipeIT Database Name: $DB_NAME"
} >>~/snipeit.creds
msg_ok "Set up database"
@ -49,9 +48,9 @@ cp .env.example .env
IPADDRESS=$(hostname -I | awk '{print $1}')
sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \
-e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \
-e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env
-e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \
-e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env
chown -R www-data: /opt/snipe-it
chmod -R 755 /opt/snipe-it

View File

@ -15,12 +15,11 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
libapache2-mod-php \
php8.2-{curl,mbstring,mysql,xml,zip,gd}
libapache2-mod-php \
mariadb-server \
php8.2-{curl,mbstring,mysql,xml,zip,gd}
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Database"
DB_NAME=wavelog
DB_USER=waveloguser
@ -29,10 +28,10 @@ $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 "Wavelog-Credentials"
echo "Wavelog Database User: $DB_USER"
echo "Wavelog Database Password: $DB_PASS"
echo "Wavelog Database Name: $DB_NAME"
echo "Wavelog-Credentials"
echo "Wavelog Database User: $DB_USER"
echo "Wavelog Database Password: $DB_PASS"
echo "Wavelog Database Name: $DB_NAME"
} >>~/wavelog.creds
msg_ok "Set up database"

View File

@ -15,13 +15,12 @@ update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
apache2 \
php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \
libapache2-mod-php
apache2 \
php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \
libapache2-mod-php \
mariadb-server
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Database"
DB_NAME=wordpress_db
DB_USER=wordpress
@ -30,10 +29,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "WordPress Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
echo "WordPress Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >>~/wordpress.creds
msg_ok "Set up Database"
@ -47,9 +46,9 @@ find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
mv wp-config-sample.php wp-config.php
sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$DB_NAME' );|" \
-e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \
-e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \
/var/www/html/wordpress/wp-config.php
-e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \
-e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \
/var/www/html/wordpress/wp-config.php
msg_ok "Installed Wordpress"
msg_info "Setup Services"

View File

@ -122,22 +122,20 @@ install_node_and_modules() {
}
# ------------------------------------------------------------------------------
# Installs or upgrades PostgreSQL and optional extensions/modules.
# Installs or upgrades PostgreSQL and performs data migration.
#
# Description:
# - Detects existing PostgreSQL version
# - Dumps all databases before upgrade
# - Adds PGDG repo and installs specified version
# - Installs optional PG_MODULES (e.g. postgis, contrib)
# - Restores dumped data post-upgrade
#
# Variables:
# PG_VERSION - Major PostgreSQL version (e.g. 15, 16) (default: 16)
# PG_MODULES - Comma-separated list of extensions (e.g. "postgis,contrib")
# ------------------------------------------------------------------------------
install_postgresql() {
local PG_VERSION="${PG_VERSION:-16}"
local PG_MODULES="${PG_MODULES:-}"
local CURRENT_PG_VERSION=""
local DISTRO
local NEED_PG_INSTALL=false
@ -147,10 +145,10 @@ install_postgresql() {
CURRENT_PG_VERSION="$(psql -V | awk '{print $3}' | cut -d. -f1)"
if [[ "$CURRENT_PG_VERSION" == "$PG_VERSION" ]]; then
msg_ok "PostgreSQL $PG_VERSION is already installed"
else
msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
NEED_PG_INSTALL=true
return
fi
msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
NEED_PG_INSTALL=true
else
msg_info "Setup PostgreSQL $PG_VERSION"
NEED_PG_INSTALL=true
@ -181,34 +179,20 @@ install_postgresql() {
$STD apt-get install -y "postgresql-${PG_VERSION}" "postgresql-client-${PG_VERSION}"
if [[ -n "$CURRENT_PG_VERSION" ]]; then
msg_info "Removing old PostgreSQL $CURRENT_PG_VERSION packages"
$STD msg_info "Removing old PostgreSQL $CURRENT_PG_VERSION packages"
$STD apt-get purge -y "postgresql-${CURRENT_PG_VERSION}" "postgresql-client-${CURRENT_PG_VERSION}" || true
fi
msg_info "Starting PostgreSQL $PG_VERSION"
$STD msg_info "Starting PostgreSQL $PG_VERSION"
systemctl enable -q --now postgresql
if [[ -n "$CURRENT_PG_VERSION" ]]; then
msg_info "Restoring dumped data"
$STD msg_info "Restoring dumped data"
su - postgres -c "psql < /var/lib/postgresql/backup_$(date +%F)_v${CURRENT_PG_VERSION}.sql"
fi
msg_ok "PostgreSQL $PG_VERSION installed"
fi
# Install optional PostgreSQL modules
if [[ -n "$PG_MODULES" ]]; then
IFS=',' read -ra MODULES <<<"$PG_MODULES"
for module in "${MODULES[@]}"; do
local pkg="postgresql-${PG_VERSION}-${module}"
msg_info "Installing PostgreSQL module: $pkg"
$STD apt-get install -y "$pkg" || {
msg_error "Failed to install $pkg"
continue
}
done
msg_ok "All requested PostgreSQL modules installed"
fi
}
# ------------------------------------------------------------------------------
@ -380,10 +364,8 @@ install_php() {
CURRENT_PHP=""
fi
if [[ -z "$CURRENT_PHP" ]]; then
msg_info "Setup PHP $PHP_VERSION"
elif [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
$STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
@ -400,9 +382,6 @@ install_php() {
for mod in "${MODULES[@]}"; do
MODULE_LIST+=" php${PHP_VERSION}-${mod}"
done
if [[ "$PHP_FPM" == "YES" ]]; then
MODULE_LIST+=" php${PHP_VERSION}-fpm"
fi
if [[ "$PHP_APACHE" == "YES" ]]; then
# Optionally disable old Apache PHP module
@ -469,7 +448,7 @@ install_composer() {
# Download and install latest composer
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer &>/dev/null
if [[ $? -ne 0 ]]; then
msg_error "Failed to install Composer"
@ -477,9 +456,7 @@ install_composer() {
fi
chmod +x "$COMPOSER_BIN"
composer diagnose >/dev/null 2>&1
msg_ok "Setup Composer"
#msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')"
msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')"
}
# ------------------------------------------------------------------------------
@ -612,21 +589,11 @@ install_java() {
install_mongodb() {
local MONGO_VERSION="${MONGO_VERSION:-8.0}"
local DISTRO_ID DISTRO_CODENAME MONGO_BASE_URL
DISTRO_ID=$(awk -F= '/^ID=/{ gsub(/"/,"",$2); print $2 }' /etc/os-release)
DISTRO_CODENAME=$(awk -F= '/^VERSION_CODENAME=/{ print $2 }' /etc/os-release)
case "$DISTRO_ID" in
ubuntu) MONGO_BASE_URL="https://repo.mongodb.org/apt/ubuntu" ;;
debian) MONGO_BASE_URL="https://repo.mongodb.org/apt/debian" ;;
*)
msg_error "Unsupported distribution: $DISTRO_ID"
return 1
;;
esac
local DISTRO_CODENAME
DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)
local REPO_LIST="/etc/apt/sources.list.d/mongodb-org-${MONGO_VERSION}.list"
# Aktuell installierte Major-Version ermitteln
local INSTALLED_VERSION=""
if command -v mongod >/dev/null; then
INSTALLED_VERSION=$(mongod --version | awk '/db version/{print $3}' | cut -d. -f1,2)
@ -640,6 +607,7 @@ install_mongodb() {
return 0
fi
# Ältere Version entfernen (nur Packages, nicht Daten!)
if [[ -n "$INSTALLED_VERSION" ]]; then
msg_info "Replacing MongoDB $INSTALLED_VERSION with $MONGO_VERSION (data will be preserved)"
$STD systemctl stop mongod || true
@ -650,17 +618,15 @@ install_mongodb() {
msg_info "Installing MongoDB $MONGO_VERSION"
fi
# MongoDB Repo hinzufügen
curl -fsSL "https://pgp.mongodb.com/server-${MONGO_VERSION}.asc" | gpg --dearmor -o "/etc/apt/trusted.gpg.d/mongodb-${MONGO_VERSION}.gpg"
echo "deb [signed-by=/etc/apt/trusted.gpg.d/mongodb-${MONGO_VERSION}.gpg] ${MONGO_BASE_URL} ${DISTRO_CODENAME}/mongodb-org/${MONGO_VERSION} main" \
echo "deb [signed-by=/etc/apt/trusted.gpg.d/mongodb-${MONGO_VERSION}.gpg] https://repo.mongodb.org/apt/debian ${DISTRO_CODENAME}/mongodb-org/${MONGO_VERSION} main" \
>"$REPO_LIST"
$STD apt-get update || {
msg_error "APT update failed — invalid MongoDB repo for ${DISTRO_ID}-${DISTRO_CODENAME}?"
return 1
}
$STD apt-get update
$STD apt-get install -y mongodb-org
# Sicherstellen, dass Datenverzeichnis intakt bleibt
mkdir -p /var/lib/mongodb
chown -R mongodb:mongodb /var/lib/mongodb
@ -684,7 +650,8 @@ install_mongodb() {
fetch_and_deploy_gh_release() {
local repo="$1"
local app=${APP:-$(echo "${APPLICATION,,}" | tr -d ' ')}
local raw_app="${APP:-$APPLICATION}"
local app=$(echo "${raw_app,,}" | tr -d ' ')
local api_url="https://api.github.com/repos/$repo/releases/latest"
local header=()
local attempt=0
@ -1246,100 +1213,3 @@ create_selfsigned_certs() {
-subj "/C=US/O=$app/OU=Domain Control Validated/CN=localhost"
$STD msg_ok "Created Self-Signed Certificate"
}
# ------------------------------------------------------------------------------
# Installs Rust toolchain and optional global crates via cargo.
#
# Description:
# - Installs rustup (if missing)
# - Installs or updates desired Rust toolchain (stable, nightly, or versioned)
# - Installs or updates specified global crates using `cargo install`
#
# Notes:
# - Skips crate install if exact version is already present
# - Updates crate if newer version or different version is requested
#
# Variables:
# RUST_TOOLCHAIN - Rust toolchain to install (default: stable)
# RUST_CRATES - Comma-separated list of crates (e.g. "cargo-edit,wasm-pack@0.12.1")
# ------------------------------------------------------------------------------
install_rust_and_crates() {
local RUST_TOOLCHAIN="${RUST_TOOLCHAIN:-stable}"
local RUST_CRATES="${RUST_CRATES:-}"
local CARGO_BIN="${HOME}/.cargo/bin"
# rustup & toolchain
if ! command -v rustup &>/dev/null; then
msg_info "Installing rustup"
curl -fsSL https://sh.rustup.rs | $STD sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
export PATH="$CARGO_BIN:$PATH"
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>"$HOME/.profile"
msg_ok "Installed rustup with $RUST_TOOLCHAIN"
else
$STD rustup install "$RUST_TOOLCHAIN"
$STD rustup default "$RUST_TOOLCHAIN"
$STD rustup update "$RUST_TOOLCHAIN"
msg_ok "Rust toolchain set to $RUST_TOOLCHAIN"
fi
# install/update crates
if [[ -n "$RUST_CRATES" ]]; then
IFS=',' read -ra CRATES <<<"$RUST_CRATES"
for crate in "${CRATES[@]}"; do
local NAME VER INSTALLED_VER
if [[ "$crate" == *"@"* ]]; then
NAME="${crate%@*}"
VER="${crate##*@}"
else
NAME="$crate"
VER=""
fi
INSTALLED_VER=$(cargo install --list 2>/dev/null | awk "/^$NAME v[0-9]/ {print \$2}" | tr -d 'v')
if [[ -n "$INSTALLED_VER" ]]; then
if [[ -n "$VER" && "$VER" != "$INSTALLED_VER" ]]; then
msg_info "Updating $NAME from $INSTALLED_VER to $VER"
$STD cargo install "$NAME" --version "$VER" --force
elif [[ -z "$VER" ]]; then
msg_info "Updating $NAME to latest"
$STD cargo install "$NAME" --force
else
msg_ok "$NAME@$INSTALLED_VER already up to date"
fi
else
msg_info "Installing $NAME ${VER:+($VER)}"
$STD cargo install "$NAME" ${VER:+--version "$VER"}
fi
done
msg_ok "All requested Rust crates processed"
fi
}
# ------------------------------------------------------------------------------
# Installs Adminer (Debian/Ubuntu via APT, Alpine via direct download).
#
# Description:
# - Adds Adminer to Apache or web root
# - Supports Alpine and Debian-based systems
# ------------------------------------------------------------------------------
install_adminer() {
if grep -qi alpine /etc/os-release; then
msg_info "Installing Adminer (Alpine)"
mkdir -p /var/www/localhost/htdocs/adminer
if ! curl -fsSL https://github.com/vrana/adminer/releases/latest/download/adminer.php \
-o /var/www/localhost/htdocs/adminer/index.php; then
msg_error "Failed to download Adminer"
return 1
fi
msg_ok "Adminer available at /adminer (Alpine)"
else
msg_info "Installing Adminer (Debian/Ubuntu)"
$STD apt-get install -y adminer
$STD a2enconf adminer
$STD systemctl reload apache2
msg_ok "Adminer available at /adminer (Debian/Ubuntu)"
fi
}