harmonize tools.func

This commit is contained in:
CanbiZ 2025-06-16 15:20:06 +02:00
parent b93927d8e1
commit 06cf03dcb1
16 changed files with 203 additions and 205 deletions

View File

@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt-get install -y python3-distutils $STD apt-get install -y python3-distutils
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
install_mariadb setup_mariadb
msg_info "Setting up Bluecherry" msg_info "Setting up Bluecherry"
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive

View File

@ -29,22 +29,22 @@ PYTHON_VERSION="3.12" setup_uv
# minimal call: fetch_and_deploy_gh_release "defguard" "DefGuard/defguard" "binary" # minimal call: fetch_and_deploy_gh_release "defguard" "DefGuard/defguard" "binary"
#echo -e "defguard done" #echo -e "defguard done"
#PHP_VERSION=8.2 PHP_FPM=YES install_php #PHP_VERSION=8.2 PHP_FPM=YES setup_php
#install_composer #setup_composer
# Example Setting for Test # Example Setting for Test
#NODE_MODULE="pnpm@10.1,yarn" #NODE_MODULE="pnpm@10.1,yarn"
#RELEASE=$(curl_handler -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') #RELEASE=$(curl_handler -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
#msg_ok "Get Release $RELEASE" #msg_ok "Get Release $RELEASE"
#NODE_VERSION="22" NODE_MODULE="yarn" install_node_and_modules #NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
#PG_VERSION="16" install_postgresql #PG_VERSION="16" setup_postgresql
#MARIADB_VERSION="11.8" #MARIADB_VERSION="11.8"
#MYSQL_VERSION="8.0" #MYSQL_VERSION="8.0"
#install_mongodb #install_mongodb
#install_postgresql #setup_postgresql
#install_mariadb #setup_mariadb
#install_mysql #install_mysql
# msg_info "Setup DISTRO env" # msg_info "Setup DISTRO env"

View File

@ -39,8 +39,8 @@ msg_ok "Installed Dependencies"
PHP_VERSION=8.4 PHP_VERSION=8.4
PHP_MODULE=bcmath,bz2,cli,common,curl,fpm,gd,imagick,intl,mbstring,mysql,sqlite3,xml,xmlrpc,zip PHP_MODULE=bcmath,bz2,cli,common,curl,fpm,gd,imagick,intl,mbstring,mysql,sqlite3,xml,xmlrpc,zip
PHP_APACHE=YES PHP_APACHE=YES
install_php setup_php
install_mariadb setup_mariadb
msg_info "Setting up Database" msg_info "Setting up Database"
DB_NAME=ampache2 DB_NAME=ampache2

View File

@ -13,10 +13,10 @@ setting_up_container
network_check network_check
update_os update_os
PG_VERSION="16" install_postgresql PG_VERSION="16" setup_postgresql
PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" setup_php
NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" setup_nodejs
install_composer setup_composer
msg_info "Installing Dependencies (Patience)" msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \ $STD apt-get install -y \
@ -34,10 +34,10 @@ $STD apt-get install -y \
libwebp-dev libwebp-dev
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
# PG_VERSION="16" install_postgresql # PG_VERSION="16" setup_postgresql
# PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php # PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" setup_php
# NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules # NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" setup_nodejs
# install_composer # setup_composer
msg_info "Setting up PostgreSQL Database" msg_info "Setting up PostgreSQL Database"
DB_NAME=koel_db DB_NAME=koel_db

View File

@ -13,7 +13,6 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt-get install -y \
build-essential \ build-essential \
@ -23,8 +22,8 @@ msg_ok "Installed Dependencies"
## WIP - only protoype with git call ## WIP - only protoype with git call
install_go setup_go
NODE_VERSION="22" NODE_MODULE="pnpm" install_node_and_modules NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
msg_info "Setup ocis" msg_info "Setup ocis"
cd /opt cd /opt

View File

@ -25,7 +25,7 @@ $STD apt-get install -y --no-install-recommends \
python3-pip python3-pip
msg_ok "Setup Python3" msg_ok "Setup Python3"
install_node_and_modules setup_nodejs
msg_info "Installing Open WebUI (Patience)" msg_info "Installing Open WebUI (Patience)"
fetch_and_deploy_gh_release "open-webui/open-webui" fetch_and_deploy_gh_release "open-webui/open-webui"

View File

@ -24,7 +24,7 @@ $STD apt-get install -y \
composer composer
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
install_mariadb setup_mariadb
msg_info "Setting up database" msg_info "Setting up database"
DB_NAME=firefly DB_NAME=firefly

View File

@ -14,7 +14,7 @@ network_check
update_os update_os
setup_yq setup_yq
PG_VERSION="16" install_postgresql PG_VERSION="16" setup_postgresql
msg_info "Setting up PostgreSQL Database" msg_info "Setting up PostgreSQL Database"
DB_NAME=hanko DB_NAME=hanko

View File

@ -28,7 +28,7 @@ $STD pip install --upgrade pip
msg_ok "Setup Python3" msg_ok "Setup Python3"
setup_uv setup_uv
PG_VERSION=16 install_postgresql PG_VERSION=16 setup_postgresql
msg_info "Setup Database" msg_info "Setup Database"
DB_NAME=healthchecks_db DB_NAME=healthchecks_db

View File

@ -29,9 +29,9 @@ $STD apt-get install -y \
snmpd snmpd
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
PHP_VERSION=8.2 PHP_FPM=YES PHP_APACHE=NO PHP_MODULE="gmp,mysql,snmp" install_php PHP_VERSION=8.2 PHP_FPM=YES PHP_APACHE=NO PHP_MODULE="gmp,mysql,snmp" setup_php
install_mariadb setup_mariadb
install_composer setup_composer
setup_uv setup_uv
msg_info "Installing Python" msg_info "Installing Python"
@ -74,7 +74,6 @@ setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/li
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
msg_ok "Setup LibreNMS" msg_ok "Setup LibreNMS"
msg_info "Configure MariaDB" msg_info "Configure MariaDB"
sed -i "/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0" /etc/mysql/mariadb.conf.d/50-server.cnf sed -i "/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0" /etc/mysql/mariadb.conf.d/50-server.cnf
systemctl enable -q --now mariadb systemctl enable -q --now mariadb

View File

@ -55,7 +55,7 @@ YARN_VERSION=$(grep '"packageManager":' /opt/manyfold/package.json | sed -E 's/.
msg_ok "Downloaded Manyfold" msg_ok "Downloaded Manyfold"
NODE_VERSION="22" NODE_MODULE="npm@latest,${YARN_VERSION}" install_node_and_modules NODE_VERSION="22" NODE_MODULE="npm@latest,${YARN_VERSION}" setup_nodejs
RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" setup_rbenv_stack RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" setup_rbenv_stack
# msg_info "Add ruby-build" # msg_info "Add ruby-build"

View File

@ -44,8 +44,8 @@ msg_ok "Installed Dependencies"
#configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000" #configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000"
PG_VERSION=17 install_postgresql PG_VERSION=17 setup_postgresql
NODE_VERSION="22" install_node_and_modules NODE_VERSION="22" setup_nodejs
msg_info "Setup Variables" msg_info "Setup Variables"
DB_NAME=maxun_db DB_NAME=maxun_db

View File

@ -33,7 +33,7 @@ $STD apt-get install -y --no-install-recommends \
redis redis
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
PG_VERSION=16 install_postgresql PG_VERSION=16 setup_postgresql
msg_info "Setting up Postgresql" msg_info "Setting up Postgresql"
DB_NAME="maybe" DB_NAME="maybe"

View File

@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt-get install -y make git $STD apt-get install -y make git
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
NODE_MODULE="yarn" install_node_and_modules NODE_MODULE="yarn" setup_nodejs
msg_info "Installing Notesnook (Patience)" msg_info "Installing Notesnook (Patience)"
fetch_and_deploy_gh_release "notesnook" "streetwriters/notesnook" "tarball" fetch_and_deploy_gh_release "notesnook" "streetwriters/notesnook" "tarball"

View File

@ -22,7 +22,7 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
setup_uv setup_uv
NODE_VERSION="22" install_node_and_modules NODE_VERSION="22" setup_nodejs
msg_info "Installing ${APPLICATION}" msg_info "Installing ${APPLICATION}"
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')

View File

@ -12,7 +12,7 @@
# NODE_MODULE - Comma-separated list of global modules (e.g. "yarn,@vue/cli@5.0.0") # NODE_MODULE - Comma-separated list of global modules (e.g. "yarn,@vue/cli@5.0.0")
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_node_and_modules() { setup_nodejs() {
local NODE_VERSION="${NODE_VERSION:-22}" local NODE_VERSION="${NODE_VERSION:-22}"
local NODE_MODULE="${NODE_MODULE:-}" local NODE_MODULE="${NODE_MODULE:-}"
local CURRENT_NODE_VERSION="" local CURRENT_NODE_VERSION=""
@ -135,7 +135,7 @@ install_node_and_modules() {
# PG_VERSION - Major PostgreSQL version (e.g. 15, 16) (default: 16) # PG_VERSION - Major PostgreSQL version (e.g. 15, 16) (default: 16)
# PG_MODULES - Comma-separated list of extensions (e.g. "postgis,contrib") # PG_MODULES - Comma-separated list of extensions (e.g. "postgis,contrib")
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_postgresql() { setup_postgresql() {
local PG_VERSION="${PG_VERSION:-16}" local PG_VERSION="${PG_VERSION:-16}"
local PG_MODULES="${PG_MODULES:-}" local PG_MODULES="${PG_MODULES:-}"
local CURRENT_PG_VERSION="" local CURRENT_PG_VERSION=""
@ -223,7 +223,7 @@ install_postgresql() {
# MARIADB_VERSION - MariaDB version to install (e.g. 10.11, latest) (default: latest) # MARIADB_VERSION - MariaDB version to install (e.g. 10.11, latest) (default: latest)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_mariadb() { setup_mariadb() {
local MARIADB_VERSION="${MARIADB_VERSION:-latest}" local MARIADB_VERSION="${MARIADB_VERSION:-latest}"
local DISTRO_CODENAME local DISTRO_CODENAME
DISTRO_CODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)" DISTRO_CODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)"
@ -291,7 +291,7 @@ install_mariadb() {
# MYSQL_VERSION - MySQL version to install (e.g. 5.7, 8.0) (default: 8.0) # MYSQL_VERSION - MySQL version to install (e.g. 5.7, 8.0) (default: 8.0)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_mysql() { setup_mysql() {
local MYSQL_VERSION="${MYSQL_VERSION:-8.0}" local MYSQL_VERSION="${MYSQL_VERSION:-8.0}"
local CURRENT_VERSION="" local CURRENT_VERSION=""
local NEED_INSTALL=false local NEED_INSTALL=false
@ -372,7 +372,7 @@ install_mysql() {
# PHP_MAX_EXECUTION_TIME - (default: 300) # PHP_MAX_EXECUTION_TIME - (default: 300)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_php() { setup_php() {
local PHP_VERSION="${PHP_VERSION:-8.4}" local PHP_VERSION="${PHP_VERSION:-8.4}"
local PHP_MODULE="${PHP_MODULE:-}" local PHP_MODULE="${PHP_MODULE:-}"
local PHP_APACHE="${PHP_APACHE:-NO}" local PHP_APACHE="${PHP_APACHE:-NO}"
@ -477,7 +477,7 @@ install_php() {
# - Installs to /usr/local/bin/composer # - Installs to /usr/local/bin/composer
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_composer() { setup_composer() {
local COMPOSER_BIN="/usr/local/bin/composer" local COMPOSER_BIN="/usr/local/bin/composer"
export COMPOSER_ALLOW_SUPERUSER=1 export COMPOSER_ALLOW_SUPERUSER=1
@ -516,7 +516,7 @@ install_composer() {
# GO_VERSION - Version to install (e.g. 1.22.2 or latest) # GO_VERSION - Version to install (e.g. 1.22.2 or latest)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_go() { setup_go() {
local ARCH local ARCH
case "$(uname -m)" in case "$(uname -m)" in
x86_64) ARCH="amd64" ;; x86_64) ARCH="amd64" ;;
@ -582,7 +582,7 @@ install_go() {
# JAVA_VERSION - Temurin JDK version to install (e.g. 17, 21) # JAVA_VERSION - Temurin JDK version to install (e.g. 17, 21)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_java() { setup_java() {
local JAVA_VERSION="${JAVA_VERSION:-21}" local JAVA_VERSION="${JAVA_VERSION:-21}"
local DISTRO_CODENAME local DISTRO_CODENAME
DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release) DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)
@ -633,7 +633,7 @@ install_java() {
# MONGO_VERSION - MongoDB major version to install (e.g. 7.0, 8.0) # MONGO_VERSION - MongoDB major version to install (e.g. 7.0, 8.0)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_mongodb() { setup_mongodb() {
local MONGO_VERSION="${MONGO_VERSION:-8.0}" local MONGO_VERSION="${MONGO_VERSION:-8.0}"
local DISTRO_ID DISTRO_CODENAME MONGO_BASE_URL local DISTRO_ID DISTRO_CODENAME MONGO_BASE_URL
DISTRO_ID=$(awk -F= '/^ID=/{ gsub(/"/,"",$2); print $2 }' /etc/os-release) DISTRO_ID=$(awk -F= '/^ID=/{ gsub(/"/,"",$2); print $2 }' /etc/os-release)
@ -1365,7 +1365,7 @@ create_selfsigned_certs() {
# RUST_CRATES - Comma-separated list of crates (e.g. "cargo-edit,wasm-pack@0.12.1") # RUST_CRATES - Comma-separated list of crates (e.g. "cargo-edit,wasm-pack@0.12.1")
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_rust_and_crates() { setup_rust() {
local RUST_TOOLCHAIN="${RUST_TOOLCHAIN:-stable}" local RUST_TOOLCHAIN="${RUST_TOOLCHAIN:-stable}"
local RUST_CRATES="${RUST_CRATES:-}" local RUST_CRATES="${RUST_CRATES:-}"
local CARGO_BIN="${HOME}/.cargo/bin" local CARGO_BIN="${HOME}/.cargo/bin"
@ -1426,7 +1426,7 @@ install_rust_and_crates() {
# - Supports Alpine and Debian-based systems # - Supports Alpine and Debian-based systems
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
install_adminer() { setup_adminer() {
if grep -qi alpine /etc/os-release; then if grep -qi alpine /etc/os-release; then
msg_info "Installing Adminer (Alpine)" msg_info "Installing Adminer (Alpine)"
mkdir -p /var/www/localhost/htdocs/adminer mkdir -p /var/www/localhost/htdocs/adminer