diff --git a/CHANGELOG.md b/CHANGELOG.md index 11c46f286..777f6f0b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,331 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2025-06-15 + +## 2025-06-14 + +### πŸš€ Updated Scripts + + - [core] Update install_mariadb func [@tremor021](https://github.com/tremor021) ([#5138](https://github.com/community-scripts/ProxmoxVE/pull/5138)) + + - #### 🐞 Bug Fixes + + - flowiseai: set NodeJS to Version 20 [@MickLesk](https://github.com/MickLesk) ([#5130](https://github.com/community-scripts/ProxmoxVE/pull/5130)) + - Update dolibarr-install.sh - Get largest version number [@tjcomserv](https://github.com/tjcomserv) ([#5127](https://github.com/community-scripts/ProxmoxVE/pull/5127)) + +## 2025-06-13 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Zigbee2MQTT: Fix missing directory [@tremor021](https://github.com/tremor021) ([#5120](https://github.com/community-scripts/ProxmoxVE/pull/5120)) + +### 🌐 Website + + - #### πŸ“ Script Information + + - Umbrel OS: Fix bad disk size shown on website [@tremor021](https://github.com/tremor021) ([#5125](https://github.com/community-scripts/ProxmoxVE/pull/5125)) + +## 2025-06-12 + +### πŸ†• New Scripts + + - Manage my Damn Life ([#5100](https://github.com/community-scripts/ProxmoxVE/pull/5100)) + +### πŸš€ Updated Scripts + + - Kasm: Increase Ressources & Hint for Fuse / Swap [@MickLesk](https://github.com/MickLesk) ([#5112](https://github.com/community-scripts/ProxmoxVE/pull/5112)) + +## 2025-06-11 + +## 2025-06-10 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Element Synapse: switched from development to production mode and fixed update [@Frankmaaan](https://github.com/Frankmaaan) ([#5066](https://github.com/community-scripts/ProxmoxVE/pull/5066)) + - Tinyauth: Fix creation of service file [@tremor021](https://github.com/tremor021) ([#5090](https://github.com/community-scripts/ProxmoxVE/pull/5090)) + - Dolibarr: Fix typo in SQL command [@tremor021](https://github.com/tremor021) ([#5091](https://github.com/community-scripts/ProxmoxVE/pull/5091)) + +### 🧰 Maintenance + + - #### πŸ“‘ API + + - [core] Prevent API form sending Data when disabled [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#5080](https://github.com/community-scripts/ProxmoxVE/pull/5080)) + +### 🌐 Website + + - #### πŸ“ Script Information + + - Immich: Update JSON [@vhsdream](https://github.com/vhsdream) ([#5085](https://github.com/community-scripts/ProxmoxVE/pull/5085)) + +## 2025-06-09 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Authelia: Fix the URL of the container [@tremor021](https://github.com/tremor021) ([#5064](https://github.com/community-scripts/ProxmoxVE/pull/5064)) + +### 🌐 Website + + - GoMFT: Remove from website temporarily [@tremor021](https://github.com/tremor021) ([#5065](https://github.com/community-scripts/ProxmoxVE/pull/5065)) + +## 2025-06-08 + +### πŸ†• New Scripts + + - Minarca ([#5058](https://github.com/community-scripts/ProxmoxVE/pull/5058)) + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - zot: fix missing var (Dev -> Main) [@MickLesk](https://github.com/MickLesk) ([#5056](https://github.com/community-scripts/ProxmoxVE/pull/5056)) + + - #### ✨ New Features + + - karakeep: Add more configuration defaults [@vhsdream](https://github.com/vhsdream) ([#5054](https://github.com/community-scripts/ProxmoxVE/pull/5054)) + +## 2025-06-07 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - alpine-it-tools fix update [@CrazyWolf13](https://github.com/CrazyWolf13) ([#5039](https://github.com/community-scripts/ProxmoxVE/pull/5039)) + +### 🧰 Maintenance + + - #### πŸ’Ύ Core + + - Fix typo in build.func [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#5041](https://github.com/community-scripts/ProxmoxVE/pull/5041)) + +## 2025-06-06 + +### πŸ†• New Scripts + + - Zot-Registry ([#5016](https://github.com/community-scripts/ProxmoxVE/pull/5016)) + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - zipline: fix old upload copy from v3 to v4 [@MickLesk](https://github.com/MickLesk) ([#5015](https://github.com/community-scripts/ProxmoxVE/pull/5015)) + +## 2025-06-05 + +### πŸ†• New Scripts + + - Lyrion Music Server ([#4992](https://github.com/community-scripts/ProxmoxVE/pull/4992)) +- gitea-mirror ([#4967](https://github.com/community-scripts/ProxmoxVE/pull/4967)) + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Zipline: Fix PostgreSQL install [@tremor021](https://github.com/tremor021) ([#4989](https://github.com/community-scripts/ProxmoxVE/pull/4989)) + - Homarr: add nodejs upgrade [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4974](https://github.com/community-scripts/ProxmoxVE/pull/4974)) + - add FUSE to rclone [@Frankmaaan](https://github.com/Frankmaaan) ([#4972](https://github.com/community-scripts/ProxmoxVE/pull/4972)) + + - #### ✨ New Features + + - Zitadel: Upgrade Install to PSQL 17 [@MickLesk](https://github.com/MickLesk) ([#5000](https://github.com/community-scripts/ProxmoxVE/pull/5000)) + +### 🌐 Website + + - #### πŸ“ Script Information + + - Fix clean-lxcs.sh type categorization [@bitspill](https://github.com/bitspill) ([#4980](https://github.com/community-scripts/ProxmoxVE/pull/4980)) + +## 2025-06-04 + +### πŸš€ Updated Scripts + + - Pulse: add polkit for sudoless web updates [@rcourtman](https://github.com/rcourtman) ([#4970](https://github.com/community-scripts/ProxmoxVE/pull/4970)) +- Pulse: add correct Port for URL output [@rcourtman](https://github.com/rcourtman) ([#4951](https://github.com/community-scripts/ProxmoxVE/pull/4951)) + + - #### 🐞 Bug Fixes + + - [refactor] Seelf [@tremor021](https://github.com/tremor021) ([#4954](https://github.com/community-scripts/ProxmoxVE/pull/4954)) + +## 2025-06-03 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Kasm: Swap fix [@omiinaya](https://github.com/omiinaya) ([#4937](https://github.com/community-scripts/ProxmoxVE/pull/4937)) + +### 🌐 Website + + - #### πŸ“ Script Information + + - netbox: correct website URL [@theincrediblenoone](https://github.com/theincrediblenoone) ([#4952](https://github.com/community-scripts/ProxmoxVE/pull/4952)) + +## 2025-06-02 + +### πŸ†• New Scripts + + - PVE-Privilege-Converter [@MickLesk](https://github.com/MickLesk) ([#4906](https://github.com/community-scripts/ProxmoxVE/pull/4906)) + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - fix(wastebin): use tar asset [@dbeg](https://github.com/dbeg) ([#4934](https://github.com/community-scripts/ProxmoxVE/pull/4934)) + - MySQL/MariaDB: fix create user with password [@MickLesk](https://github.com/MickLesk) ([#4918](https://github.com/community-scripts/ProxmoxVE/pull/4918)) + - Fix alpine-tinyauth env configuration parsing logic [@gokussjx](https://github.com/gokussjx) ([#4901](https://github.com/community-scripts/ProxmoxVE/pull/4901)) + + - #### πŸ’₯ Breaking Changes + + - make Pulse installation non-interactive [@rcourtman](https://github.com/rcourtman) ([#4848](https://github.com/community-scripts/ProxmoxVE/pull/4848)) + +### 🧰 Maintenance + + - #### πŸ’Ύ Core + + - [core] add hw-accelerated for immich, openwebui / remove scrypted [@MickLesk](https://github.com/MickLesk) ([#4927](https://github.com/community-scripts/ProxmoxVE/pull/4927)) + - [core] tools.func: Bugfix old gpg key for mysql & little improvements [@MickLesk](https://github.com/MickLesk) ([#4916](https://github.com/community-scripts/ProxmoxVE/pull/4916)) + - [core] Varius fixes to Config file feature [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4924](https://github.com/community-scripts/ProxmoxVE/pull/4924)) + +### 🌐 Website + + - #### 🐞 Bug Fixes + + - Display default password even if there isn't a default username [@0risc](https://github.com/0risc) ([#4900](https://github.com/community-scripts/ProxmoxVE/pull/4900)) + +## 2025-06-01 + +### πŸ†• New Scripts + + - immich ([#4886](https://github.com/community-scripts/ProxmoxVE/pull/4886)) + +### 🌐 Website + + - #### πŸ“ Script Information + + - AdventureLog: add login credentials info [@tremor021](https://github.com/tremor021) ([#4887](https://github.com/community-scripts/ProxmoxVE/pull/4887)) + +## 2025-05-31 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Silverbullet: Fix Installation (wrong path) [@MickLesk](https://github.com/MickLesk) ([#4873](https://github.com/community-scripts/ProxmoxVE/pull/4873)) + - ActualBudget: fix update check (file instead of folder check) [@MickLesk](https://github.com/MickLesk) ([#4874](https://github.com/community-scripts/ProxmoxVE/pull/4874)) + - Omada Controller: Fix libssl url [@tremor021](https://github.com/tremor021) ([#4868](https://github.com/community-scripts/ProxmoxVE/pull/4868)) + +### 🌐 Website + + - #### 🐞 Bug Fixes + + - Revert "Update package dependencies in package.json and package-lock.json (#4845) [@BramSuurdje](https://github.com/BramSuurdje) ([#4869](https://github.com/community-scripts/ProxmoxVE/pull/4869)) + +### πŸ’₯ Breaking Changes + + - Remove Authentik script [@tremor021](https://github.com/tremor021) ([#4867](https://github.com/community-scripts/ProxmoxVE/pull/4867)) + +## 2025-05-30 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - slskd: add space in sed command [@vhsdream](https://github.com/vhsdream) ([#4853](https://github.com/community-scripts/ProxmoxVE/pull/4853)) + - Alpine Traefik: Fix working directory and plugins [@tremor021](https://github.com/tremor021) ([#4838](https://github.com/community-scripts/ProxmoxVE/pull/4838)) + +### 🌐 Website + + - #### 🐞 Bug Fixes + + - Update package dependencies in package.json and package-lock.json [@enough-jainil](https://github.com/enough-jainil) ([#4845](https://github.com/community-scripts/ProxmoxVE/pull/4845)) + +## 2025-05-29 + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - SearXNG fix limiter [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4834](https://github.com/community-scripts/ProxmoxVE/pull/4834)) + - Docmost: add jq before nodejs install [@MickLesk](https://github.com/MickLesk) ([#4831](https://github.com/community-scripts/ProxmoxVE/pull/4831)) + - Alpine Traefik: Fix Dashboard not beign accessible [@tremor021](https://github.com/tremor021) ([#4828](https://github.com/community-scripts/ProxmoxVE/pull/4828)) + - MySQL: Fix Wrong Command [@MickLesk](https://github.com/MickLesk) ([#4820](https://github.com/community-scripts/ProxmoxVE/pull/4820)) + - docs: fix casing of OpenWrt [@GoetzGoerisch](https://github.com/GoetzGoerisch) ([#4805](https://github.com/community-scripts/ProxmoxVE/pull/4805)) + + - #### ✨ New Features + + - Docker-VM: set individual Hostname / Disk-Space formatting [@MickLesk](https://github.com/MickLesk) ([#4821](https://github.com/community-scripts/ProxmoxVE/pull/4821)) + +## 2025-05-28 + +### πŸ†• New Scripts + + - Umbrel-OS [@MickLesk](https://github.com/MickLesk) ([#4788](https://github.com/community-scripts/ProxmoxVE/pull/4788)) +- oauth2-proxy ([#4784](https://github.com/community-scripts/ProxmoxVE/pull/4784)) + +### πŸš€ Updated Scripts + + - #### 🐞 Bug Fixes + + - Habitica: Use Node20 [@MickLesk](https://github.com/MickLesk) ([#4796](https://github.com/community-scripts/ProxmoxVE/pull/4796)) + - Alpine-Node-RED: add service to rc [@MickLesk](https://github.com/MickLesk) ([#4783](https://github.com/community-scripts/ProxmoxVE/pull/4783)) + + - #### ✨ New Features + + - Pulse: use prebuild tarball file / remove unneeded npm actions [@MickLesk](https://github.com/MickLesk) ([#4776](https://github.com/community-scripts/ProxmoxVE/pull/4776)) + + - #### πŸ’₯ Breaking Changes + + - Refactor: Linkwarden + OS Upgrade [@MickLesk](https://github.com/MickLesk) ([#4756](https://github.com/community-scripts/ProxmoxVE/pull/4756)) + + - #### πŸ”§ Refactor + + - refactor: use binary and randomize credentials in tinyauth [@steveiliop56](https://github.com/steveiliop56) ([#4632](https://github.com/community-scripts/ProxmoxVE/pull/4632)) + - MariaDB CLI Update, Go Install Helper & Minor Cleanup [@MickLesk](https://github.com/MickLesk) ([#4793](https://github.com/community-scripts/ProxmoxVE/pull/4793)) + - Refactor: Remove redundant dependencies & unify unzip usage [@MickLesk](https://github.com/MickLesk) ([#4780](https://github.com/community-scripts/ProxmoxVE/pull/4780)) + - Refactor: Remove gpg / gnupg from script base [@MickLesk](https://github.com/MickLesk) ([#4775](https://github.com/community-scripts/ProxmoxVE/pull/4775)) + +### 🌐 Website + + - #### πŸ“ Script Information + + - pulse: correct url in note [@xb00tt](https://github.com/xb00tt) ([#4809](https://github.com/community-scripts/ProxmoxVE/pull/4809)) + ## 2025-05-27 +### πŸ†• New Scripts + + - Backrest ([#4766](https://github.com/community-scripts/ProxmoxVE/pull/4766)) +- 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)) + + - #### ✨ New Features + + - 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 diff --git a/ct/2fauth.sh b/ct/2fauth.sh index d38d86cd0..24f8dbef9 100644 --- a/ct/2fauth.sh +++ b/ct/2fauth.sh @@ -20,79 +20,79 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources + header_info + check_container_storage + check_container_resources - # Check if installation is present | -f for file, -d for folder - if [[ ! -d "/opt/2fauth" ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - # Crawling the new version and checking whether an update is required - RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - if [[ "${RELEASE}" != "$(cat /opt/2fauth_version.txt)" ]] || [[ ! -f /opt/2fauth_version.txt ]]; then - msg_info "Updating $APP to ${RELEASE}" - - $STD apt-get update - $STD apt-get -y upgrade - - # Creating Backup - msg_info "Creating Backup" - mv "/opt/2fauth" "/opt/2fauth-backup" - if ! dpkg -l | grep -q 'php8.3'; then - cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak - fi - msg_ok "Backup Created" - - # Upgrade PHP - if ! dpkg -l | grep -q 'php8.3'; then - $STD apt-get install -y \ - 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 - $STD apt-get install -y php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,mbstring,mysql,xml,cli,intl} - sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf - fi - - # Execute Update - curl -fsSL -o "${RELEASE}.zip" "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip" - unzip -q "${RELEASE}.zip" - mv "2FAuth-${RELEASE//v/}/" "/opt/2fauth" - mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env" - mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage" - cd "/opt/2fauth" || return - - chown -R www-data: "/opt/2fauth" - chmod -R 755 "/opt/2fauth" - - export COMPOSER_ALLOW_SUPERUSER=1 - $STD composer install --no-dev --prefer-source - - php artisan 2fauth:install - - $STD systemctl restart nginx - - # Cleaning up - msg_info "Cleaning Up" - rm -rf "v${RELEASE}.zip" - if dpkg -l | grep -q 'php8.2'; then - $STD apt-get remove --purge -y php8.2* - fi - $STD apt-get -y autoremove - $STD apt-get -y autoclean - msg_ok "Cleanup Completed" - - # Last Action - echo "${RELEASE}" >/opt/2fauth_version.txt - msg_ok "Updated $APP to ${RELEASE}" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi + # Check if installation is present | -f for file, -d for folder + if [[ ! -d "/opt/2fauth" ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + + # Crawling the new version and checking whether an update is required + RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/2fauth_version.txt)" ]] || [[ ! -f /opt/2fauth_version.txt ]]; then + msg_info "Updating $APP to ${RELEASE}" + + $STD apt-get update + $STD apt-get -y upgrade + + # Creating Backup + msg_info "Creating Backup" + mv "/opt/2fauth" "/opt/2fauth-backup" + if ! dpkg -l | grep -q 'php8.3'; then + cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak + fi + msg_ok "Backup Created" + + # Upgrade PHP + if ! dpkg -l | grep -q 'php8.3'; then + $STD apt-get install -y \ + 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 + $STD apt-get install -y php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,mbstring,mysql,xml,cli,intl} + sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf + fi + + # Execute Update + curl -fsSL -o "${RELEASE}.zip" "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip" + $STD unzip "${RELEASE}.zip" + mv "2FAuth-${RELEASE//v/}/" "/opt/2fauth" + mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env" + mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage" + cd "/opt/2fauth" || return + + chown -R www-data: "/opt/2fauth" + chmod -R 755 "/opt/2fauth" + + export COMPOSER_ALLOW_SUPERUSER=1 + $STD composer install --no-dev --prefer-source + + php artisan 2fauth:install + + $STD systemctl restart nginx + + # Cleaning up + msg_info "Cleaning Up" + rm -rf "v${RELEASE}.zip" + if dpkg -l | grep -q 'php8.2'; then + $STD apt-get remove --purge -y php8.2* + fi + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleanup Completed" + + # Last Action + echo "${RELEASE}" >/opt/2fauth_version.txt + msg_ok "Updated $APP to ${RELEASE}" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit } start diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 089aa6ed5..e00030aa3 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -24,7 +24,7 @@ function update_script() { check_container_storage check_container_resources - if [[ ! -d /opt/actualbudget ]]; then + if [[ ! -f /opt/actualbudget_version.txt ]]; then msg_error "No ${APP} Installation Found!" exit fi diff --git a/ct/adventurelog.sh b/ct/adventurelog.sh index 2256b6131..ac1ce3611 100644 --- a/ct/adventurelog.sh +++ b/ct/adventurelog.sh @@ -37,7 +37,7 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" mv /opt/adventurelog/ /opt/adventurelog-backup/ curl -fsSL -o /opt/v${RELEASE}.zip "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip" - unzip -q /opt/v${RELEASE}.zip -d /opt/ + $STD unzip /opt/v${RELEASE}.zip -d /opt/ mv /opt/AdventureLog-${RELEASE} /opt/adventurelog mv /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env diff --git a/ct/alpine-it-tools.sh b/ct/alpine-it-tools.sh index c50587130..2c551c2d5 100644 --- a/ct/alpine-it-tools.sh +++ b/ct/alpine-it-tools.sh @@ -21,8 +21,6 @@ catch_errors function update_script() { header_info - check_container_storage - check_container_resources if [ ! -d /usr/share/nginx/html ]; then msg_error "No ${APP} Installation Found!" @@ -36,7 +34,7 @@ function update_script() { curl -fsSL -o it-tools.zip "$DOWNLOAD_URL" mkdir -p /usr/share/nginx/html rm -rf /usr/share/nginx/html/* - unzip -q it-tools.zip -d /tmp/it-tools + $STD unzip it-tools.zip -d /tmp/it-tools cp -r /tmp/it-tools/dist/* /usr/share/nginx/html rm -rf /tmp/it-tools rm -f it-tools.zip diff --git a/ct/alpine-node-red.sh b/ct/alpine-node-red.sh index ae94858f1..971527d15 100644 --- a/ct/alpine-node-red.sh +++ b/ct/alpine-node-red.sh @@ -32,10 +32,6 @@ function update_script() { $STD npm install -g --unsafe-perm node-red msg_ok "Updated Node-RED" - msg_info "Restarting Node-RED" - $STD rc-service nodered restart - msg_ok "Restarted Node-RED" - exit 0 } diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index e2301c2fd..b9c3423ca 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -13,6 +13,7 @@ var_disk="${var_disk:-1}" var_os="${var_os:-alpine}" var_version="${var_version:-3.21}" var_unprivileged="${var_unprivileged:-1}" +var_fuse="${var_fuse:-yes}" header_info "$APP" variables @@ -21,9 +22,6 @@ catch_errors function update_script() { header_info - check_container_storage - check_container_resources - if [ ! -d /opt/rclone ]; then msg_error "No ${APP} Installation Found!" exit 1 diff --git a/ct/alpine-tinyauth.sh b/ct/alpine-tinyauth.sh index 089c7dbb1..516091d01 100644 --- a/ct/alpine-tinyauth.sh +++ b/ct/alpine-tinyauth.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG -# Author: SlaviΕ‘a AreΕΎina (tremor021) +# Author: SlaviΕ‘a AreΕΎina (tremor021) | Co-Author: Stavros (steveiliop56) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/steveiliop56/tinyauth -APP="Alpine-tinyauth" +APP="Alpine-Tinyauth" var_tags="${var_tags:-alpine;auth}" var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-512}" -var_disk="${var_disk:-3}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-2}" var_os="${var_os:-alpine}" var_version="${var_version:-3.21}" var_unprivileged="${var_unprivileged:-1}" @@ -25,34 +25,23 @@ function update_script() { exit 1 fi - msg_info "Updating Alpine Packages" + msg_info "Updating packages" $STD apk -U upgrade - msg_ok "Updated Alpine Packages" + msg_ok "Updated packages" - msg_info "Updating tinyauth" + msg_info "Updating Tinyauth" RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [ "${RELEASE}" != "$(cat /opt/tinyauth_version.txt)" ] || [ ! -f /opt/tinyauth_version.txt ]; then $STD service tinyauth stop - temp_file=$(mktemp) - cp /opt/tinyauth/.env /opt - rm -rf /opt/tinyauth - mkdir -p /opt/tinyauth - curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" - tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 - cd /opt/tinyauth/frontend - $STD bun install - $STD bun run build - mv dist /opt/tinyauth/internal/assets/ - cd /opt/tinyauth - $STD go mod download - CGO_ENABLED=0 go build -ldflags "-s -w" - cp /opt/.env /opt/tinyauth - echo "${RELEASE}" >/opt/tinyauth_version.txt - rm -f "$temp_file" - msg_info "Restarting tinyauth" + rm -f /opt/tinyauth/tinyauth + curl -fsSL "https://github.com/steveiliop56/tinyauth/releases/download/v${RELEASE}/tinyauth-amd64" -o /opt/tinyauth/tinyauth + chmod +x /opt/tinyauth/tinyauth + echo "${RELEASE}" > /opt/tinyauth_version.txt + msg_info "Restarting Tinyauth" $STD service tinyauth start - msg_ok "Restarted tinyauth" - msg_ok "Updated tinyauth" + msg_ok "Restarted Tinyauth" + msg_ok "Updated Tinyauth" else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index ad426bbfe..12b475736 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -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:-0.5}" +var_disk="${var_disk:-1}" var_os="${var_os:-alpine}" var_version="${var_version:-3.21}" var_unprivileged="${var_unprivileged:-1}" @@ -66,4 +66,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. - ${BL}http://${IP}:8000${CL} \n" + ${BL}https://${IP}:8000${CL} \n" diff --git a/ct/authelia.sh b/ct/authelia.sh index 34733e551..08e039095 100644 --- a/ct/authelia.sh +++ b/ct/authelia.sh @@ -55,4 +55,4 @@ 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}:9091${CL}" +echo -e "${TAB}${GATEWAY}${BGN}https://YOUR_AUTHELIA_URL${CL}" diff --git a/ct/authentik.sh b/ct/authentik.sh deleted file mode 100644 index 2f063eec4..000000000 --- a/ct/authentik.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: remz1337 -# License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE -# Source: https://goauthentik.io/ - -APP="Authentik" -var_tags="${var_tags:-identity-provider}" -var_disk="${var_disk:-12}" -var_cpu="${var_cpu:-6}" -var_ram="${var_ram:-10240}" -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 [[ ! -f /etc/systemd/system/authentik-server.service ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -fsSL https://api.github.com/repos/goauthentik/authentik/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - NODE_VERSION="22" - PG_VERSION="16" - setup_uv - install_postgresql - install_node_and_modules - install_go - - msg_info "Stopping ${APP}" - systemctl stop authentik-server - systemctl stop authentik-worker - msg_ok "Stopped ${APP}" - - msg_info "Building ${APP} website" - mkdir -p /opt/authentik - curl -fsSL "${RELEASE}" -o "authentik.tar.gz" - tar -xzf authentik.tar.gz -C /opt/authentik --strip-components 1 --overwrite - rm -rf authentik.tar.gz - cd /opt/authentik/website - $STD npm install - $STD npm run build-bundled - cd /opt/authentik/web - $STD npm install - $STD npm run build - msg_ok "Built ${APP} website" - - msg_info "Building ${APP} server" - cd /opt/authentik - go mod download - go build -o /go/authentik ./cmd/server - go build -o /opt/authentik/authentik-server /opt/authentik/cmd/server/ - msg_ok "Built ${APP} server" - - msg_info "Building Authentik" - cd /opt/authentik - $STD uv sync --frozen --no-install-project --no-dev - uv run python -m lifecycle.migrate - ln -s /opt/authentik/.venv/bin/gunicorn /usr/local/bin/gunicorn - ln -s /opt/authentik/.venv/bin/celery /usr/local/bin/celery - msg_ok "Authentik built" - - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated ${APP} to v${RELEASE}" - - msg_info "Starting ${APP}" - systemctl start authentik-server - systemctl start authentik-worker - msg_ok "Started ${APP}" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - fi - exit -} - -start -build_container -description - -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}:9000/if/flow/initial-setup/${CL}" diff --git a/ct/backrest.sh b/ct/backrest.sh new file mode 100644 index 000000000..7dc740175 --- /dev/null +++ b/ct/backrest.sh @@ -0,0 +1,66 @@ +#!/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}" diff --git a/ct/baikal.sh b/ct/baikal.sh index c36baaad6..e06dd105d 100644 --- a/ct/baikal.sh +++ b/ct/baikal.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt curl -fsSL "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip" -o $(basename "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip") mv /opt/baikal /opt/baikal-backup - unzip -o -q "baikal-${RELEASE}.zip" + $STD unzip -o "baikal-${RELEASE}.zip" cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/ cp -r /opt/baikal-backup/Specific/ /opt/baikal/ chown -R www-data:www-data /opt/baikal/ diff --git a/ct/barcode-buddy.sh b/ct/barcode-buddy.sh index 00a71a1d7..32db1ca3c 100644 --- a/ct/barcode-buddy.sh +++ b/ct/barcode-buddy.sh @@ -38,7 +38,7 @@ function update_script() { cd /opt mv /opt/barcodebuddy/ /opt/barcodebuddy-backup curl -fsSL "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip") - unzip -q "v${RELEASE}.zip" + $STD unzip "v${RELEASE}.zip" mv "/opt/barcodebuddy-${RELEASE}" /opt/barcodebuddy cp -r /opt/barcodebuddy-backup/data/. /opt/barcodebuddy/data chown -R www-data:www-data /opt/barcodebuddy/data diff --git a/ct/bookstack.sh b/ct/bookstack.sh index 0388ddf5d..f408b8b39 100644 --- a/ct/bookstack.sh +++ b/ct/bookstack.sh @@ -36,7 +36,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" mv /opt/bookstack /opt/bookstack-backup curl -fsSL "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip" -o "/opt/BookStack-${RELEASE}.zip" - unzip -q "/opt/BookStack-${RELEASE}.zip" -d /opt + $STD unzip "/opt/BookStack-${RELEASE}.zip" -d /opt mv "/opt/BookStack-${RELEASE}" /opt/bookstack cp /opt/bookstack-backup/.env /opt/bookstack/.env [[ -d /opt/bookstack-backup/public/uploads ]] && cp -a /opt/bookstack-backup/public/uploads/. /opt/bookstack/public/uploads/ diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index 299975fa2..c69f3d749 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/mis APP="BunkerWeb" var_tags="${var_tags:-webserver}" var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-4096}" +var_ram="${var_ram:-8192}" var_disk="${var_disk:-4}" var_os="${var_os:-debian}" var_version="${var_version:-12}" diff --git a/ct/commafeed.sh b/ct/commafeed.sh index bade5f025..cacda60a5 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -42,7 +42,7 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" curl -fsSL "https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip" -o $(basename "https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip") - unzip -q commafeed-"${RELEASE}"-h2-jvm.zip + $STD unzip commafeed-"${RELEASE}"-h2-jvm.zip rsync -a --exclude 'data/' commafeed-"${RELEASE}"-h2/ /opt/commafeed/ rm -rf commafeed-"${RELEASE}"-h2 commafeed-"${RELEASE}"-h2-jvm.zip echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/ct/crafty-controller.sh b/ct/crafty-controller.sh index 5e5ce71ef..450295690 100644 --- a/ct/crafty-controller.sh +++ b/ct/crafty-controller.sh @@ -46,7 +46,7 @@ function update_script() { msg_info "Updating Crafty-Controller to v${RELEASE}" curl -fsSL "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" -o $(basename "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip") - unzip -q crafty-4-v${RELEASE}.zip + $STD unzip crafty-4-v${RELEASE}.zip cp -a crafty-4-v${RELEASE}/. /opt/crafty-controller/crafty/crafty-4/ rm -rf crafty-4-v${RELEASE} cd /opt/crafty-controller/crafty/crafty-4 diff --git a/ct/documenso.sh b/ct/documenso.sh index fd7884df8..c2c257e86 100644 --- a/ct/documenso.sh +++ b/ct/documenso.sh @@ -38,7 +38,7 @@ function update_script() { rm -rf /opt/documenso cd /opt curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip - unzip -q v${RELEASE}.zip + $STD unzip v${RELEASE}.zip mv documenso-${RELEASE} /opt/documenso cd /opt/documenso mv /opt/.env /opt/documenso/.env diff --git a/ct/elementsynapse.sh b/ct/elementsynapse.sh index 258ae4929..ce0d0dbf7 100644 --- a/ct/elementsynapse.sh +++ b/ct/elementsynapse.sh @@ -47,7 +47,7 @@ function update_script() { $STD apt-get -y upgrade msg_ok "Updated $APP LXC" - if [[ -f /systemd/system/synapse-admin.service ]]; then + if [[ -f /etc/systemd/system/synapse-admin.service ]]; then msg_info "Updating Synapse-Admin" RELEASE=$(curl -fsSL https://api.github.com/repos/etkecc/synapse-admin/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/"${APP}"_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then @@ -58,7 +58,16 @@ function update_script() { curl -fsSL "https://github.com/etkecc/synapse-admin/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar xzf "$temp_file" -C /opt/synapse-admin --strip-components=1 cd /opt/synapse-admin + $STD yarn global add serve $STD yarn install --ignore-engines + $STD yarn build + mv ./dist ../ && \ + rm -rf * && \ + mv ../dist ./ + if [[ -z $(grep "ExecStart=/usr/local/bin/serve" /etc/systemd/system/synapse-admin.service) ]]; then + sed -i 's|^ExecStart=.*|ExecStart=/usr/local/bin/serve -s dist -l 5173|' /etc/systemd/system/synapse-admin.service + systemctl reenable synapse-admin + fi systemctl start synapse-admin echo "${RELEASE}" >/opt/"${APP}"_version.txt rm -f "$temp_file" diff --git a/ct/fileflows.sh b/ct/fileflows.sh index e0575d3f8..32828c4ea 100644 --- a/ct/fileflows.sh +++ b/ct/fileflows.sh @@ -47,7 +47,7 @@ function update_script() { msg_info "Updating $APP to latest version" temp_file=$(mktemp) curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file" - unzip -oq -d /opt/fileflows "$temp_file" + $STD unzip -o -d /opt/fileflows "$temp_file" msg_ok "Updated $APP to latest version" msg_info "Starting $APP" diff --git a/ct/fluid-calendar.sh b/ct/fluid-calendar.sh index b25d48908..dc2f343d0 100644 --- a/ct/fluid-calendar.sh +++ b/ct/fluid-calendar.sh @@ -39,8 +39,8 @@ function update_script() { cp /opt/fluid-calendar/.env /opt/fluid.env rm -rf /opt/fluid-calendar tmp_file=$(mktemp) -curl -fsSL "https://github.com/dotnetfactory/fluid-calendar/archive/refs/tags/v${RELEASE}.zip" -o "$tmp_file" - unzip -q $tmp_file + curl -fsSL "https://github.com/dotnetfactory/fluid-calendar/archive/refs/tags/v${RELEASE}.zip" -o "$tmp_file" + $STD unzip $tmp_file mv ${APP}-${RELEASE}/ /opt/fluid-calendar mv /opt/fluid.env /opt/fluid-calendar/.env cd /opt/fluid-calendar @@ -74,4 +74,4 @@ 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}:3000${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/gitea-mirror.sh b/ct/gitea-mirror.sh new file mode 100644 index 000000000..9122e5f80 --- /dev/null +++ b/ct/gitea-mirror.sh @@ -0,0 +1,83 @@ +#!/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: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/arunavo4/gitea-mirror + +APP="gitea-mirror" +var_tags="${var_tags:-mirror;gitea}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-5}" +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/gitea-mirror ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/arunavo4/gitea-mirror/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 Services" + systemctl stop gitea-mirror + msg_ok "Services Stopped" + + msg_info "Backup Data" + mkdir -p /opt/gitea-mirror-backup/data + cp /opt/gitea-mirror/data/* /opt/gitea-mirror-backup/data/ + msg_ok "Backup Data" + + msg_info "Installing Bun" + export BUN_INSTALL=/opt/bun + curl -fsSL https://bun.sh/install | $STD bash + ln -sf /opt/bun/bin/bun /usr/local/bin/bun + ln -sf /opt/bun/bin/bun /usr/local/bin/bunx + msg_ok "Installed Bun" + + rm -rf /opt/gitea-mirror + fetch_and_deploy_gh_release "arunavo4/gitea-mirror" + + msg_info "Updating and rebuilding ${APP} to v${RELEASE}" + cd /opt/gitea-mirror + $STD bun run setup + $STD bun run build + APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4) + sudo sed -i.bak "s|^Environment=npm_package_version=.*|Environment=npm_package_version=${APP_VERSION}|" /etc/systemd/system/gitea-mirror.service + msg_ok "Updated and rebuilt ${APP} to v${RELEASE}" + + msg_info "Restoring Data" + cp /opt/gitea-mirror-backup/data/* /opt/gitea-mirror/data + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Restored Data" + + msg_info "Starting Service" + systemctl daemon-reload + systemctl start gitea-mirror + msg_ok "Service Started" + 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}:4321${CL}" diff --git a/ct/gotify.sh b/ct/gotify.sh index e27b285dd..eb5da7a9b 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -37,7 +37,7 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cd /opt/gotify curl -fsSL "https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-amd64.zip" -o $(basename "https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-amd64.zip") - unzip -oq gotify-linux-amd64.zip + $STD unzip -o gotify-linux-amd64.zip rm -rf gotify-linux-amd64.zip chmod +x gotify-linux-amd64 echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/ct/grist.sh b/ct/grist.sh index 82379ef93..9e3bb547d 100644 --- a/ct/grist.sh +++ b/ct/grist.sh @@ -41,7 +41,7 @@ function update_script() { rm -rf grist_bak mv grist grist_bak curl -fsSL "https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip") - unzip -q v$RELEASE.zip + $STD unzip v$RELEASE.zip mv grist-core-${RELEASE} grist mkdir -p grist/docs diff --git a/ct/headers/alpine-tinyauth b/ct/headers/alpine-tinyauth index 207a09037..9fff055f8 100644 --- a/ct/headers/alpine-tinyauth +++ b/ct/headers/alpine-tinyauth @@ -1,6 +1,6 @@ - ___ __ _ __ _ __ __ - / | / /___ (_)___ ___ / /_(_)___ __ ______ ___ __/ /_/ /_ - / /| | / / __ \/ / __ \/ _ \______/ __/ / __ \/ / / / __ `/ / / / __/ __ \ - / ___ |/ / /_/ / / / / / __/_____/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / / / -/_/ |_/_/ .___/_/_/ /_/\___/ \__/_/_/ /_/\__, /\__,_/\__,_/\__/_/ /_/ + ___ __ _ _______ __ __ + / | / /___ (_)___ ___ /_ __(_)___ __ ______ ___ __/ /_/ /_ + / /| | / / __ \/ / __ \/ _ \______/ / / / __ \/ / / / __ `/ / / / __/ __ \ + / ___ |/ / /_/ / / / / / __/_____/ / / / / / / /_/ / /_/ / /_/ / /_/ / / / +/_/ |_/_/ .___/_/_/ /_/\___/ /_/ /_/_/ /_/\__, /\__,_/\__,_/\__/_/ /_/ /_/ /____/ diff --git a/ct/headers/authentik b/ct/headers/authentik deleted file mode 100644 index f609964e0..000000000 --- a/ct/headers/authentik +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ __ __ _ __ - / | __ __/ /_/ /_ ___ ____ / /_(_) /__ - / /| |/ / / / __/ __ \/ _ \/ __ \/ __/ / //_/ - / ___ / /_/ / /_/ / / / __/ / / / /_/ / ,< -/_/ |_\__,_/\__/_/ /_/\___/_/ /_/\__/_/_/|_| - diff --git a/ct/headers/backrest b/ct/headers/backrest new file mode 100644 index 000000000..fd1f7f060 --- /dev/null +++ b/ct/headers/backrest @@ -0,0 +1,6 @@ + ____ __ __ + / __ )____ ______/ /__________ _____/ /_ + / __ / __ `/ ___/ //_/ ___/ _ \/ ___/ __/ + / /_/ / /_/ / /__/ ,< / / / __(__ ) /_ +/_____/\__,_/\___/_/|_/_/ \___/____/\__/ + diff --git a/ct/headers/gitea-mirror b/ct/headers/gitea-mirror new file mode 100644 index 000000000..57003b058 --- /dev/null +++ b/ct/headers/gitea-mirror @@ -0,0 +1,6 @@ + _ __ _ + ____ _(_) /____ ____ _ ____ ___ (_)_____________ _____ + / __ `/ / __/ _ \/ __ `/_____/ __ `__ \/ / ___/ ___/ __ \/ ___/ + / /_/ / / /_/ __/ /_/ /_____/ / / / / / / / / / / /_/ / / + \__, /_/\__/\___/\__,_/ /_/ /_/ /_/_/_/ /_/ \____/_/ +/____/ diff --git a/ct/headers/immich b/ct/headers/immich new file mode 100644 index 000000000..3b08b432a --- /dev/null +++ b/ct/headers/immich @@ -0,0 +1,6 @@ + _ _ __ + (_)___ ___ ____ ___ (_)____/ /_ + / / __ `__ \/ __ `__ \/ / ___/ __ \ + / / / / / / / / / / / / / /__/ / / / +/_/_/ /_/ /_/_/ /_/ /_/_/\___/_/ /_/ + diff --git a/ct/headers/lyrionmusicserver b/ct/headers/lyrionmusicserver new file mode 100644 index 000000000..f23c024e8 --- /dev/null +++ b/ct/headers/lyrionmusicserver @@ -0,0 +1,6 @@ + __ _ __ ___ _ _____ + / / __ _______(_)___ ____ / |/ /_ _______(_)____ / ___/___ ______ _____ _____ + / / / / / / ___/ / __ \/ __ \ / /|_/ / / / / ___/ / ___/ \__ \/ _ \/ ___/ | / / _ \/ ___/ + / /___/ /_/ / / / / /_/ / / / / / / / / /_/ (__ ) / /__ ___/ / __/ / | |/ / __/ / +/_____/\__, /_/ /_/\____/_/ /_/ /_/ /_/\__,_/____/_/\___/ /____/\___/_/ |___/\___/_/ + /____/ diff --git a/ct/headers/managemydamnlife b/ct/headers/managemydamnlife new file mode 100644 index 000000000..1ff4b5fcb --- /dev/null +++ b/ct/headers/managemydamnlife @@ -0,0 +1,6 @@ + __ ___ __ ___ ____ __ _ ____ + / |/ /___ _____ ____ _____ ____ / |/ /_ __ / __ \____ _____ ___ ____ / / (_) __/__ + / /|_/ / __ `/ __ \/ __ `/ __ `/ _ \ / /|_/ / / / / / / / / __ `/ __ `__ \/ __ \ / / / / /_/ _ \ + / / / / /_/ / / / / /_/ / /_/ / __/ / / / / /_/ / / /_/ / /_/ / / / / / / / / / / /___/ / __/ __/ +/_/ /_/\__,_/_/ /_/\__,_/\__, /\___/ /_/ /_/\__, / /_____/\__,_/_/ /_/ /_/_/ /_/ /_____/_/_/ \___/ + /____/ /____/ diff --git a/ct/headers/minarca b/ct/headers/minarca new file mode 100644 index 000000000..0c6cbdf78 --- /dev/null +++ b/ct/headers/minarca @@ -0,0 +1,6 @@ + __ ____ + / |/ (_)___ ____ _______________ _ + / /|_/ / / __ \/ __ `/ ___/ ___/ __ `/ + / / / / / / / / /_/ / / / /__/ /_/ / +/_/ /_/_/_/ /_/\__,_/_/ \___/\__,_/ + diff --git a/ct/headers/oauth2-proxy b/ct/headers/oauth2-proxy new file mode 100644 index 000000000..30bd3126a --- /dev/null +++ b/ct/headers/oauth2-proxy @@ -0,0 +1,6 @@ + __ __ ___ + ____ ____ ___ __/ /_/ /_ |__ \ ____ _________ _ ____ __ + / __ \/ __ `/ / / / __/ __ \__/ /_____/ __ \/ ___/ __ \| |/_/ / / / +/ /_/ / /_/ / /_/ / /_/ / / / __/_____/ /_/ / / / /_/ /> =")[1] | split(".")[0]') + NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')" + install_node_and_modules + + rm -rf /opt/homarr + fetch_and_deploy_gh_release "homarr-labs/homarr" + msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)" rm /opt/run_homarr.sh cat <<'EOF' >/opt/run_homarr.sh @@ -117,12 +130,6 @@ node apps/nextjs/server.js & PID=$! wait $PID EOF chmod +x /opt/run_homarr.sh - $STD command -v jq || $STD apt-get update && $STD apt-get install -y jq - NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]') - NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')" - install_node_and_modules - rm -rf /opt/homarr - fetch_and_deploy_gh_release "homarr-labs/homarr" mv /opt/homarr-data-backup/.env /opt/homarr/.env cd /opt/homarr $STD pnpm install --recursive --frozen-lockfile --shamefully-hoist diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index b06308c67..425fbb67e 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -104,7 +104,6 @@ function update_script() { if [ "$UPD" == "2" ]; then msg_info "Installing Home Assistant Community Store (HACS)" $STD apt update - $STD apt install -y unzip cd /root/.homeassistant $STD bash <(curl -fsSL https://get.hacs.xyz) msg_ok "Installed Home Assistant Community Store (HACS)" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index fac86ea9c..613b935fd 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -62,7 +62,6 @@ function update_script() { if [ "$UPD" == "3" ]; then msg_info "Installing Home Assistant Community Store (HACS)" $STD apt update - $STD apt install unzip cd /var/lib/docker/volumes/hass_config/_data $STD bash <(curl -fsSL https://get.hacs.xyz) msg_ok "Installed Home Assistant Community Store (HACS)" diff --git a/ct/immich.sh b/ct/immich.sh new file mode 100644 index 000000000..c925c52b0 --- /dev/null +++ b/ct/immich.sh @@ -0,0 +1,319 @@ +#!/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: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://immich.app + +APP="immich" +var_tags="${var_tags:-photos}" +var_disk="${var_disk:-20}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +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/immich ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + STAGING_DIR=/opt/staging + BASE_DIR=${STAGING_DIR}/base-images + SOURCE_DIR=${STAGING_DIR}/image-source + if [[ -f ~/.intel_version ]]; then + curl -fsSLO https://raw.githubusercontent.com/immich-app/immich/refs/heads/main/machine-learning/Dockerfile + readarray -t INTEL_URLS < <(sed -n "/intel/p" ./Dockerfile | awk '{print $3}') + INTEL_RELEASE="$(grep "intel-opencl-icd" ./Dockerfile | awk -F '_' '{print $2}')" + if [[ "$INTEL_RELEASE" != "$(cat ~/.intel_version)" ]]; then + msg_info "Updating Intel iGPU dependencies" + for url in "${INTEL_URLS[@]}"; do + curl -fsSLO "$url" + done + $STD dpkg -i ./*.deb + rm ./*.deb + msg_ok "Intel iGPU dependencies updated" + fi + rm ~/Dockerfile + fi + if [[ -f ~/.immich_library_revisions ]]; then + libraries=("libjxl" "libheif" "libraw" "imagemagick" "libvips") + readarray -d '' NEW_REVISIONS < <(for library in "${libraries[@]}"; do + echo "$library: $(curl -fsSL https://raw.githubusercontent.com/immich-app/base-images/refs/heads/main/server/sources/"$library".json | jq -cr '.revision' -)" + done) + UPDATED_REVISIONS="$(comm -13 <(sort ~/.immich_library_revisions) <(echo -n "${NEW_REVISIONS[@]}" | sort))" + if [[ "$UPDATED_REVISIONS" ]]; then + readarray -t NAMES < <(echo "$UPDATED_REVISIONS" | awk -F ':' '{print $1}') + rm -rf "$SOURCE_DIR" + mkdir -p "$SOURCE_DIR" + cd "$BASE_DIR" + $STD git pull + cd "$STAGING_DIR" + for name in "${NAMES[@]}"; do + if [[ "$name" == "libjxl" ]]; then + msg_info "Recompiling libjxl" + SOURCE=${SOURCE_DIR}/libjxl + JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62" + JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0" + : "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}" + $STD git clone https://github.com/libjxl/libjxl.git "$SOURCE" + cd "$SOURCE" + $STD git reset --hard "$LIBJXL_REVISION" + $STD git submodule update --init --recursive --depth 1 --recommend-shallow + $STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-empty-dht-marker.patch + $STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-icc-warning.patch + mkdir build + cd build + $STD cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DJPEGXL_ENABLE_DOXYGEN=OFF \ + -DJPEGXL_ENABLE_MANPAGES=OFF \ + -DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF \ + -DJPEGXL_ENABLE_BENCHMARK=OFF \ + -DJPEGXL_ENABLE_EXAMPLES=OFF \ + -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ + -DJPEGXL_FORCE_SYSTEM_HWY=ON \ + -DJPEGXL_ENABLE_JPEGLI=ON \ + -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON \ + -DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \ + -DJPEGXL_ENABLE_PLUGINS=ON \ + -DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="$JPEGLI_LIBJPEG_LIBRARY_SOVERSION" \ + -DJPEGLI_LIBJPEG_LIBRARY_VERSION="$JPEGLI_LIBJPEG_LIBRARY_VERSION" \ + -DLIBJPEG_TURBO_VERSION_NUMBER=2001005 \ + .. + $STD cmake --build . -- -j"$(nproc)" + $STD cmake --install . + ldconfig /usr/local/lib + $STD make clean + cd "$STAGING_DIR" + rm -rf "$SOURCE"/{build,third_party} + msg_ok "Recompiled libjxl" + fi + if [[ "$name" == "libheif" ]]; then + msg_info "Recompiling libheif" + SOURCE=${SOURCE_DIR}/libheif + : "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}" + $STD git clone https://github.com/strukturag/libheif.git "$SOURCE" + cd "$SOURCE" + $STD git reset --hard "$LIBHEIF_REVISION" + mkdir build + cd build + $STD cmake --preset=release-noplugins \ + -DWITH_DAV1D=ON \ + -DENABLE_PARALLEL_TILE_DECODING=ON \ + -DWITH_LIBSHARPYUV=ON \ + -DWITH_LIBDE265=ON \ + -DWITH_AOM_DECODER=OFF \ + -DWITH_AOM_ENCODER=OFF \ + -DWITH_X265=OFF \ + -DWITH_EXAMPLES=OFF \ + .. + $STD make install -j "$(nproc)" + ldconfig /usr/local/lib + $STD make clean + cd "$STAGING_DIR" + rm -rf "$SOURCE"/build + msg_ok "Recompiled libheif" + fi + if [[ "$name" == "libraw" ]]; then + msg_info "Recompiling libraw" + SOURCE=${SOURCE_DIR}/libraw + : "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}" + $STD git clone https://github.com/libraw/libraw.git "$SOURCE" + cd "$SOURCE" + $STD git reset --hard "$LIBRAW_REVISION" + $STD autoreconf --install + $STD ./configure + $STD make -j"$(nproc)" + $STD make install + ldconfig /usr/local/lib + $STD make clean + cd "$STAGING_DIR" + msg_ok "Recompiled libraw" + fi + if [[ "$name" == "imagemagick" ]]; then + msg_info "Recompiling ImageMagick" + SOURCE=$SOURCE_DIR/imagemagick + : "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/imagemagick.json)}" + $STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE" + cd "$SOURCE" + $STD git reset --hard "$IMAGEMAGICK_REVISION" + $STD ./configure --with-modules + $STD make -j"$(nproc)" + $STD make install + ldconfig /usr/local/lib + $STD make clean + cd "$STAGING_DIR" + msg_ok "Recompiled ImageMagick" + fi + if [[ "$name" == "libvips" ]]; then + msg_info "Recompiling libvips" + SOURCE=$SOURCE_DIR/libvips + : "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}" + $STD git clone https://github.com/libvips/libvips.git "$SOURCE" + cd "$SOURCE" + $STD git reset --hard "$LIBVIPS_REVISION" + $STD meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled + cd build + $STD ninja install + ldconfig /usr/local/lib + cd "$STAGING_DIR" + rm -rf "$SOURCE"/build + msg_ok "Recompiled libvips" + fi + done + echo -n "${NEW_REVISIONS[@]}" >~/.immich_library_revisions + msg_ok "Image-processing libraries compiled" + fi + fi + RELEASE=$(curl -s https://api.github.com/repos/immich-app/immich/releases?per_page=1 | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping ${APP} services" + systemctl stop immich-web + systemctl stop immich-ml + msg_ok "Stopped ${APP}" + if [[ "$(cat /opt/${APP}_version.txt)" < "1.133.0" ]]; then + msg_info "Upgrading to the VectorChord PostgreSQL extension" + NUMBER="$( + sed -n '2p' <( + sudo -u postgres psql -A -d immich < 0 + AND c.relname = 'smart_search'::text + AND f.attname = 'embedding'::text; +EOF + ) + )" + $STD sudo -u postgres psql -d immich </opt/"${APP}"_version.txt + msg_ok "Updated ${APP} to v${RELEASE}" + + msg_info "Cleaning up" + rm -f "$immich_zip" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleaned" + else + msg_ok "${APP} is already at v${RELEASE}" + fi + systemctl restart immich-ml immich-web + 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}:2283${CL}" diff --git a/ct/karakeep.sh b/ct/karakeep.sh index 81569c3d9..4c74ea6c3 100644 --- a/ct/karakeep.sh +++ b/ct/karakeep.sh @@ -50,7 +50,7 @@ function update_script() { fi rm -rf /opt/karakeep curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" - unzip -q "v${RELEASE}.zip" + $STD unzip "v${RELEASE}.zip" mv karakeep-"${RELEASE}" /opt/karakeep cd /opt/karakeep/apps/web $STD pnpm install --frozen-lockfile diff --git a/ct/kasm.sh b/ct/kasm.sh index 066471aef..1cfecf352 100644 --- a/ct/kasm.sh +++ b/ct/kasm.sh @@ -8,11 +8,11 @@ source <(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/mis APP="Kasm" var_tags="${var_tags:-os}" var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-4192}" +var_ram="${var_ram:-8192}" var_disk="${var_disk:-30}" var_os="${var_os:-debian}" var_version="${var_version:-12}" -var_unprivileged="${var_unprivileged:-1}" +var_unprivileged="${var_unprivileged:-0}" var_fuse="${var_fuse:-yes}" var_tun="${var_tun:-yes}" diff --git a/ct/kimai.sh b/ct/kimai.sh index 0701bb711..054d6774c 100644 --- a/ct/kimai.sh +++ b/ct/kimai.sh @@ -64,7 +64,7 @@ function update_script() { trap "echo Unable to download release file for version ${RELEASE}; try again later" ERR set -e curl -fsSL "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip") - unzip -q "${RELEASE}".zip + $STD unzip "${RELEASE}".zip set +e trap - ERR rm -rf /opt/kimai diff --git a/ct/koillection.sh b/ct/koillection.sh index a9aa1604c..5fbb9f532 100644 --- a/ct/koillection.sh +++ b/ct/koillection.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt mv /opt/koillection/ /opt/koillection-backup curl -fsSL "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip") - unzip -q "${RELEASE}.zip" + $STD unzip "${RELEASE}.zip" mv "/opt/koillection-${RELEASE}" /opt/koillection cd /opt/koillection cp -r /opt/koillection-backup/.env.local /opt/koillection diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 39239b811..7c684e117 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -1,17 +1,17 @@ #!/usr/bin/env bash source <(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# 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 diff --git a/ct/lldap.sh b/ct/lldap.sh index 48fef229b..654e044b0 100644 --- a/ct/lldap.sh +++ b/ct/lldap.sh @@ -23,7 +23,7 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -f /etc/systemd/system/lldap.service ]]; then + if [[ ! -f /lib/systemd/system/lldap.service ]]; then msg_error "No ${APP} Installation Found!" exit fi diff --git a/ct/lubelogger.sh b/ct/lubelogger.sh index 96a0e01d2..95bddb515 100644 --- a/ct/lubelogger.sh +++ b/ct/lubelogger.sh @@ -50,7 +50,7 @@ function update_script() { [[ -e /opt/lubelogger/wwwroot/temp ]] && cp -r /opt/lubelogger/wwwroot/temp /tmp/lubeloggerData/data/ [[ -e /opt/lubelogger/log ]] && cp -r /opt/lubelogger/log /tmp/lubeloggerData/ rm -rf /opt/lubelogger - unzip -qq LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip -d lubelogger + $STD unzip LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip -d lubelogger chmod 700 /opt/lubelogger/CarCareTracker cp -rf /tmp/lubeloggerData/* /opt/lubelogger/ echo "${RELEASE}" >"/opt/${APP}_version.txt" diff --git a/ct/lyrionmusicserver.sh b/ct/lyrionmusicserver.sh new file mode 100644 index 000000000..533aad25b --- /dev/null +++ b/ct/lyrionmusicserver.sh @@ -0,0 +1,61 @@ +#!/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: Omar Minaya +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://lyrion.org/getting-started/ + +APP="Lyrion Music Server" +var_tags="${var_tags:-media}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-3}" +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 [[ ! -f /lib/systemd/system/lyrionmusicserver.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + DEB_URL=$(curl -s 'https://lyrion.org/getting-started/' | grep -oP ']*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1) + RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)') + DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb" + if [[ ! -f /opt/lyrion_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/lyrion_version.txt)" ]]; then + msg_info "Updating $APP to ${RELEASE}" + curl -fsSL -o "$DEB_FILE" "$DEB_URL" + $STD apt install "$DEB_FILE" -y + systemctl restart lyrion + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Cleaning up" + $STD rm -f "$DEB_FILE" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleaned" + else + msg_ok "$APP is already up to date (${RELEASE})" + fi +} + +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 the web interface at:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9000${CL}" diff --git a/ct/managemydamnlife.sh b/ct/managemydamnlife.sh new file mode 100644 index 000000000..ee198b3d4 --- /dev/null +++ b/ct/managemydamnlife.sh @@ -0,0 +1,78 @@ +#!/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: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/intri-in/manage-my-damn-life-nextjs + +APP="Manage My Damn Life" +var_tags="${var_tags:-calendar;tasks}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-6}" +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/mmdl ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -fsSL https://api.github.com/repos/intri-in/manage-my-damn-life-nextjs/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/mmdl_version.txt)" ]] || [[ ! -f /opt/mmdl_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop mmdl + msg_ok "Stopped $APP" + + msg_info "Creating Backup" + cp /opt/mmdl/.env /opt/mmdl.env + msg_ok "Backup Created" + + msg_info "Updating $APP to v${RELEASE}" + curl -fsSLO "https://github.com/intri-in/manage-my-damn-life-nextjs/archive/refs/tags/v${RELEASE}.zip" + rm -r /opt/mmdl + unzip -q v"$RELEASE".zip + mv manage-my-damn-life-nextjs-"$RELEASE"/ /opt/mmdl + mv /opt/mmdl.env /opt/mmdl/.env + cd /opt/mmdl + $STD npm install + $STD npm run migrate + $STD npm run build + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start mmdl + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -f ~/v"$RELEASE".zip + msg_ok "Cleanup Completed" + + # Last Action + echo "$RELEASE" >/opt/mmdl_version.txt + msg_ok "Update Successful" + 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}:3000${CL}" diff --git a/ct/meilisearch.sh b/ct/meilisearch.sh index 4ade9d27f..a2088759b 100644 --- a/ct/meilisearch.sh +++ b/ct/meilisearch.sh @@ -69,7 +69,7 @@ function update_script() { rm -rf /opt/meilisearch-ui mkdir -p /opt/meilisearch-ui curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o $tmp_file - unzip -q "$tmp_file" -d "$tmp_dir" + $STD unzip "$tmp_file" -d "$tmp_dir" mv "$tmp_dir"/*/* /opt/meilisearch-ui/ cd /opt/meilisearch-ui sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts diff --git a/ct/minarca.sh b/ct/minarca.sh new file mode 100644 index 000000000..b7a4032a8 --- /dev/null +++ b/ct/minarca.sh @@ -0,0 +1,54 @@ +#!/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: SlaviΕ‘a AreΕΎina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://minarca.org/en_CA + +APP="Minarca" +var_tags="${var_tags:-backup}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" +var_fuse="${var_fuse:-yes}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/minarca-server ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping ${APP}" + systemctl stop minarca-server + msg_ok "${APP} Stopped" + + msg_info "Updating ${APP} LXC" + $STD apt-get update + $STD apt-get upgrade -y + msg_ok "Updated ${APP} LXC" + + msg_info "Starting ${APP}" + systemctl start minarca-server + msg_ok "Restarted ${APP}" + 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}:8080${CL}" diff --git a/ct/myspeed.sh b/ct/myspeed.sh index 24e71f9d8..5f6c822ee 100644 --- a/ct/myspeed.sh +++ b/ct/myspeed.sh @@ -39,7 +39,7 @@ function update_script() { rm -rf myspeed_bak mv myspeed myspeed_bak curl -fsSL "https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip" -o $(basename "https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip") - unzip -q MySpeed-$RELEASE.zip -d myspeed + $STD unzip MySpeed-$RELEASE.zip -d myspeed cd myspeed $STD npm install echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/ct/netbox.sh b/ct/netbox.sh index a1af9f44c..caa3b6cdd 100644 --- a/ct/netbox.sh +++ b/ct/netbox.sh @@ -39,7 +39,7 @@ function update_script() { mv /opt/netbox/ /opt/netbox-backup cd /opt curl -fsSL "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip") - unzip -q "v${RELEASE}.zip" + $STD unzip "v${RELEASE}.zip" mv /opt/netbox-${RELEASE}/ /opt/netbox/ cp -r /opt/netbox-backup/netbox/netbox/configuration.py /opt/netbox/netbox/netbox/ diff --git a/ct/oauth2-proxy.sh b/ct/oauth2-proxy.sh new file mode 100644 index 000000000..f6cfe77dc --- /dev/null +++ b/ct/oauth2-proxy.sh @@ -0,0 +1,64 @@ +#!/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: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/oauth2-proxy/oauth2-proxy/ + +APP="oauth2-proxy" +var_tags="${var_tags:-os}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-3}" +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/oauth2-proxy ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -fsSL https://api.github.com/repos/oauth2-proxy/oauth2-proxy/releases/latest | jq -r .tag_name | sed 's/^v//') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP} services" + systemctl stop oauth2-proxy + msg_ok "Stopped ${APP}" + + msg_info "Updating $APP to ${RELEASE}" + rm -f /opt/oauth2-proxy/oauth2-proxy + curl -fsSL "https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v${RELEASE}/oauth2-proxy-v${RELEASE}.linux-amd64.tar.gz" -o /opt/oauth2-proxy.tar.gz + tar -xzf /opt/oauth2-proxy.tar.gz + mv /opt/oauth2-proxy-v${RELEASE}.linux-amd64/oauth2-proxy /opt/oauth2-proxy + systemctl start oauth2-proxy + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Cleaning up" + rm -f "/opt/oauth2-proxy.tar.gz" + rm -rf "/opt/oauth2-proxy-v${RELEASE}.linux-amd64" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleaned" + else + msg_ok "${APP} is already up to date (${RELEASE})" + fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Now you can modify /opt/oauth2-proxy/config.toml with your needed config.${CL}" diff --git a/ct/paperless-ai.sh b/ct/paperless-ai.sh index b063c11f0..51b70dfdd 100644 --- a/ct/paperless-ai.sh +++ b/ct/paperless-ai.sh @@ -40,7 +40,7 @@ function update_script() { cd /opt mv /opt/paperless-ai /opt/paperless-ai_bak curl -fsSL "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip") - unzip -q v${RELEASE}.zip + $STD unzip v${RELEASE}.zip mv paperless-ai-${RELEASE} /opt/paperless-ai mkdir -p /opt/paperless-ai/data cp -a /opt/paperless-ai_bak/data/. /opt/paperless-ai/data/ diff --git a/ct/part-db.sh b/ct/part-db.sh index 92ce28b9a..2977f2c32 100644 --- a/ct/part-db.sh +++ b/ct/part-db.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt mv /opt/partdb/ /opt/partdb-backup curl -fsSL "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip") - unzip -q "v${RELEASE}.zip" + $STD unzip "v${RELEASE}.zip" mv /opt/Part-DB-server-${RELEASE}/ /opt/partdb cd /opt/partdb/ diff --git a/ct/petio.sh b/ct/petio.sh index 33a1620e7..28a0413dd 100644 --- a/ct/petio.sh +++ b/ct/petio.sh @@ -19,20 +19,20 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/Petio ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating $APP" - systemctl stop petio.service - curl -fsSL https://petio.tv/releases/latest -o petio-latest.zip - unzip petio-latest.zip -d /opt/Petio - systemctl start petio.service - msg_ok "Updated $APP" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/Petio ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Updating $APP" + systemctl stop petio.service + curl -fsSL https://petio.tv/releases/latest -o petio-latest.zip + $STD unzip petio-latest.zip -d /opt/Petio + systemctl start petio.service + msg_ok "Updated $APP" + exit } start diff --git a/ct/pf2etools.sh b/ct/pf2etools.sh index b8ca6427d..3b022c2e2 100644 --- a/ct/pf2etools.sh +++ b/ct/pf2etools.sh @@ -39,7 +39,7 @@ function update_script() { msg_info "Updating ${APP}" cd /opt curl -fsSL "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip") - unzip -q ${RELEASE}.zip + $STD unzip ${RELEASE}.zip rm -rf "/opt/${APP}" mv ${APP}-${RELEASE:1} /opt/${APP} cd /opt/Pf2eTools diff --git a/ct/phpipam.sh b/ct/phpipam.sh index ff8461547..6169a38a1 100644 --- a/ct/phpipam.sh +++ b/ct/phpipam.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt mv /opt/phpipam/ /opt/phpipam-backup curl -fsSL "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip" -o $(basename "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip") - unzip -q "phpipam-v${RELEASE}.zip" + $STD unzip "phpipam-v${RELEASE}.zip" cp /opt/phpipam-backup/config.php /opt/phpipam echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 335b5e1b7..c311c88bc 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -38,7 +38,7 @@ function update_script() { msg_info "Updating Pingvin Share to v${RELEASE}" cd /opt curl -fsSL "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip") - unzip -q v${RELEASE}.zip + $STD unzip v${RELEASE}.zip cp -rf pingvin-share-${RELEASE}/* /opt/pingvin-share cd /opt/pingvin-share cd backend diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 432cad456..a73fa5815 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -58,7 +58,6 @@ function update_script() { if [ "$UPD" == "2" ]; then msg_info "Installing Home Assistant Community Store (HACS)" $STD apt update - $STD apt install unzip cd /var/lib/containers/storage/volumes/hass_config/_data $STD bash <(curl -fsSL https://get.hacs.xyz) msg_ok "Installed Home Assistant Community Store (HACS)" diff --git a/ct/privatebin.sh b/ct/privatebin.sh index 224e81cc0..bf0cea11b 100644 --- a/ct/privatebin.sh +++ b/ct/privatebin.sh @@ -33,7 +33,7 @@ function update_script() { echo "${RELEASE}" >/opt/${APP}_version.txt cp -f /opt/privatebin/cfg/conf.php /tmp/privatebin_conf.bak curl -fsSL "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip") - unzip -q ${RELEASE}.zip + $STD unzip ${RELEASE}.zip rm -rf /opt/privatebin/* mv PrivateBin-${RELEASE}/* /opt/privatebin/ mv /tmp/privatebin_conf.bak /opt/privatebin/cfg/conf.php diff --git a/ct/projectsend.sh b/ct/projectsend.sh index c012205cd..a52b18019 100644 --- a/ct/projectsend.sh +++ b/ct/projectsend.sh @@ -36,7 +36,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" cd /opt curl -fsSL "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip" -o $(basename "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip") - unzip -o -q "projectsend-r${RELEASE}.zip" -d projectsend + $STD unzip -o "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 diff --git a/ct/pulse.sh b/ct/pulse.sh new file mode 100644 index 000000000..c0379b3b7 --- /dev/null +++ b/ct/pulse.sh @@ -0,0 +1,70 @@ +#!/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: rcourtman +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/rcourtman/Pulse + +APP="Pulse" +var_tags="${var_tags:-monitoring,proxmox}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-4}" +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/pulse-monitor ]]; then + msg_error "An old installation was detected. Please recreate the LXC from scratch (https://github.com/community-scripts/ProxmoxVE/pull/4848)" + exit 1 + fi + if [[ ! -d /opt/pulse ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/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 pulse + msg_ok "Stopped ${APP}" + + msg_info "Updating Pulse" + temp_file=$(mktemp) + mkdir -p /opt/pulse + rm -rf /opt/pulse/* + curl -fsSL "https://github.com/rcourtman/Pulse/releases/download/v${RELEASE}/pulse-v${RELEASE}.tar.gz" -o "$temp_file" + tar zxf "$temp_file" --strip-components=1 -C /opt/pulse + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated Pulse to ${RELEASE}" + + msg_info "Setting permissions for /opt/pulse..." + chown -R pulse:pulse "/opt/pulse" + find "/opt/pulse" -type d -exec chmod 755 {} \; + find "/opt/pulse" -type f -exec chmod 644 {} \; + msg_ok "Set permissions." + + msg_info "Starting ${APP}" + systemctl start pulse + msg_ok "Started ${APP}" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}." + fi +} + +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}:7655${CL}" diff --git a/ct/rclone.sh b/ct/rclone.sh index 8e1050560..9b1c9ace0 100644 --- a/ct/rclone.sh +++ b/ct/rclone.sh @@ -13,6 +13,7 @@ var_disk="${var_disk:-2}" var_os="${var_os:-debian}" var_version="${var_version:-12}" var_unprivileged="${var_unprivileged:-1}" +var_fuse="${var_fuse:-yes}" header_info "$APP" variables diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 02970e177..c37c2c488 100644 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -20,38 +20,38 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/rdtc/ ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Stopping ${APP}" - systemctl stop rdtc - msg_ok "Stopped ${APP}" - - msg_info "Updating ${APP}" - if dpkg-query -W dotnet-sdk-8.0 >/dev/null 2>&1; then - $STD apt-get remove --purge -y dotnet-sdk-8.0 - $STD apt-get install -y dotnet-sdk-9.0 - fi - mkdir -p rdtc-backup - cp -R /opt/rdtc/appsettings.json rdtc-backup/ - curl -fsSL "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip" -o $(basename "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip") - unzip -oqq RealDebridClient.zip -d /opt/rdtc - cp -R rdtc-backup/appsettings.json /opt/rdtc/ - msg_ok "Updated ${APP}" - - msg_info "Starting ${APP}" - systemctl start rdtc - msg_ok "Started ${APP}" - - msg_info "Cleaning Up" - rm -rf rdtc-backup RealDebridClient.zip - msg_ok "Cleaned" - msg_ok "Updated Successfully" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/rdtc/ ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Stopping ${APP}" + systemctl stop rdtc + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP}" + if dpkg-query -W dotnet-sdk-8.0 >/dev/null 2>&1; then + $STD apt-get remove --purge -y dotnet-sdk-8.0 + $STD apt-get install -y dotnet-sdk-9.0 + fi + mkdir -p rdtc-backup + cp -R /opt/rdtc/appsettings.json rdtc-backup/ + curl -fsSL "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip" -o $(basename "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip") + $STD unzip -o RealDebridClient.zip -d /opt/rdtc + cp -R rdtc-backup/appsettings.json /opt/rdtc/ + msg_ok "Updated ${APP}" + + msg_info "Starting ${APP}" + systemctl start rdtc + msg_ok "Started ${APP}" + + msg_info "Cleaning Up" + rm -rf rdtc-backup RealDebridClient.zip + msg_ok "Cleaned" + msg_ok "Updated Successfully" + exit } start diff --git a/ct/reactive-resume.sh b/ct/reactive-resume.sh index d122d52dd..d1093e274 100644 --- a/ct/reactive-resume.sh +++ b/ct/reactive-resume.sh @@ -39,7 +39,7 @@ function update_script() { res_tmp=$(mktemp) rm -rf /opt/${APP} curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -O $res_tmp - unzip -q $res_tmp + $STD unzip $res_tmp mv ${APP}-${RELEASE}/ /opt/${APP} cd /opt/${APP} export PUPPETEER_SKIP_DOWNLOAD="true" @@ -66,7 +66,7 @@ function update_script() { brwsr_tmp=$(mktemp) TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -O $brwsr_tmp - unzip -q $brwsr_tmp + $STD unzip $brwsr_tmp mv browserless-${TAG}/ /opt/browserless cd /opt/browserless $STD npm install diff --git a/ct/searxng.sh b/ct/searxng.sh index 66f9ca6b1..b0329cadd 100644 --- a/ct/searxng.sh +++ b/ct/searxng.sh @@ -27,6 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + sed -i 's/^\([[:space:]]*limiter:\)[[:space:]]*true/\1 false/' /etc/searxng/settings.yml if cd /usr/local/searxng/searxng-src && git pull | grep -q 'Already up to date'; then msg_ok "There is currently no update available." fi @@ -39,4 +40,4 @@ 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}:8888${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}" diff --git a/ct/seelf.sh b/ct/seelf.sh index 57b5e3377..f25ecaf55 100644 --- a/ct/seelf.sh +++ b/ct/seelf.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source <(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG -# Author: tremor021 +# Author: SlaviΕ‘a AreΕΎina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/YuukanOO/seelf @@ -20,49 +20,31 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources + header_info + check_container_storage + check_container_resources - if [[ ! -d /opt/seelf ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - RELEASE=$(curl -fsSL https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Updating $APP" - - msg_info "Stopping $APP" - systemctl stop seelf - msg_ok "Stopped $APP" - - msg_info "Updating $APP to v${RELEASE}. Patience" - export PATH=$PATH:/usr/local/go/bin - source ~/.bashrc - curl -fsSL "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz" -o $(basename "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz") - tar -xzf v${RELEASE}.tar.gz - cp -r seelf-${RELEASE}/ /opt/seelf - cd /opt/seelf - $STD make build - msg_ok "Updated $APP to v${RELEASE}" - - msg_info "Starting $APP" - systemctl start seelf - msg_ok "Started $APP" - - # Cleaning up - msg_info "Cleaning Up" - rm -f ~/*.tar.gz - rm -rf ~/seelf-${RELEASE} - msg_ok "Cleanup Completed" - - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Update Successful" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - fi + if [[ ! -d /opt/seelf ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + if fetch_and_deploy_gh_release "YuukanOO/seelf"; then + msg_ok "$APP already at the latest version. No update required." + else + msg_info "Stopping $APP" + systemctl stop seelf + msg_ok "Stopped $APP" + + msg_info "Updating $APP" + cd /opt/seelf + $STD make build + msg_ok "Updated $APP" + + msg_info "Starting $APP" + systemctl start seelf + msg_ok "Started $APP" + fi + exit } start diff --git a/ct/silverbullet.sh b/ct/silverbullet.sh index 9d6115c20..7d2a4b858 100644 --- a/ct/silverbullet.sh +++ b/ct/silverbullet.sh @@ -34,7 +34,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" curl -fsSL "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-x86_64.zip" -o $(basename "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-x86_64.zip") - unzip -q silverbullet-server-linux-x86_64.zip + $STD unzip silverbullet-server-linux-x86_64.zip mv silverbullet /opt/silverbullet/bin/ chmod +x /opt/silverbullet/bin/silverbullet echo "${RELEASE}" >/opt/silverbullet/${APP}_version.txt diff --git a/ct/slskd.sh b/ct/slskd.sh index 1a4d34a9f..b2919094e 100644 --- a/ct/slskd.sh +++ b/ct/slskd.sh @@ -38,7 +38,7 @@ function update_script() { msg_info "Updating $APP to v${RELEASE}" tmp_file=$(mktemp) curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -o $tmp_file - unzip -q -oj $tmp_file slskd -d /opt/${APP} + $STD unzip -oj $tmp_file slskd -d /opt/${APP} echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" @@ -55,7 +55,7 @@ function update_script() { cd /tmp rm -rf /opt/soularr curl -fsSL -o main.zip https://github.com/mrusse/soularr/archive/refs/heads/main.zip - unzip -q main.zip + $STD unzip main.zip mv soularr-main /opt/soularr cd /opt/soularr $STD pip install -r requirements.txt diff --git a/ct/spoolman.sh b/ct/spoolman.sh index d09153eb3..4520d6299 100644 --- a/ct/spoolman.sh +++ b/ct/spoolman.sh @@ -39,7 +39,7 @@ function update_script() { rm -rf spoolman_bak mv spoolman spoolman_bak curl -fsSL "https://github.com/Donkie/Spoolman/releases/download/${RELEASE}/spoolman.zip" -o $(basename "https://github.com/Donkie/Spoolman/releases/download/${RELEASE}/spoolman.zip") - unzip -q spoolman.zip -d spoolman + $STD unzip spoolman.zip -d spoolman cd spoolman $STD pip3 install -r requirements.txt curl -fsSL "https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example" -o ".env" diff --git a/ct/teddycloud.sh b/ct/teddycloud.sh index 0e2bf8e10..61bdd7a90 100644 --- a/ct/teddycloud.sh +++ b/ct/teddycloud.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt mv /opt/teddycloud /opt/teddycloud_bak curl -fsSL "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip" -o $(basename "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip") - unzip -q -d /opt/teddycloud teddycloud.amd64.release_v${VERSION}.zip + $STD unzip -d /opt/teddycloud teddycloud.amd64.release_v${VERSION}.zip cp -R /opt/teddycloud_bak/certs /opt/teddycloud_bak/config /opt/teddycloud_bak/data /opt/teddycloud echo "${VERSION}" >"/opt/${APP}_version.txt" msg_ok "Updated ${APP} to v${VERSION}" diff --git a/ct/tianji.sh b/ct/tianji.sh index f81ee24df..21c031694 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -26,6 +26,9 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + if ! command -v jq &>/dev/null; then + $STD apt-get install -y jq + fi if ! command -v node >/dev/null || [[ "$(/usr/bin/env node -v | grep -oP '^v\K[0-9]+')" != "22" ]]; then msg_info "Installing Node.js 22" $STD apt-get purge -y nodejs @@ -50,7 +53,7 @@ function update_script() { cp /opt/tianji/src/server/.env /opt/.env mv /opt/tianji /opt/tianji_bak curl -fsSL "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip") - unzip -q v${RELEASE}.zip + $STD unzip v${RELEASE}.zip mv tianji-${RELEASE} /opt/tianji cd tianji export NODE_OPTIONS="--max_old_space_size=4096" diff --git a/ct/umbrel.sh b/ct/umbrel.sh deleted file mode 100644 index ddbf6b1da..000000000 --- a/ct/umbrel.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE -# Source: https://umbrel.com/ - -APP="Umbrel" -var_tags="${var_tags:-os}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -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 - msg_info "Updating ${APP} LXC" - $STD apt-get update - $STD apt-get -y upgrade - msg_ok "Updated ${APP} LXC" - exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized! (manual reboot is required!)${CL}" -echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/ct/wallos.sh b/ct/wallos.sh index 3d87d4caa..00171d2b5 100644 --- a/ct/wallos.sh +++ b/ct/wallos.sh @@ -35,7 +35,7 @@ function update_script() { mkdir -p /opt/logos mv /opt/wallos/db/wallos.db /opt/wallos.db mv /opt/wallos/images/uploads/logos /opt/logos/ - unzip -q v${RELEASE}.zip + $STD unzip v${RELEASE}.zip rm -rf /opt/wallos mv Wallos-${RELEASE} /opt/wallos rm -rf /opt/wallos/db/wallos.empty.db diff --git a/ct/wastebin.sh b/ct/wastebin.sh index 24da20cb7..647144b34 100644 --- a/ct/wastebin.sh +++ b/ct/wastebin.sh @@ -20,28 +20,28 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/wastebin ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -fsSL https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - # Dirty-Fix 03/2025 for missing APP_version.txt on old installations, set to pre-latest release - msg_info "Running Migration" - if [[ ! -f /opt/${APP}_version.txt ]]; then - echo "2.7.1" >/opt/${APP}_version.txt - mkdir -p /opt/wastebin-data - cat </opt/wastebin-data/.env + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/wastebin ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -fsSL https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + # Dirty-Fix 03/2025 for missing APP_version.txt on old installations, set to pre-latest release + msg_info "Running Migration" + if [[ ! -f /opt/${APP}_version.txt ]]; then + echo "2.7.1" >/opt/${APP}_version.txt + mkdir -p /opt/wastebin-data + cat </opt/wastebin-data/.env WASTEBIN_DATABASE_PATH=/opt/wastebin-data/wastebin.db WASTEBIN_CACHE_SIZE=1024 WASTEBIN_HTTP_TIMEOUT=30 WASTEBIN_SIGNING_KEY=$(openssl rand -hex 32) WASTEBIN_PASTE_EXPIRATIONS=0,600,3600=d,86400,604800,2419200,29030400 EOF - systemctl stop wastebin - cat </etc/systemd/system/wastebin.service + systemctl stop wastebin + cat </etc/systemd/system/wastebin.service [Unit] Description=Wastebin Service After=network.target @@ -54,35 +54,35 @@ EnvironmentFile=/opt/wastebin-data/.env [Install] WantedBy=multi-user.target EOF - systemctl daemon-reload - fi - msg_ok "Migration Done" - if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Stopping Wastebin" - systemctl stop wastebin - msg_ok "Wastebin Stopped" + systemctl daemon-reload + fi + msg_ok "Migration Done" + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Wastebin" + systemctl stop wastebin + msg_ok "Wastebin Stopped" - msg_info "Updating Wastebin" - temp_file=$(mktemp) -curl -fsSL "https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.zip" -o "$temp_file" - unzip -o -q $temp_file - cp -f wastebin /opt/wastebin/ - chmod +x /opt/wastebin/wastebin - echo "${RELEASE}" >/opt/${APP}_version.txt - msg_ok "Updated Wastebin" + msg_info "Updating Wastebin" + temp_file=$(mktemp) + curl -fsSL "https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_x86_64-unknown-linux-musl.tar.zst" -o "$temp_file" + tar -xf $temp_file + cp -f wastebin /opt/wastebin/ + chmod +x /opt/wastebin/wastebin + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated Wastebin" - msg_info "Starting Wastebin" - systemctl start wastebin - msg_ok "Started Wastebin" + msg_info "Starting Wastebin" + systemctl start wastebin + msg_ok "Started Wastebin" - msg_info "Cleaning Up" - rm -f $temp_file - msg_ok "Cleanup Completed" - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at v${RELEASE}" - fi - exit + msg_info "Cleaning Up" + rm -f $temp_file + msg_ok "Cleanup Completed" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit } start diff --git a/ct/wavelog.sh b/ct/wavelog.sh index 0da0a703d..35f988e3c 100644 --- a/ct/wavelog.sh +++ b/ct/wavelog.sh @@ -41,7 +41,7 @@ function update_script() { cp /opt/wavelog/assets/js/sections/custom.js /opt/custom.js fi curl -fsSL "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip") - unzip -q ${RELEASE}.zip + $STD unzip ${RELEASE}.zip rm -rf /opt/wavelog mv wavelog-${RELEASE}/ /opt/wavelog rm -rf /opt/wavelog/install diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index ce733307f..9e81f2feb 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -47,7 +47,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" cd /opt curl -fsSL "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip") - unzip -q ${RELEASE}.zip + $STD unzip ${RELEASE}.zip rm -rf /opt/zigbee2mqtt mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt rm -rf /opt/zigbee2mqtt/data diff --git a/ct/zipline.sh b/ct/zipline.sh index 70855b44b..c62bfa9aa 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -41,9 +41,11 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cp /opt/zipline/.env /opt/ mkdir -p /opt/zipline-upload - cp -R /opt/zipline/upload/* /opt/zipline-upload/ + if [ -d /opt/zipline/upload ] && [ "$(ls -A /opt/zipline/upload)" ]; then + cp -R /opt/zipline/upload/* /opt/zipline-upload/ + fi curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") - unzip -q v"${RELEASE}".zip + $STD unzip v"${RELEASE}".zip rm -R /opt/zipline mv zipline-"${RELEASE}" /opt/zipline cd /opt/zipline diff --git a/ct/zot-registry.sh b/ct/zot-registry.sh new file mode 100644 index 000000000..a57223559 --- /dev/null +++ b/ct/zot-registry.sh @@ -0,0 +1,59 @@ +#!/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: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://zotregistry.dev/ + +APP="Zot-Registry" +var_tags="${var_tags:-registry;oci}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-5}" +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 [[ ! -f /usr/bin/zot ]]; then + msg_error "No ${APP} installation found!" + exit + fi + + RELEASE=$(curl -fsSL https://api.github.com/repos/project-zot/zot/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + if [[ ! -f ~/.${APP} ]] || [[ "${RELEASE}" != "$(cat ~/.${APP})" ]]; then + msg_info "Stopping Zot service" + systemctl stop zot + msg_ok "Stopped Zot service" + + msg_info "Updating Zot to ${RELEASE}" + curl -fsSL "https://github.com/project-zot/zot/releases/download/${RELEASE}/zot-linux-amd64" -o /usr/bin/zot + chmod +x /usr/bin/zot + chown root:root /usr/bin/zot + echo "${RELEASE}" >~/.${APP} + systemctl restart zot + msg_ok "Updated Zot to ${RELEASE}" + else + msg_ok "Zot is already up to date (${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}:8080${CL}" diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index d48c3a345..6daa878f1 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -37,7 +37,7 @@ function update_script() { rm -rf /opt/zwave-js-ui/* cd /opt/zwave-js-ui curl -fsSL "https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip" -o $(basename "https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux.zip") - unzip -q zwave-js-ui-${RELEASE}-linux.zip + $STD unzip zwave-js-ui-${RELEASE}-linux.zip msg_ok "Updated Z-Wave JS UI" msg_info "Starting Service" diff --git a/frontend/public/json/adventurelog.json b/frontend/public/json/adventurelog.json index 95753564e..5502eb0e5 100644 --- a/frontend/public/json/adventurelog.json +++ b/frontend/public/json/adventurelog.json @@ -35,6 +35,10 @@ { "text": "AdventureLog uses an initial local IP, if you change your LXC-IP, you need to change the IP here: `/opt/adventurelog/backend/server/.env` and here: `/opt/adventurelog/frontend/.env`", "type": "warning" + }, + { + "text": "Use `cat ~/adventurelog.creds` to see login credentials.", + "type": "info" } ] } diff --git a/frontend/public/json/alpine-tinyauth.json b/frontend/public/json/alpine-tinyauth.json index 0e9e0cf8a..95cbd23df 100644 --- a/frontend/public/json/alpine-tinyauth.json +++ b/frontend/public/json/alpine-tinyauth.json @@ -1,5 +1,5 @@ { - "name": "Alpine-tinyauth", + "name": "Alpine-Tinyauth", "slug": "alpine-tinyauth", "categories": [ 6 @@ -9,11 +9,11 @@ "updateable": true, "privileged": false, "interface_port": 3000, - "documentation": "https://tinyauth.app/docs/getting-started.html", - "website": "https://tinyauth.app/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tinyauth.webp", + "documentation": "https://tinyauth.app", "config_path": "/opt/tinyauth/.env", - "description": "Tinyauth is a simple authentication middleware that adds simple username/password login or OAuth with Google, Github and any generic provider to all of your docker apps. It is designed for traefik but it can be extended to work with all reverse proxies like caddy and nginx.", + "website": "https://tinyauth.app", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tinyauth.webp", + "description": "Tinyauth is a simple authentication middleware that adds simple username/password login or OAuth with Google, Github and any generic provider to all of your docker apps.", "install_methods": [ { "type": "default", @@ -21,7 +21,7 @@ "resources": { "cpu": 1, "ram": 256, - "hdd": 3, + "hdd": 2, "os": "alpine", "version": "3.21" } @@ -32,7 +32,7 @@ "resources": { "cpu": 1, "ram": 256, - "hdd": 3, + "hdd": 2, "os": "alpine", "version": "3.21" } @@ -44,8 +44,8 @@ }, "notes": [ { - "type": "info", - "text": "`cat ~/tinyauth.creds` to view login credentials" + "text": "The default credentials are located in `/opt/tinyauth/credentials.txt`.", + "type": "info" } ] } diff --git a/frontend/public/json/authelia.json b/frontend/public/json/authelia.json index 62af2fcdf..e94491c0d 100644 --- a/frontend/public/json/authelia.json +++ b/frontend/public/json/authelia.json @@ -8,7 +8,7 @@ "type": "ct", "updateable": true, "privileged": false, - "interface_port": 9091, + "interface_port": 443, "documentation": "https://www.authelia.com/integration/deployment/bare-metal/", "website": "https://www.authelia.com/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/authelia.webp", diff --git a/frontend/public/json/authentik.json b/frontend/public/json/authentik.json deleted file mode 100644 index e502842e2..000000000 --- a/frontend/public/json/authentik.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "authentik", - "slug": "authentik", - "categories": [ - 6 - ], - "date_created": "2024-12-27", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 9000, - "documentation": "https://docs.goauthentik.io/docs/", - "website": "https://goauthentik.io/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/authentik.webp", - "config_path": "/etc/authentik/config.yml", - "description": "authentik is an IdP (Identity Provider) and SSO (single sign on) that is built with security at the forefront of every piece of code, every feature, with an emphasis on flexibility and versatility.", - "install_methods": [ - { - "type": "default", - "script": "ct/authentik.sh", - "resources": { - "cpu": 6, - "ram": 10240, - "hdd": 12, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Authentik is very resource-heavy, it is recommended to use at least 10GB RAM anytime!", - "type": "warning" - }, - { - "text": "Some updates don't work due to massive dependency errors, it's recommended to do a backup before updating or a pg_dump and a new LXC.", - "type": "warning" - } - ] -} diff --git a/frontend/public/json/backrest.json b/frontend/public/json/backrest.json new file mode 100644 index 000000000..4257f542a --- /dev/null +++ b/frontend/public/json/backrest.json @@ -0,0 +1,40 @@ +{ + "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." + } + ] +} diff --git a/frontend/public/json/bunkerweb.json b/frontend/public/json/bunkerweb.json index 952cbf814..3cb7ca70d 100644 --- a/frontend/public/json/bunkerweb.json +++ b/frontend/public/json/bunkerweb.json @@ -20,7 +20,7 @@ "script": "ct/bunkerweb.sh", "resources": { "cpu": 2, - "ram": 4096, + "ram": 8192, "hdd": 4, "os": "debian", "version": "12" diff --git a/frontend/public/json/clean-lxcs.json b/frontend/public/json/clean-lxcs.json index 547744374..c464d734d 100644 --- a/frontend/public/json/clean-lxcs.json +++ b/frontend/public/json/clean-lxcs.json @@ -5,7 +5,7 @@ 1 ], "date_created": "2024-04-29", - "type": "addon", + "type": "pve", "updateable": false, "privileged": false, "interface_port": null, diff --git a/frontend/public/json/cron-update-lxcs.json b/frontend/public/json/cron-update-lxcs.json index 85714bd20..f2c6c0fe8 100644 --- a/frontend/public/json/cron-update-lxcs.json +++ b/frontend/public/json/cron-update-lxcs.json @@ -37,7 +37,7 @@ "type": "info" }, { - "text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-lxcs-cron.sh)' -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`", + "text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-lxcs-cron.sh)\" -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`", "type": "info" } ] diff --git a/frontend/public/json/docker-vm.json b/frontend/public/json/docker-vm.json index f503bf011..a86ed0248 100644 --- a/frontend/public/json/docker-vm.json +++ b/frontend/public/json/docker-vm.json @@ -22,7 +22,7 @@ "resources": { "cpu": 2, "ram": 4096, - "hdd": 8, + "hdd": 10, "os": "debian", "version": "12" } diff --git a/frontend/public/json/emby.json b/frontend/public/json/emby.json index 6da8807bd..c7b985a02 100644 --- a/frontend/public/json/emby.json +++ b/frontend/public/json/emby.json @@ -6,7 +6,7 @@ ], "date_created": "2024-05-02", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": 8096, "documentation": "https://emby.media/support/articles/Home.html", diff --git a/frontend/public/json/gitea-mirror.json b/frontend/public/json/gitea-mirror.json new file mode 100644 index 000000000..387c611b9 --- /dev/null +++ b/frontend/public/json/gitea-mirror.json @@ -0,0 +1,35 @@ +{ + "name": "Gitea-Mirror", + "slug": "gitea-mirror", + "categories": [ + 7 + ], + "date_created": "2025-06-05", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 4321, + "documentation": "https://github.com/arunavo4/gitea-mirror/", + "config_path": "/etc/systemd/system/gitea-mirror.service", + "website": "https://github.com/arunavo4/gitea-mirror/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/gitea-mirror.webp", + "description": "Gitea Mirror auto-syncs GitHub repos to your self-hosted Gitea, with a sleek Web UI and easy Docker deployment. ", + "install_methods": [ + { + "type": "default", + "script": "ct/gitea-mirror.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 5, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/frontend/public/json/gomft.json b/frontend/public/json/gomft.json.bak similarity index 100% rename from frontend/public/json/gomft.json rename to frontend/public/json/gomft.json.bak diff --git a/frontend/public/json/immich.json b/frontend/public/json/immich.json new file mode 100644 index 000000000..b29bb2c35 --- /dev/null +++ b/frontend/public/json/immich.json @@ -0,0 +1,48 @@ +{ + "name": "Immich", + "slug": "immich", + "categories": [ + 13 + ], + "date_created": "2025-06-01", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 2283, + "documentation": "https://immich.app/docs/overview/introduction", + "website": "https://immich.app", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/immich.webp", + "config_path": "/opt/immich/.env", + "description": "High performance self-hosted photo and video management solution.", + "install_methods": [ + { + "type": "default", + "script": "ct/immich.sh", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 20, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "During installation, you will be prompted with the option to install Intel OpenVINO for hardware-accelerated machine-learning. If you opt in, increase your LXC RAM after installation, as OpenVINO is memory-intensive", + "type": "info" + }, + { + "text": "HW-accelerated video transcoding is supported, but must be enabled in Immich Settings", + "type": "info" + }, + { + "text": "To change upload location, edit 'IMMICH_MEDIA_LOCATION' in `/opt/immich/.env`, and create the symlink 'upload' in /opt/immich/app & /opt/immich/app/machine-learning to your new upload location", + "type": "info" + } + ] +} diff --git a/frontend/public/json/kasm.json b/frontend/public/json/kasm.json index e39f855be..73511efb0 100644 --- a/frontend/public/json/kasm.json +++ b/frontend/public/json/kasm.json @@ -20,7 +20,7 @@ "script": "ct/kasm.sh", "resources": { "cpu": 2, - "ram": 4096, + "ram": 8192, "hdd": 50, "os": "Debian", "version": "12" @@ -36,6 +36,10 @@ "text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.", "type": "warning" }, + { + "text": "Kasm needs swap (on Proxmox host) and activated FUSE to be installed successfully!", + "type": "warning" + }, { "text": "Show password: `cat ~/kasm.creds`", "type": "info" diff --git a/frontend/public/json/linkwarden.json b/frontend/public/json/linkwarden.json index 54d7d32ab..7fe88de96 100644 --- a/frontend/public/json/linkwarden.json +++ b/frontend/public/json/linkwarden.json @@ -23,7 +23,7 @@ "ram": 2048, "hdd": 12, "os": "ubuntu", - "version": "22.04" + "version": "24.04" } } ], diff --git a/frontend/public/json/lyrionmusicserver.json b/frontend/public/json/lyrionmusicserver.json new file mode 100644 index 000000000..88dc0a0c9 --- /dev/null +++ b/frontend/public/json/lyrionmusicserver.json @@ -0,0 +1,35 @@ +{ + "name": "Lyrion Music Server", + "slug": "lyrionmusicserver", + "categories": [ + 13 + ], + "date_created": "2025-06-05", + "type": "ct", + "updateable": true, + "privileged": false, + "config_path": "/etc/default/lyrionmusicserver", + "interface_port": 9000, + "documentation": "https://lyrion.org/", + "website": "https://lyrion.org/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/lyrion-media-server.webp", + "description": "Lyrion Music Server is an open-source server software to stream local music collections, internet radio, and music services to Squeezebox and compatible audio players.", + "install_methods": [ + { + "type": "default", + "script": "ct/lyrionmusicserver.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 3, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/frontend/public/json/managemydamnlife.json b/frontend/public/json/managemydamnlife.json new file mode 100644 index 000000000..e7a3142b7 --- /dev/null +++ b/frontend/public/json/managemydamnlife.json @@ -0,0 +1,35 @@ +{ + "name": "Manage My Damn Life", + "slug": "managemydamnlife", + "categories": [ + 0 + ], + "date_created": "2025-06-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://manage-my-damn-life-nextjs.readthedocs.io/en/latest/", + "config_path": "/opt/mmdl/.env", + "website": "https://github.com/intri-in/manage-my-damn-life-nextjs", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/manage-my-damn-life.webp", + "description": "Manage My Damn Life (MMDL) is a self-hosted front end for managing your CalDAV tasks and calendars.", + "install_methods": [ + { + "type": "default", + "script": "ct/managemydamnlife.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 6, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/frontend/public/json/metube.json b/frontend/public/json/metube.json.bak similarity index 100% rename from frontend/public/json/metube.json rename to frontend/public/json/metube.json.bak diff --git a/frontend/public/json/minarca.json b/frontend/public/json/minarca.json new file mode 100644 index 000000000..1ae621804 --- /dev/null +++ b/frontend/public/json/minarca.json @@ -0,0 +1,35 @@ +{ + "name": "Minarca", + "slug": "minarca", + "categories": [ + 7 + ], + "date_created": "2025-06-08", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://nexus.ikus-soft.com/repository/archive/minarca/6.0.3/doc/index.html", + "config_path": "/etc/minarca/minarca-server.conf", + "website": "https://minarca.org/en_CA", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/minarca.webp", + "description": "Minarca is a self-hosted open source data backup software that allows you to manage your computer and server backups for free from a direct online accessible centralized view of your data with easy retrieval.", + "install_methods": [ + { + "type": "default", + "script": "ct/minarca.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 10, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "admin123" + }, + "notes": [] +} diff --git a/frontend/public/json/netbox.json b/frontend/public/json/netbox.json index d88192135..7b6030a1f 100644 --- a/frontend/public/json/netbox.json +++ b/frontend/public/json/netbox.json @@ -10,7 +10,7 @@ "privileged": false, "interface_port": 443, "documentation": "https://netboxlabs.com/docs/netbox/en/stable/", - "website": "https://netboxlabs.com/", + "website": "https://netboxlabs.com/products/netbox/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/netbox.webp", "config_path": "/opt/netbox/netbox/netbox/configuration.py", "description": "NetBox is the source of truth for everything on your network, from physical components like power systems and cabling to virtual assets like IP addresses and VLANs. Network automation and observability tools depend on NetBox’s authoritative data to roll out configurations, monitor changes, and accelerate operations across the enterprise", diff --git a/frontend/public/json/oauth2-proxy.json b/frontend/public/json/oauth2-proxy.json new file mode 100644 index 000000000..4981b6889 --- /dev/null +++ b/frontend/public/json/oauth2-proxy.json @@ -0,0 +1,45 @@ +{ + "name": "OAuth2-Proxy", + "slug": "oauth2-proxy", + "categories": [ + 4, + 6 + ], + "date_created": "2025-05-28", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview", + "website": "https://oauth2-proxy.github.io/oauth2-proxy/", + "logo": "https://raw.githubusercontent.com/oauth2-proxy/oauth2-proxy/f82e90426a1881d36bf995f25de9b7b1db4c2564/docs/static/img/logos/OAuth2_Proxy_icon.svg", + "config_path": "/opt/oauth2-proxy/config.toml", + "description": "A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers.", + "install_methods": [ + { + "type": "default", + "script": "ct/oauth2-proxy.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 3, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "This application includes a blank configuration file by default due to the wide range of available configuration options. We recommend referring to the official documentation for guidance: `https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview`. With this you can make your config.toml file accordingly to your needs.", + "type": "info" + }, + { + "text": "After changing the config restart OAuth2-Proxy with: `systemctl restart oauth2-proxy`", + "type": "info" + } + ] +} diff --git a/frontend/public/json/pingvin.json b/frontend/public/json/pingvin.json index ee3f8b26c..0e9515f5c 100644 --- a/frontend/public/json/pingvin.json +++ b/frontend/public/json/pingvin.json @@ -6,7 +6,7 @@ ], "date_created": "2024-05-02", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": 3000, "documentation": "https://stonith404.github.io/pingvin-share/introduction", diff --git a/frontend/public/json/pulse.json b/frontend/public/json/pulse.json new file mode 100644 index 000000000..e3cae4a9d --- /dev/null +++ b/frontend/public/json/pulse.json @@ -0,0 +1,44 @@ +{ + "name": "Pulse", + "slug": "pulse", + "categories": [ + 9 + ], + "date_created": "2025-05-27", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 7655, + "documentation": null, + "website": "https://github.com/rcourtman/Pulse", + "logo": "https://raw.githubusercontent.com/rcourtman/Pulse/main/src/public/logos/pulse-logo-256x256.png", + "config_path": "/opt/pulse/.env", + "description": "A lightweight monitoring application for Proxmox VE that displays real-time status for VMs and containers via a simple web interface.", + "install_methods": [ + { + "type": "default", + "script": "ct/pulse.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Create Proxmox-API-Token first: `https://github.com/rcourtman/Pulse?tab=readme-ov-file#creating-a-proxmox-api-token`", + "type": "Info" + }, + { + "text": "After installation, access the web interface to configure your Proxmox connection details through the built-in setup wizard", + "type": "Info" + } + ] +} diff --git a/frontend/public/json/pve-privilege-converter.json b/frontend/public/json/pve-privilege-converter.json new file mode 100644 index 000000000..530bd9bdb --- /dev/null +++ b/frontend/public/json/pve-privilege-converter.json @@ -0,0 +1,48 @@ +{ + "name": "PVE Privilege Converter", + "slug": "pve-privilege-converter", + "categories": [ + 1 + ], + "date_created": "2025-06-02", + "type": "pve", + "updateable": false, + "privileged": false, + "interface_port": null, + "documentation": "https://github.com/onethree7/proxmox-lxc-privilege-converter", + "website": null, + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/proxmox.webp", + "config_path": "", + "description": "This script allows converting Proxmox LXC containers between privileged and unprivileged modes using vzdump backup and restore. It guides you through container selection, backup storage, ID assignment, and privilege flipping via automated restore. Useful for applying changes that require different LXC modes.", + "install_methods": [ + { + "type": "default", + "script": "tools/pve/pve-privilege-converter.sh", + "resources": { + "cpu": null, + "ram": null, + "hdd": null, + "os": null, + "version": null + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Execute this script inside the Proxmox shell as root.", + "type": "info" + }, + { + "text": "Ensure that the backup and target storage have enough space.", + "type": "warning" + }, + { + "text": "The container will be recreated with a new ID and desired privilege setting.", + "type": "info" + } + ] +} diff --git a/frontend/public/json/umbrel-os-vm.json b/frontend/public/json/umbrel-os-vm.json new file mode 100644 index 000000000..78e6c1a0c --- /dev/null +++ b/frontend/public/json/umbrel-os-vm.json @@ -0,0 +1,40 @@ +{ + "name": "Umbrel OS", + "slug": "umbrel-os-vm", + "categories": [ + 2 + ], + "date_created": "2025-05-28", + "type": "vm", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://community.umbrel.com/c/guides/", + "website": "https://umbrel.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/umbrelos.webp", + "config_path": "", + "description": "Take control of your digital life with Umbrel β€” a private, personal server that lets you self-host powerful open source apps with ease. Whether you want to run a Bitcoin or Lightning node, manage your files with Nextcloud, stream media, block ads across your network, or explore self-hosted AI tools, Umbrel gives you full ownership and privacy. All through a beautiful, user-friendly interface β€” no cloud, no tracking, just your data under your control.", + "install_methods": [ + { + "type": "default", + "script": "vm/umbrel-os-vm.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 32, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "umbrel", + "password": "umbrel" + }, + "notes": [ + { + "text": "This VM use as base a Debian 12 OS with a custom kernel and some additional packages to run Umbrel OS. It is not a standard Debian VM, but it is optimized for Umbrel OS.", + "type": "info" + } + ] +} diff --git a/frontend/public/json/vaultwarden.json b/frontend/public/json/vaultwarden.json index 698cb4b2a..9f159dfca 100644 --- a/frontend/public/json/vaultwarden.json +++ b/frontend/public/json/vaultwarden.json @@ -32,7 +32,7 @@ "resources": { "cpu": 1, "ram": 256, - "hdd": 0.5, + "hdd": 1, "os": "alpine", "version": "3.21" } diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index b9c981ce4..32d7e8ce4 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,48 +1,8 @@ [ { - "name": "open-webui/open-webui", - "version": "v0.6.11", - "date": "2025-05-26T22:27:26Z" - }, - { - "name": "Radarr/Radarr", - "version": "v5.25.0.10024", - "date": "2025-05-26T21:58:37Z" - }, - { - "name": "dani-garcia/vaultwarden", - "version": "1.34.1", - "date": "2025-05-26T21:40:54Z" - }, - { - "name": "home-assistant/core", - "version": "2025.5.3", - "date": "2025-05-23T15:10:33Z" - }, - { - "name": "mattermost/mattermost", - "version": "mattermost-redux@10.8.0", - "date": "2025-05-26T19:17:13Z" - }, - { - "name": "semaphoreui/semaphore", - "version": "v2.14.12", - "date": "2025-05-26T19:08:26Z" - }, - { - "name": "dgtlmoon/changedetection.io", - "version": "0.49.18", - "date": "2025-05-26T18:36:33Z" - }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.15", - "date": "2025-05-25T05:11:31Z" - }, - { - "name": "MediaBrowser/Emby.Releases", - "version": "4.8.11.0", - "date": "2025-03-10T06:39:11Z" + "name": "advplyr/audiobookshelf", + "version": "v2.25.1", + "date": "2025-06-14T23:32:15Z" }, { "name": "nzbgetcom/nzbget", @@ -50,54 +10,114 @@ "date": "2025-05-12T09:12:04Z" }, { - "name": "zitadel/zitadel", - "version": "v3.2.1", - "date": "2025-05-26T14:27:59Z" + "name": "hyperion-project/hyperion.ng", + "version": "2.1.1", + "date": "2025-06-14T17:45:06Z" }, { - "name": "jupyter/notebook", - "version": "v7.4.3", - "date": "2025-05-26T14:27:27Z" + "name": "bunkerity/bunkerweb", + "version": "v1.6.2-rc5", + "date": "2025-06-14T16:44:14Z" }, { - "name": "Checkmk/checkmk", - "version": "v2.3.0p33", - "date": "2025-05-26T13:57:51Z" + "name": "ollama/ollama", + "version": "v0.9.1-rc1", + "date": "2025-06-12T21:18:54Z" }, { - "name": "syncthing/syncthing", - "version": "v1.29.6", - "date": "2025-05-06T07:57:02Z" + "name": "theonedev/onedev", + "version": "v11.11.0", + "date": "2025-06-14T13:23:36Z" }, { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "pmm-6401-v1.118.0", - "date": "2025-05-26T13:09:32Z" + "name": "semaphoreui/semaphore", + "version": "v2.15.0", + "date": "2025-06-14T10:48:57Z" }, { - "name": "n8n-io/n8n", - "version": "n8n@1.91.3", - "date": "2025-05-08T12:25:10Z" + "name": "firefly-iii/firefly-iii", + "version": "v6.2.17", + "date": "2025-06-11T12:07:38Z" }, { - "name": "Graylog2/graylog2-server", - "version": "6.3.0-beta.3", - "date": "2025-05-26T12:40:56Z" + "name": "Jackett/Jackett", + "version": "v0.22.2016", + "date": "2025-06-14T05:59:28Z" }, { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.61", - "date": "2025-04-22T12:42:26Z" + "name": "FlareSolverr/FlareSolverr", + "version": "v3.3.25", + "date": "2025-06-14T02:52:44Z" }, { - "name": "OliveTin/OliveTin", - "version": "2025.5.26", - "date": "2025-05-26T11:30:11Z" + "name": "keycloak/keycloak", + "version": "26.2.5", + "date": "2025-05-28T06:49:43Z" + }, + { + "name": "home-assistant/core", + "version": "2025.6.1", + "date": "2025-06-13T20:16:18Z" + }, + { + "name": "homarr-labs/homarr", + "version": "v1.24.0", + "date": "2025-06-13T19:15:36Z" }, { "name": "Luligu/matterbridge", - "version": "3.0.4", - "date": "2025-05-26T08:33:33Z" + "version": "3.0.6", + "date": "2025-06-13T15:02:37Z" + }, + { + "name": "jenkinsci/jenkins", + "version": "jenkins-2.514", + "date": "2025-06-10T14:27:57Z" + }, + { + "name": "grafana/grafana", + "version": "v12.0.1+security-01", + "date": "2025-06-13T04:15:18Z" + }, + { + "name": "msgbyte/tianji", + "version": "v1.21.13", + "date": "2025-06-13T04:11:30Z" + }, + { + "name": "FlowiseAI/Flowise", + "version": "flowise@3.0.2", + "date": "2025-06-12T22:48:11Z" + }, + { + "name": "leiweibau/Pi.Alert", + "version": "v2025-06-12", + "date": "2025-06-12T20:59:47Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.3.0p34", + "date": "2025-06-12T12:15:44Z" + }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.95.3", + "date": "2025-06-03T11:09:42Z" + }, + { + "name": "docker/compose", + "version": "v2.37.1", + "date": "2025-06-12T09:00:21Z" + }, + { + "name": "redis/redis", + "version": "8.2-m01-int2", + "date": "2025-06-12T08:52:10Z" + }, + { + "name": "zitadel/zitadel", + "version": "v3.3.0", + "date": "2025-06-12T06:54:48Z" }, { "name": "morpheus65535/bazarr", @@ -105,40 +125,500 @@ "date": "2025-05-11T16:40:55Z" }, { - "name": "Jackett/Jackett", - "version": "v0.22.1951", - "date": "2025-05-26T05:51:18Z" + "name": "documenso/documenso", + "version": "v1.12.0-rc.4", + "date": "2025-06-12T00:27:41Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.26.2.10099", + "date": "2025-06-11T20:10:39Z" + }, + { + "name": "TandoorRecipes/recipes", + "version": "2.0.0-alpha-4", + "date": "2025-05-14T05:01:45Z" + }, + { + "name": "esphome/esphome", + "version": "2025.5.2", + "date": "2025-06-03T08:45:14Z" + }, + { + "name": "MediaBrowser/Emby.Releases", + "version": "4.8.11.0", + "date": "2025-03-10T06:39:11Z" + }, + { + "name": "crowdsecurity/crowdsec", + "version": "v1.6.8", + "date": "2025-03-25T13:33:10Z" + }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.50.3", + "date": "2025-06-11T15:19:52Z" + }, + { + "name": "kimai/kimai", + "version": "2.36.0", + "date": "2025-06-11T12:31:07Z" + }, + { + "name": "cloudflare/cloudflared", + "version": "2025.6.0", + "date": "2025-06-11T11:13:21Z" + }, + { + "name": "autobrr/autobrr", + "version": "v1.63.1", + "date": "2025-06-11T11:05:42Z" + }, + { + "name": "fallenbagel/jellyseerr", + "version": "preview-forceipv4-axios", + "date": "2025-06-11T09:16:40Z" + }, + { + "name": "wazuh/wazuh", + "version": "coverity-w24-4.13.0", + "date": "2025-06-11T04:04:55Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.8rc1", + "date": "2025-06-11T06:50:19Z" + }, + { + "name": "openobserve/openobserve", + "version": "v0.15.0-rc2", + "date": "2025-06-11T04:29:22Z" + }, + { + "name": "mattermost/mattermost", + "version": "server/public/v0.1.15", + "date": "2025-06-11T03:56:25Z" + }, + { + "name": "emqx/emqx", + "version": "e5.10.0", + "date": "2025-06-10T16:03:18Z" + }, + { + "name": "node-red/node-red", + "version": "4.1.0-beta.1", + "date": "2025-06-10T15:47:59Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.62", + "date": "2025-05-27T12:10:19Z" + }, + { + "name": "open-webui/open-webui", + "version": "v0.6.14", + "date": "2025-06-10T14:18:04Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.131.0", + "date": "2025-06-03T14:13:00Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.3.0-beta.5", + "date": "2025-06-10T11:19:42Z" + }, + { + "name": "OctoPrint/OctoPrint", + "version": "1.11.2", + "date": "2025-06-10T11:07:14Z" + }, + { + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "v1.110.11", + "date": "2025-06-10T10:00:25Z" + }, + { + "name": "glanceapp/glance", + "version": "v0.8.4", + "date": "2025-06-10T07:57:14Z" + }, + { + "name": "go-gitea/gitea", + "version": "v1.24.0", + "date": "2025-06-10T02:00:38Z" + }, + { + "name": "Sonarr/Sonarr", + "version": "v4.0.14.2939", + "date": "2025-03-17T19:12:37Z" + }, + { + "name": "cross-seed/cross-seed", + "version": "v6.12.6", + "date": "2025-05-28T00:13:19Z" + }, + { + "name": "tailscale/tailscale", + "version": "v1.84.2", + "date": "2025-06-09T23:43:27Z" + }, + { + "name": "pocket-id/pocket-id", + "version": "v1.3.1", + "date": "2025-06-09T21:07:27Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.28.3", + "date": "2025-06-09T18:11:46Z" + }, + { + "name": "Lidarr/Lidarr", + "version": "v2.12.4.4658", + "date": "2025-06-09T17:27:45Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.8.0", + "date": "2025-06-09T16:08:33Z" + }, + { + "name": "ellite/Wallos", + "version": "v3.3.0", + "date": "2025-06-09T15:58:04Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v2.8.19", + "date": "2025-06-09T15:32:25Z" + }, + { + "name": "seanmorley15/AdventureLog", + "version": "v0.10.0", + "date": "2025-06-09T13:37:07Z" + }, + { + "name": "silverbulletmd/silverbullet", + "version": "0.10.4", + "date": "2025-02-25T18:13:42Z" + }, + { + "name": "neo4j/neo4j", + "version": "5.26.8", + "date": "2025-06-08T22:50:58Z" + }, + { + "name": "karakeep-app/karakeep", + "version": "ios/v1.7.0-1", + "date": "2025-06-08T22:02:33Z" + }, + { + "name": "Forceu/Gokapi", + "version": "v2.0.1", + "date": "2025-06-08T14:40:24Z" + }, + { + "name": "Readarr/Readarr", + "version": "v2.0.0.4645", + "date": "2017-03-07T18:56:06Z" + }, + { + "name": "matze/wastebin", + "version": "3.2.0", + "date": "2025-06-07T21:33:22Z" + }, + { + "name": "jellyfin/jellyfin", + "version": "v10.10.7", + "date": "2025-04-05T19:14:59Z" + }, + { + "name": "jordan-dalby/ByteStash", + "version": "v1.5.8", + "date": "2025-06-07T11:39:10Z" + }, + { + "name": "syncthing/syncthing", + "version": "2.0.0-rc.19", + "date": "2025-06-02T17:56:25Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.204.2", + "date": "2025-06-07T11:38:28Z" + }, + { + "name": "TriliumNext/Notes", + "version": "v0.94.1", + "date": "2025-06-07T10:32:38Z" + }, + { + "name": "homebridge/homebridge", + "version": "v1.10.0", + "date": "2025-06-07T08:31:48Z" + }, + { + "name": "moghtech/komodo", + "version": "v1.18.1", + "date": "2025-06-07T06:25:20Z" + }, + { + "name": "OliveTin/OliveTin", + "version": "2025.6.6", + "date": "2025-06-06T21:39:22Z" + }, + { + "name": "diced/zipline", + "version": "v4.1.2", + "date": "2025-06-06T17:44:58Z" + }, + { + "name": "goauthentik/authentik", + "version": "version/2025.6.1", + "date": "2025-06-06T15:28:21Z" + }, + { + "name": "ioBroker/ioBroker", + "version": "2025-05-31", + "date": "2025-06-06T14:50:56Z" + }, + { + "name": "juanfont/headscale", + "version": "v0.26.1", + "date": "2025-06-06T11:22:02Z" + }, + { + "name": "apache/tomcat", + "version": "10.1.42", + "date": "2025-06-05T22:39:40Z" + }, + { + "name": "paperless-ngx/paperless-ngx", + "version": "v2.16.3", + "date": "2025-06-05T21:16:59Z" + }, + { + "name": "netbox-community/netbox", + "version": "v4.3.2", + "date": "2025-06-05T19:57:01Z" + }, + { + "name": "benjaminjonard/koillection", + "version": "1.6.14", + "date": "2025-06-05T16:40:52Z" + }, + { + "name": "pi-hole/pi-hole", + "version": "v6.1.2", + "date": "2025-06-05T11:32:45Z" + }, + { + "name": "MariaDB/server", + "version": "mariadb-11.8.2", + "date": "2025-06-04T13:35:16Z" + }, + { + "name": "donaldzou/WGDashboard", + "version": "v4.2.3", + "date": "2025-05-07T15:35:04Z" + }, + { + "name": "actualbudget/actual", + "version": "v25.6.1", + "date": "2025-06-04T22:24:31Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.1.1", + "date": "2025-06-04T19:10:05Z" + }, + { + "name": "cockpit-project/cockpit", + "version": "340", + "date": "2025-06-04T16:41:44Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v1.37.0.5076", + "date": "2025-06-04T11:04:53Z" + }, + { + "name": "glpi-project/glpi", + "version": "10.0.18", + "date": "2025-02-12T11:07:02Z" + }, + { + "name": "louislam/uptime-kuma", + "version": "2.0.0-beta.2-temp", + "date": "2025-03-28T08:45:58Z" + }, + { + "name": "webmin/webmin", + "version": "2.401", + "date": "2025-06-04T02:53:03Z" + }, + { + "name": "coder/code-server", + "version": "v4.100.3", + "date": "2025-06-03T21:06:41Z" + }, + { + "name": "runtipi/runtipi", + "version": "v4.2.1", + "date": "2025-06-03T20:04:28Z" + }, + { + "name": "influxdata/influxdb", + "version": "v1.12.1rc3", + "date": "2025-06-03T14:05:52Z" + }, + { + "name": "Pf2eToolsOrg/Pf2eTools", + "version": "v0.9.0", + "date": "2025-06-03T11:49:40Z" + }, + { + "name": "FreshRSS/FreshRSS", + "version": "1.26.3", + "date": "2025-06-02T22:00:14Z" + }, + { + "name": "grokability/snipe-it", + "version": "v8.1.15", + "date": "2025-06-02T17:38:24Z" + }, + { + "name": "inventree/InvenTree", + "version": "0.17.13", + "date": "2025-06-02T12:44:20Z" + }, + { + "name": "usememos/memos", + "version": "v0.24.4", + "date": "2025-06-02T02:49:05Z" + }, + { + "name": "traccar/traccar", + "version": "v6.7.2", + "date": "2025-06-01T20:40:00Z" + }, + { + "name": "gethomepage/homepage", + "version": "v1.3.2", + "date": "2025-06-01T19:02:46Z" + }, + { + "name": "Koenkk/zigbee2mqtt", + "version": "2.4.0", + "date": "2025-06-01T18:08:44Z" + }, + { + "name": "prometheus/prometheus", + "version": "v3.4.1", + "date": "2025-05-31T13:45:40Z" + }, + { + "name": "BookStackApp/BookStack", + "version": "v25.05", + "date": "2025-05-31T13:36:23Z" + }, + { + "name": "blakeblackshear/frigate", + "version": "v0.14.1", + "date": "2024-08-29T22:32:51Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.20.0", + "date": "2025-05-30T14:39:51Z" + }, + { + "name": "binwiederhier/ntfy", + "version": "v2.12.0", + "date": "2025-05-30T00:26:27Z" + }, + { + "name": "gristlabs/grist-core", + "version": "v1.6.0", + "date": "2025-05-29T19:11:21Z" + }, + { + "name": "navidrome/navidrome", + "version": "v0.56.1", + "date": "2025-05-29T19:09:16Z" + }, + { + "name": "HabitRPG/habitica", + "version": "v5.36.5", + "date": "2025-05-29T17:06:01Z" + }, + { + "name": "readeck/readeck", + "version": "0.19.2", + "date": "2025-05-29T14:39:17Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v10.6.1", + "date": "2025-05-29T13:36:09Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.0.119-2.1.0.119_canary_2025-05-29", + "date": "2025-05-29T06:14:27Z" + }, + { + "name": "apache/cassandra", + "version": "cassandra-4.0.18", + "date": "2025-05-28T21:45:55Z" + }, + { + "name": "mongodb/mongo", + "version": "r6.0.24", + "date": "2025-05-28T21:25:03Z" + }, + { + "name": "Athou/commafeed", + "version": "5.10.0", + "date": "2025-05-28T05:48:20Z" + }, + { + "name": "bluenviron/mediamtx", + "version": "v1.12.3", + "date": "2025-05-27T20:43:10Z" + }, + { + "name": "Threadfin/Threadfin", + "version": "1.2.34", + "date": "2025-05-27T18:18:00Z" + }, + { + "name": "immich-app/immich", + "version": "v1.134.0", + "date": "2025-05-27T17:28:27Z" + }, + { + "name": "traefik/traefik", + "version": "v3.4.1", + "date": "2025-05-27T12:53:58Z" + }, + { + "name": "dani-garcia/vaultwarden", + "version": "1.34.1", + "date": "2025-05-26T21:40:54Z" + }, + { + "name": "jupyter/notebook", + "version": "v7.4.3", + "date": "2025-05-26T14:27:27Z" }, { "name": "stonith404/pingvin-share", "version": "v1.13.0", "date": "2025-05-25T20:21:13Z" }, - { - "name": "msgbyte/tianji", - "version": "v1.21.0", - "date": "2025-05-25T16:41:43Z" - }, - { - "name": "cross-seed/cross-seed", - "version": "v6.12.5", - "date": "2025-05-17T02:52:33Z" - }, - { - "name": "Prowlarr/Prowlarr", - "version": "v1.36.3.5071", - "date": "2025-05-25T13:59:43Z" - }, - { - "name": "Lidarr/Lidarr", - "version": "v2.11.2.4629", - "date": "2025-04-28T11:59:37Z" - }, - { - "name": "runtipi/runtipi", - "version": "nightly", - "date": "2025-05-25T09:44:06Z" - }, { "name": "Kozea/Radicale", "version": "v3.5.4", @@ -149,106 +629,16 @@ "version": "v4.39.4", "date": "2025-05-25T02:27:28Z" }, - { - "name": "pocket-id/pocket-id", - "version": "v1.0.0", - "date": "2025-05-24T22:06:55Z" - }, { "name": "minio/minio", "version": "RELEASE.2025-05-24T17-08-30Z", "date": "2025-05-24T21:42:19Z" }, - { - "name": "paperless-ngx/paperless-ngx", - "version": "v2.16.2", - "date": "2025-05-24T18:52:35Z" - }, - { - "name": "ioBroker/ioBroker", - "version": "2025-05-24", - "date": "2025-05-24T13:56:54Z" - }, - { - "name": "pocketbase/pocketbase", - "version": "v0.28.2", - "date": "2025-05-24T07:59:15Z" - }, - { - "name": "traccar/traccar", - "version": "v6.7.1", - "date": "2025-05-24T04:51:02Z" - }, - { - "name": "homarr-labs/homarr", - "version": "v1.21.0", - "date": "2025-05-23T19:17:15Z" - }, - { - "name": "immich-app/immich", - "version": "v1.133.1", - "date": "2025-05-23T18:14:44Z" - }, - { - "name": "Threadfin/Threadfin", - "version": "1.2.33", - "date": "2025-05-23T15:59:05Z" - }, - { - "name": "docker/compose", - "version": "v2.36.2", - "date": "2025-05-23T14:21:20Z" - }, - { - "name": "grokability/snipe-it", - "version": "v8.1.4", - "date": "2025-05-23T12:29:19Z" - }, - { - "name": "wazuh/wazuh", - "version": "v4.10.2", - "date": "2025-05-23T11:56:41Z" - }, - { - "name": "keycloak/keycloak", - "version": "26.0.12", - "date": "2025-05-15T14:06:52Z" - }, - { - "name": "ollama/ollama", - "version": "v0.7.1-rc2", - "date": "2025-05-23T01:53:31Z" - }, { "name": "rogerfar/rdt-client", "version": "v2.0.113", "date": "2025-05-23T01:47:35Z" }, - { - "name": "grafana/grafana", - "version": "v11.2.10", - "date": "2025-05-22T23:50:45Z" - }, - { - "name": "crowdsecurity/crowdsec", - "version": "v1.6.8", - "date": "2025-03-25T13:33:10Z" - }, - { - "name": "MariaDB/server", - "version": "mariadb-11.4.7", - "date": "2025-05-22T14:22:22Z" - }, - { - "name": "neo4j/neo4j", - "version": "4.4.44", - "date": "2025-05-22T13:58:43Z" - }, - { - "name": "apache/cassandra", - "version": "4.0.18-tentative", - "date": "2025-05-22T11:46:18Z" - }, { "name": "0xERR0R/blocky", "version": "v0.26.2", @@ -264,116 +654,26 @@ "version": "3.2.0-rc2", "date": "2025-05-21T20:09:07Z" }, - { - "name": "tailscale/tailscale", - "version": "v1.84.0", - "date": "2025-05-21T19:39:53Z" - }, { "name": "clusterzx/paperless-ai", "version": "v3.0.4", "date": "2025-05-21T19:03:53Z" }, - { - "name": "mongodb/mongo", - "version": "r8.0.10-rc0", - "date": "2025-05-21T18:22:25Z" - }, { "name": "ipfs/kubo", "version": "v0.35.0", "date": "2025-05-21T18:00:32Z" }, - { - "name": "cockpit-project/cockpit", - "version": "339", - "date": "2025-05-21T14:49:36Z" - }, - { - "name": "theonedev/onedev", - "version": "v11.9.9", - "date": "2025-05-21T13:13:31Z" - }, - { - "name": "glpi-project/glpi", - "version": "10.0.18", - "date": "2025-02-12T11:07:02Z" - }, - { - "name": "esphome/esphome", - "version": "2025.5.0", - "date": "2025-05-21T08:32:53Z" - }, - { - "name": "inventree/InvenTree", - "version": "0.17.12", - "date": "2025-05-21T05:44:55Z" - }, - { - "name": "diced/zipline", - "version": "v4.1.0", - "date": "2025-05-21T04:12:44Z" - }, - { - "name": "icereed/paperless-gpt", - "version": "v0.19.0", - "date": "2025-05-21T03:46:14Z" - }, - { - "name": "matze/wastebin", - "version": "3.1.0", - "date": "2025-05-20T19:20:03Z" - }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.511", - "date": "2025-05-20T15:39:17Z" - }, - { - "name": "element-hq/synapse", - "version": "v1.130.0", - "date": "2025-05-20T15:33:54Z" - }, - { - "name": "documenso/documenso", - "version": "v1.11.1", - "date": "2025-05-20T12:37:46Z" - }, { "name": "Stirling-Tools/Stirling-PDF", "version": "v0.46.2", "date": "2025-05-20T11:21:04Z" }, - { - "name": "zabbix/zabbix", - "version": "7.2.7", - "date": "2025-05-20T11:00:56Z" - }, { "name": "crafty-controller/crafty-4", "version": "v4.4.9", "date": "2025-05-20T00:08:29Z" }, - { - "name": "HabitRPG/habitica", - "version": "v5.36.4", - "date": "2025-05-19T22:28:11Z" - }, - { - "name": "glanceapp/glance", - "version": "v0.8.3", - "date": "2025-05-19T20:45:10Z" - }, - { - "name": "bunkerity/bunkerweb", - "version": "v1.6.1", - "date": "2025-03-15T17:29:17Z" - }, - { - "name": "Forceu/Gokapi", - "version": "v1.9.6", - "date": "2024-12-18T14:35:37Z" - }, { "name": "Part-DB/Part-DB-server", "version": "v1.17.1", @@ -389,11 +689,6 @@ "version": "debian/12.1.6.1", "date": "2025-05-18T17:01:42Z" }, - { - "name": "kimai/kimai", - "version": "2.34.0", - "date": "2025-05-18T13:22:17Z" - }, { "name": "hansmi/prometheus-paperless-exporter", "version": "v0.0.8", @@ -404,151 +699,36 @@ "version": "v25.05.2", "date": "2025-05-17T12:53:29Z" }, - { - "name": "BookStackApp/BookStack", - "version": "v25.02.5", - "date": "2025-05-17T11:24:01Z" - }, { "name": "Paymenter/Paymenter", "version": "v1.1.1", "date": "2025-05-17T10:10:36Z" }, - { - "name": "evcc-io/evcc", - "version": "0.203.6", - "date": "2025-05-17T07:30:49Z" - }, - { - "name": "prometheus/prometheus", - "version": "v0.304.0", - "date": "2025-05-17T07:29:09Z" - }, - { - "name": "advplyr/audiobookshelf", - "version": "v2.23.0", - "date": "2025-05-16T22:13:53Z" - }, - { - "name": "NodeBB/NodeBB", - "version": "v4.4.1", - "date": "2025-05-16T16:37:51Z" - }, - { - "name": "influxdata/influxdb", - "version": "v3.0.3", - "date": "2025-05-16T15:41:16Z" - }, { "name": "wavelog/wavelog", "version": "2.0.4", "date": "2025-05-16T15:09:53Z" }, - { - "name": "emqx/emqx", - "version": "e5.10.0-alpha.1", - "date": "2025-05-16T13:30:53Z" - }, { "name": "gotson/komga", "version": "1.21.3", "date": "2025-05-16T04:31:05Z" }, { - "name": "coder/code-server", - "version": "v4.100.2", - "date": "2025-05-15T23:02:46Z" - }, - { - "name": "goauthentik/authentik", - "version": "version/2025.4.1", - "date": "2025-05-15T17:48:29Z" - }, - { - "name": "cloudflare/cloudflared", - "version": "2025.5.0", - "date": "2025-05-15T17:09:50Z" - }, - { - "name": "ellite/Wallos", - "version": "v3.1.1", - "date": "2025-05-15T15:17:57Z" - }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v10.5.1", - "date": "2025-05-15T09:59:28Z" - }, - { - "name": "FlowiseAI/Flowise", - "version": "flowise@3.0.0", - "date": "2025-05-15T01:49:47Z" + "name": "Dolibarr/dolibarr", + "version": "18.0.7", + "date": "2025-05-15T08:24:30Z" }, { "name": "Ombi-app/Ombi", "version": "v4.47.1", "date": "2025-01-05T21:14:23Z" }, - { - "name": "Athou/commafeed", - "version": "5.9.0", - "date": "2025-05-14T15:29:48Z" - }, - { - "name": "juanfont/headscale", - "version": "v0.26.0", - "date": "2025-05-14T15:12:14Z" - }, { "name": "motioneye-project/motioneye", "version": "0.42.1", "date": "2020-06-07T07:27:04Z" }, - { - "name": "blakeblackshear/frigate", - "version": "v0.14.1", - "date": "2024-08-29T22:32:51Z" - }, - { - "name": "TandoorRecipes/recipes", - "version": "2.0.0-alpha-4", - "date": "2025-05-14T05:01:45Z" - }, - { - "name": "netbox-community/netbox", - "version": "v4.3.1", - "date": "2025-05-13T19:45:00Z" - }, - { - "name": "OctoPrint/OctoPrint", - "version": "1.11.1", - "date": "2025-05-13T13:32:07Z" - }, - { - "name": "redis/redis", - "version": "8.0.1", - "date": "2025-05-13T13:31:53Z" - }, - { - "name": "go-gitea/gitea", - "version": "v1.23.8", - "date": "2025-05-12T22:40:50Z" - }, - { - "name": "leiweibau/Pi.Alert", - "version": "v2025-05-11", - "date": "2025-05-12T19:14:57Z" - }, - { - "name": "duplicati/duplicati", - "version": "v2.1.0.118-2.1.0.118_canary_2025-05-12", - "date": "2025-05-12T18:50:44Z" - }, - { - "name": "usememos/memos", - "version": "v0.24.3", - "date": "2025-05-12T15:23:21Z" - }, { "name": "stackblitz-labs/bolt.diy", "version": "1.0.0", @@ -579,61 +759,21 @@ "version": "v1.0.0-beta21", "date": "2025-05-09T23:14:23Z" }, - { - "name": "apache/tomcat", - "version": "10.1.41", - "date": "2025-05-08T12:45:44Z" - }, - { - "name": "readeck/readeck", - "version": "0.18.2", - "date": "2025-05-07T19:22:22Z" - }, - { - "name": "donaldzou/WGDashboard", - "version": "v4.2.3", - "date": "2025-05-07T15:35:04Z" - }, - { - "name": "Brandawg93/PeaNUT", - "version": "v5.7.5", - "date": "2025-05-07T14:01:45Z" - }, { "name": "ZoeyVid/NPMplus", "version": "2025-05-07-r1", "date": "2025-05-07T12:18:42Z" }, - { - "name": "openobserve/openobserve", - "version": "v0.14.7", - "date": "2025-05-07T11:32:23Z" - }, { "name": "sysadminsmedia/homebox", "version": "v0.19.0", "date": "2025-05-06T18:05:42Z" }, - { - "name": "bluenviron/mediamtx", - "version": "v1.12.2", - "date": "2025-05-06T15:30:10Z" - }, { "name": "linkwarden/linkwarden", "version": "v2.10.2", "date": "2025-05-06T03:12:53Z" }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-tvdb", - "date": "2025-05-06T01:32:52Z" - }, - { - "name": "autobrr/autobrr", - "version": "v1.62.0", - "date": "2025-05-05T20:35:18Z" - }, { "name": "postgres/postgres", "version": "REL_13_21", @@ -644,31 +784,6 @@ "version": "3.5.0", "date": "2025-05-05T16:28:24Z" }, - { - "name": "traefik/traefik", - "version": "v3.4.0", - "date": "2025-05-05T13:59:23Z" - }, - { - "name": "moghtech/komodo", - "version": "v1.17.5", - "date": "2025-05-04T22:17:06Z" - }, - { - "name": "Readarr/Readarr", - "version": "v2.0.0.4645", - "date": "2017-03-07T18:56:06Z" - }, - { - "name": "FreshRSS/FreshRSS", - "version": "1.26.2", - "date": "2025-05-03T20:23:27Z" - }, - { - "name": "actualbudget/actual", - "version": "v25.5.0", - "date": "2025-05-03T19:03:17Z" - }, { "name": "forgejo/forgejo", "version": "v11.0.1", @@ -684,21 +799,11 @@ "version": "v3.5.4", "date": "2025-05-02T13:42:06Z" }, - { - "name": "Koenkk/zigbee2mqtt", - "version": "2.3.0", - "date": "2025-05-01T18:24:31Z" - }, { "name": "WordPress/WordPress", "version": "6.8.1", "date": "2025-04-30T16:44:16Z" }, - { - "name": "benjaminjonard/koillection", - "version": "1.6.13", - "date": "2025-04-30T16:38:35Z" - }, { "name": "docmost/docmost", "version": "v0.20.4", @@ -709,11 +814,6 @@ "version": "2025.3", "date": "2025-04-30T02:52:28Z" }, - { - "name": "gristlabs/grist-core", - "version": "v1.5.2", - "date": "2025-04-29T20:42:32Z" - }, { "name": "hargata/lubelog", "version": "v1.4.7", @@ -729,16 +829,6 @@ "version": "deluge-2.2.0", "date": "2025-04-28T21:31:06Z" }, - { - "name": "gethomepage/homepage", - "version": "v1.2.0", - "date": "2025-04-28T17:55:01Z" - }, - { - "name": "karakeep-app/karakeep", - "version": "v0.24.1", - "date": "2025-04-28T08:21:37Z" - }, { "name": "gotify/server", "version": "v2.6.3", @@ -799,11 +889,6 @@ "version": "v2.10.0", "date": "2025-04-18T20:46:28Z" }, - { - "name": "TriliumNext/Notes", - "version": "v0.93.0", - "date": "2025-04-17T20:05:25Z" - }, { "name": "benzino77/tasmocompiler", "version": "v12.6.1", @@ -814,11 +899,6 @@ "version": "v0.4.15", "date": "2024-12-19T03:19:49Z" }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.1.0", - "date": "2025-04-15T16:18:29Z" - }, { "name": "slskd/slskd", "version": "0.22.5", @@ -854,16 +934,6 @@ "version": "v1.10.0", "date": "2025-04-07T14:32:15Z" }, - { - "name": "Dolibarr/dolibarr", - "version": "21.0.1", - "date": "2025-04-06T19:22:59Z" - }, - { - "name": "jellyfin/jellyfin", - "version": "v10.10.7", - "date": "2025-04-05T19:14:59Z" - }, { "name": "azukaar/Cosmos-Server", "version": "v0.18.4", @@ -874,11 +944,6 @@ "version": "2.3", "date": "2025-04-05T18:05:36Z" }, - { - "name": "navidrome/navidrome", - "version": "v0.55.2", - "date": "2025-04-05T12:07:32Z" - }, { "name": "MagicMirrorOrg/MagicMirror", "version": "v2.31.0", @@ -899,11 +964,6 @@ "version": "1.5.0", "date": "2025-03-30T17:42:59Z" }, - { - "name": "pi-hole/pi-hole", - "version": "v6.0.6", - "date": "2025-03-30T16:59:06Z" - }, { "name": "aceberg/WatchYourLAN", "version": "2.1.2-alpine", @@ -919,11 +979,6 @@ "version": "v4.5.0", "date": "2025-03-28T19:02:22Z" }, - { - "name": "louislam/uptime-kuma", - "version": "2.0.0-beta.2-temp", - "date": "2025-03-28T08:45:58Z" - }, { "name": "hakimel/reveal.js", "version": "5.2.1", @@ -949,26 +1004,11 @@ "version": "v4.3.1", "date": "2025-03-23T09:02:54Z" }, - { - "name": "seanmorley15/AdventureLog", - "version": "v0.9.0", - "date": "2025-03-19T13:30:02Z" - }, { "name": "Donkie/Spoolman", "version": "v0.22.1", "date": "2025-03-18T21:01:22Z" }, - { - "name": "Sonarr/Sonarr", - "version": "v4.0.14.2939", - "date": "2025-03-17T19:12:37Z" - }, - { - "name": "webmin/webmin", - "version": "2.303", - "date": "2025-03-17T04:54:50Z" - }, { "name": "transmission/transmission", "version": "4.0.1-beta.1", @@ -1019,16 +1059,6 @@ "version": "2.8.0", "date": "2025-03-02T04:30:50Z" }, - { - "name": "jordan-dalby/ByteStash", - "version": "v1.5.7", - "date": "2025-02-27T20:04:08Z" - }, - { - "name": "silverbulletmd/silverbullet", - "version": "0.10.4", - "date": "2025-02-25T18:13:42Z" - }, { "name": "schlagmichdoch/PairDrop", "version": "v1.11.2", @@ -1054,11 +1084,6 @@ "version": "v7.4.1", "date": "2025-02-15T20:54:00Z" }, - { - "name": "node-red/node-red", - "version": "4.0.9", - "date": "2025-02-14T17:10:20Z" - }, { "name": "mayswind/AriaNg", "version": "1.3.10", @@ -1069,11 +1094,6 @@ "version": "v1.27.0", "date": "2025-02-13T15:55:36Z" }, - { - "name": "homebridge/homebridge", - "version": "v1.9.0", - "date": "2025-02-11T13:26:42Z" - }, { "name": "actualbudget/actual-server", "version": "v25.2.1", @@ -1184,21 +1204,11 @@ "version": "r1720", "date": "2024-08-03T04:07:20Z" }, - { - "name": "Pf2eToolsOrg/Pf2eTools", - "version": "v0.8.13", - "date": "2024-07-29T12:54:27Z" - }, { "name": "hywax/mafl", "version": "v0.15.4", "date": "2024-07-13T11:03:43Z" }, - { - "name": "FlareSolverr/FlareSolverr", - "version": "v3.3.21", - "date": "2024-06-26T01:14:46Z" - }, { "name": "Forceu/barcodebuddy", "version": "v1.8.1.8", @@ -1214,11 +1224,6 @@ "version": "v1.0.9", "date": "2024-05-21T22:15:33Z" }, - { - "name": "binwiederhier/ntfy", - "version": "v2.11.0", - "date": "2024-05-13T20:19:54Z" - }, { "name": "pterodactyl/wings", "version": "v1.11.13", @@ -1234,11 +1239,6 @@ "version": "v4.4.3", "date": "2024-04-06T12:24:35Z" }, - { - "name": "hyperion-project/hyperion.ng", - "version": "2.0.16", - "date": "2024-01-18T16:11:07Z" - }, { "name": "deepch/RTSPtoWeb", "version": "v2.4.3", diff --git a/frontend/public/json/wavelog.json b/frontend/public/json/wavelog.json index 6e679e341..ba2232ae9 100644 --- a/frontend/public/json/wavelog.json +++ b/frontend/public/json/wavelog.json @@ -33,7 +33,7 @@ }, "notes": [ { - "text": "Database credentials: `cat wavelog.creds`", + "text": "Database credentials: `cat ~/wavelog.creds`", "type": "info" } ] diff --git a/frontend/public/json/zot-registry.json b/frontend/public/json/zot-registry.json new file mode 100644 index 000000000..4cfb98b22 --- /dev/null +++ b/frontend/public/json/zot-registry.json @@ -0,0 +1,35 @@ +{ + "name": "Zot Registry", + "slug": "zot", + "categories": [ + 13 + ], + "date_created": "2025-06-06", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://zotregistry.dev/docs/intro/", + "website": "https://zotregistry.dev/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/zot-registry.webp", + "config_path": "/etc/zot/config.json", + "description": "Zot is a cloud-native OCI image registry focused on extensibility, maintainability, and performance. It supports advanced features such as Web UI, security scanning, authentication via htpasswd and OIDC, and more.", + "install_methods": [ + { + "type": "default", + "script": "ct/zot-registry.sh", + "resources": { + "cpu": 1, + "ram": 2048, + "hdd": 5, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx index 5034bc939..8c5a3d00f 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/DefaultPassword.tsx @@ -5,7 +5,7 @@ import { Script } from "@/lib/types"; export default function DefaultPassword({ item }: { item: Script }) { const { username, password } = item.default_credentials; - const hasDefaultLogin = username && password; + const hasDefaultLogin = username || password; if (!hasDefaultLogin) return null; @@ -23,14 +23,17 @@ export default function DefaultPassword({ item }: { item: Script }) {

You can use the following credentials to login to the {item.name} {item.type}.

- {["username", "password"].map((type) => ( -
- {type.charAt(0).toUpperCase() + type.slice(1)}:{" "} - -
- ))} + {["username", "password"].map((type) => { + const value = item.default_credentials[type as "username" | "password"]; + return value && value.trim() !== "" ? ( +
+ {type.charAt(0).toUpperCase() + type.slice(1)}:{" "} + +
+ ) : null; + })} ); diff --git a/install/2fauth-install.sh b/install/2fauth-install.sh index 57bed91fc..f32f55457 100644 --- a/install/2fauth-install.sh +++ b/install/2fauth-install.sh @@ -14,11 +14,8 @@ network_check update_os msg_info "Installing Dependencies" - $STD apt-get install -y \ - lsb-release \ - gpg - + lsb-release 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 @@ -26,17 +23,18 @@ $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} \ - mariadb-server + php8.3-{bcmath,common,ctype,curl,fileinfo,fpm,gd,intl,mbstring,mysql,xml,cli} msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=2fauth_db DB_USER=2fauth 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;" +$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 "2FAuth Credentials" echo "Database User: $DB_USER" @@ -47,8 +45,8 @@ msg_ok "Set up Database" msg_info "Setup 2FAuth" RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip") -unzip -q "${RELEASE}.zip" +curl -fsSL "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" +$STD unzip "${RELEASE}.zip" mv "2FAuth-${RELEASE//v/}/" /opt/2fauth cd "/opt/2fauth" || return diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh index f0fce574e..2fcd5fc1f 100644 --- a/install/adventurelog-install.sh +++ b/install/adventurelog-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ gdal-bin \ libgdal-dev \ git \ @@ -25,25 +24,10 @@ $STD apt-get install -y \ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" +NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules +PG_VERSION="16" PG_MODULES="postgis" install_postgresql -msg_info "Setting up PostgreSQL Repository" -curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg -echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list -msg_ok "Set up PostgreSQL Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g pnpm -msg_ok "Installed Node.js" - -msg_info "Install/Set up PostgreSQL Database" -$STD apt-get install -y postgresql-16 postgresql-16-postgis +msg_info "Set up PostgreSQL Database" DB_NAME="adventurelog_db" DB_USER="adventurelog_user" DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" @@ -69,8 +53,8 @@ DJANGO_ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" LOCAL_IP="$(hostname -I | awk '{print $1}')" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/seanmorley15/AdventureLog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip +curl -fsSL "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v${RELEASE}.zip mv AdventureLog-${RELEASE} /opt/adventurelog cat </opt/adventurelog/backend/server/.env PGHOST='localhost' diff --git a/install/agentdvr-install.sh b/install/agentdvr-install.sh index e8b4dfc0d..aa167b2a7 100644 --- a/install/agentdvr-install.sh +++ b/install/agentdvr-install.sh @@ -14,7 +14,6 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y unzip $STD apt-get install -y apt-transport-https $STD apt-get install -y alsa-utils $STD apt-get install -y libxext-dev diff --git a/install/alpine-gitea-install.sh b/install/alpine-gitea-install.sh index ad71249f6..aafb72adc 100644 --- a/install/alpine-gitea-install.sh +++ b/install/alpine-gitea-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apk add gpg -msg_ok "Installed Dependencies" - msg_info "Installing Gitea" $STD apk add --no-cache gitea msg_ok "Installed Gitea" diff --git a/install/alpine-install.sh b/install/alpine-install.sh index f1710bbcf..bc8d14dee 100644 --- a/install/alpine-install.sh +++ b/install/alpine-install.sh @@ -13,5 +13,9 @@ setting_up_container network_check update_os +msg_info "Installing Dependencies" +$STD apk add sudo +msg_ok "Installed Dependencies" + motd_ssh customize diff --git a/install/alpine-it-tools-install.sh b/install/alpine-it-tools-install.sh index 52057882f..11f6c055b 100644 --- a/install/alpine-it-tools-install.sh +++ b/install/alpine-it-tools-install.sh @@ -14,9 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apk add \ - nginx \ - unzip +$STD apk add nginx msg_ok "Installed Dependencies" msg_info "Installing IT-Tools" @@ -25,7 +23,7 @@ DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE curl -fsSL -o it-tools.zip "$DOWNLOAD_URL" mkdir -p /usr/share/nginx/html -unzip -q it-tools.zip -d /tmp/it-tools +$STD unzip it-tools.zip -d /tmp/it-tools cp -r /tmp/it-tools/dist/* /usr/share/nginx/html cat <<'EOF' >/etc/nginx/http.d/default.conf server { diff --git a/install/alpine-mariadb-install.sh b/install/alpine-mariadb-install.sh index 89b76318e..baf1e00fd 100644 --- a/install/alpine-mariadb-install.sh +++ b/install/alpine-mariadb-install.sh @@ -13,12 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apk add \ - gpg \ - sudo -msg_ok "Installed Dependencies" - msg_info "Installing MariaDB" $STD apk add --no-cache mariadb mariadb-client $STD rc-update add mariadb default diff --git a/install/alpine-nextcloud-install.sh b/install/alpine-nextcloud-install.sh index 4e6feb524..3ac5d98a1 100644 --- a/install/alpine-nextcloud-install.sh +++ b/install/alpine-nextcloud-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apk add openssl -$STD apk add mc $STD apk add nginx msg_ok "Installed Dependencies" @@ -49,7 +48,7 @@ $STD apk add nextcloud-mysql mariadb mariadb-client $STD mariadb-install-db --user=mysql --datadir=/var/lib/mysql $STD service mariadb start $STD rc-update add mariadb -mysql -uroot -p"$ADMIN_PASS" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ADMIN_PASS' WITH GRANT OPTION; DELETE FROM mysql.user WHERE User=''; DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); DROP DATABASE test; DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'; CREATE DATABASE $DB_NAME; GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS'; GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS'; FLUSH PRIVILEGES;" +$STD mariadb -uroot -p"$ADMIN_PASS" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY '$ADMIN_PASS' WITH GRANT OPTION; DELETE FROM mysql.user WHERE User=''; DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1'); DROP DATABASE test; DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'; CREATE DATABASE $DB_NAME; GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS'; GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost.localdomain' IDENTIFIED BY '$DB_PASS'; FLUSH PRIVILEGES;" $STD apk del mariadb-client msg_ok "Installed MySQL Database" diff --git a/install/alpine-node-red-install.sh b/install/alpine-node-red-install.sh index 1feaf293b..043a6612c 100644 --- a/install/alpine-node-red-install.sh +++ b/install/alpine-node-red-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apk add --no-cache \ - gpg \ git \ nodejs \ npm @@ -45,16 +44,17 @@ command="/usr/local/bin/node-red" command_args="--max-old-space-size=128 -v" command_user="nodered" pidfile="/var/run/nodered.pid" +command_background="yes" depend() { use net }' >$service_path chmod +x $service_path -$STD rc-update add nodered default msg_ok "Created Node-RED Service" msg_info "Starting Node-RED" +$STD rc-update add nodered $STD rc-service nodered start msg_ok "Started Node-RED" diff --git a/install/alpine-prometheus-install.sh b/install/alpine-prometheus-install.sh index dec563138..abb2eaf75 100644 --- a/install/alpine-prometheus-install.sh +++ b/install/alpine-prometheus-install.sh @@ -13,11 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apk add \ - gpg -msg_ok "Installed Dependencies" - msg_info "Installing Prometheus" $STD apk add --no-cache prometheus msg_ok "Installed Prometheus" diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index 5011285fa..85936c4a8 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -15,8 +15,7 @@ update_os msg_info "Installing dependencies" $STD apk add --no-cache \ - unzip \ - apache2-utils + apache2-utils fuse3 msg_ok "Installed dependencies" msg_info "Installing rclone" diff --git a/install/alpine-redis-install.sh b/install/alpine-redis-install.sh index bfcd8ec65..c04db58da 100644 --- a/install/alpine-redis-install.sh +++ b/install/alpine-redis-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apk add gpg -msg_ok "Installed Dependencies" - msg_info "Installing Redis" $STD apk add redis $STD sed -i 's/^bind .*/bind 0.0.0.0/' /etc/redis.conf diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 5692be0a8..9aea59a69 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: SlaviΕ‘a AreΕΎina (tremor021) +# Author: SlaviΕ‘a AreΕΎina (tremor021) | Co-Author: Stavros (steveiliop56) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/steveiliop56/tinyauth @@ -14,45 +14,44 @@ network_check update_os msg_info "Installing Dependencies" -$STD apk add --no-cache \ - npm \ - curl \ - go +$STD apk add --no-cache curl openssl apache2-utils msg_ok "Installed Dependencies" -msg_info "Installing tinyauth" -temp_file=$(mktemp) -$STD npm install -g bun +msg_info "Installing Tinyauth" mkdir -p /opt/tinyauth + RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" -tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1 -cd /opt/tinyauth/frontend -$STD bun install -$STD bun run build -mv dist /opt/tinyauth/internal/assets/ -cd /opt/tinyauth -$STD go mod download -CGO_ENABLED=0 go build -ldflags "-s -w" -{ - echo "tinyauth Credentials" - echo "Username: admin@example.com" - echo "Password: admin" -} >>~/tinyauth.creds +curl -fsSL "https://github.com/steveiliop56/tinyauth/releases/download/v${RELEASE}/tinyauth-amd64" -o /opt/tinyauth/tinyauth +chmod +x /opt/tinyauth/tinyauth + +PASSWORD=$(openssl rand -base64 8 | tr -dc 'a-zA-Z0-9' | head -c 8) +USER=$(htpasswd -Bbn "tinyauth" "${PASSWORD}") + +cat < /opt/tinyauth/credentials.txt +Tinyauth Credentials +Username: tinyauth +Password: ${PASSWORD} +EOF + echo "${RELEASE}" >/opt/tinyauth_version.txt -msg_ok "Installed tinyauth" +msg_ok "Installed Tinyauth" -msg_info "Enabling tinyauth Service" -SECRET=$(head -c 16 /dev/urandom | xxd -p -c 16 | tr -d '\n') -{ - echo "SECRET=${SECRET}" - echo "USERS=admin@example.com:\$2a\$10\$CrTK.W7WXSClo3ZY1yJUFupg5UdV8WNcynEhZhJFNjhGQB.Ga0ZDm" - echo "APP_URL=http://localhost:3000" -} >>/opt/tinyauth/.env +read -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url -cat </etc/init.d/tinyauth +msg_info "Creating Tinyauth Service" +SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 32) + +cat </opt/tinyauth/.env +SECRET=${SECRET} +USERS=${USER} +APP_URL=${app_url} +EOF + +sed -i -e 's/\$/\$\$/g' /opt/tinyauth/.env + +cat <<'EOF' >/etc/init.d/tinyauth #!/sbin/openrc-run -description="tinyauth Service" +description="Tinyauth Service" command="/opt/tinyauth/tinyauth" directory="/opt/tinyauth" @@ -62,7 +61,15 @@ pidfile="/var/run/tinyauth.pid" start_pre() { if [ -f "/opt/tinyauth/.env" ]; then - export \$(grep -v '^#' /opt/tinyauth/.env | xargs) + while IFS= read -r line || [ -n "$line" ]; do + [ -z "$line" ] && continue + case "$line" in + '#'*) + continue + ;; + esac + export "$line" + done < "/opt/tinyauth/.env" fi } @@ -73,11 +80,11 @@ EOF chmod +x /etc/init.d/tinyauth $STD rc-update add tinyauth default -msg_ok "Enabled tinyauth Service" +msg_ok "Enabled Tinyauth Service" -msg_info "Starting tinyauth" +msg_info "Starting Tinyauth" $STD service tinyauth start -msg_ok "Started tinyauth" +msg_ok "Started Tinyauth" motd_ssh customize diff --git a/install/alpine-traefik-install.sh b/install/alpine-traefik-install.sh index aa3abb871..3f4a96669 100644 --- a/install/alpine-traefik-install.sh +++ b/install/alpine-traefik-install.sh @@ -24,31 +24,13 @@ msg_ok "Installed Traefik" read -p "${TAB3}Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui if [[ "$enable_webui" =~ ^[Yy]$ ]]; then msg_info "Configuring Traefik WebUI" - mkdir -p /etc/traefik/config - cat </etc/traefik/traefik.yml -entryPoints: - web: - address: ":80" - traefik: - address: ":8080" - -api: - dashboard: true - insecure: true - -log: - level: INFO - -providers: - file: - directory: /etc/traefik/config - watch: true -EOF + sed -i 's/localhost//g' /etc/traefik/traefik.yaml msg_ok "Configured Traefik WebUI" fi msg_info "Enabling and starting Traefik service" $STD rc-update add traefik default +sed -i '/^command=.*/i directory="/etc/traefik"' /etc/init.d/traefik $STD rc-service traefik start msg_ok "Traefik service started" diff --git a/install/alpine-wireguard-install.sh b/install/alpine-wireguard-install.sh index 276d308f2..18f95ba54 100644 --- a/install/alpine-wireguard-install.sh +++ b/install/alpine-wireguard-install.sh @@ -15,12 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apk add \ - newt \ - curl \ - openssh \ - nano \ - mc \ - gpg \ iptables \ openrc msg_ok "Installed Dependencies" diff --git a/install/alpine-zigbee2mqtt-install.sh b/install/alpine-zigbee2mqtt-install.sh index 7ccb2fca6..0f9c52a14 100644 --- a/install/alpine-zigbee2mqtt-install.sh +++ b/install/alpine-zigbee2mqtt-install.sh @@ -14,8 +14,8 @@ network_check update_os msg_info "Installing Alpine-Zigbee2MQTT" +mkdir -p /root/.z2m /etc/zigbee2mqtt $STD apk add zigbee2mqtt -mkdir -p /root/.z2m ln -s /etc/zigbee2mqtt/ /root/.z2m chown -R root:root /etc/zigbee2mqtt /root/.z2m sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="root"/' /etc/conf.d/zigbee2mqtt diff --git a/install/apache-cassandra-install.sh b/install/apache-cassandra-install.sh index 2a48b118d..dceb10756 100644 --- a/install/apache-cassandra-install.sh +++ b/install/apache-cassandra-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y apt-transport-https -$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Installing Eclipse Temurin (Patience)" diff --git a/install/apache-couchdb-install.sh b/install/apache-couchdb-install.sh index 742a9d27e..6dd8f5722 100644 --- a/install/apache-couchdb-install.sh +++ b/install/apache-couchdb-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y apt-transport-https -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Installing Apache CouchDB" diff --git a/install/apache-guacamole-install.sh b/install/apache-guacamole-install.sh index 54283fdbd..fc2c99de3 100644 --- a/install/apache-guacamole-install.sh +++ b/install/apache-guacamole-install.sh @@ -14,31 +14,32 @@ 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 \ - mariadb-server \ - 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 \ + 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 @@ -75,23 +76,23 @@ msg_info "Setup Database" DB_NAME=guacamole_db DB_USER=guacamole_user DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -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;" +$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 "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} +cat *.sql | mariadb -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" diff --git a/install/apache-tika-install.sh b/install/apache-tika-install.sh index f982845b3..1dbdbeb42 100644 --- a/install/apache-tika-install.sh +++ b/install/apache-tika-install.sh @@ -44,7 +44,7 @@ msg_info "Installing Apache Tika" mkdir -p /opt/apache-tika cd /opt/apache-tika RELEASE="$(curl -fsSL https://dlcdn.apache.org/tika/ | grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1)" -curl -fsSL "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar" -o $(basename "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar") +curl -fsSL "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar" -o tika-server-standard-${RELEASE}.jar mv tika-server-standard-${RELEASE}.jar tika-server-standard.jar echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Apache Tika" diff --git a/install/apache-tomcat-install.sh b/install/apache-tomcat-install.sh index 8f5b696d9..31fdedd36 100644 --- a/install/apache-tomcat-install.sh +++ b/install/apache-tomcat-install.sh @@ -15,9 +15,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 \ lsb-release \ - gpg \ apt-transport-https msg_ok "Installed Dependencies" diff --git a/install/archivebox-install.sh b/install/archivebox-install.sh index f96bd38c4..da611634e 100644 --- a/install/archivebox-install.sh +++ b/install/archivebox-install.sh @@ -34,16 +34,7 @@ $STD apt-get install -y \ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing Playwright" $STD pip install playwright diff --git a/install/authelia-install.sh b/install/authelia-install.sh index bede0dad9..2b35df19b 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -15,7 +15,7 @@ update_os msg_info "Installing Authelia" RELEASE=$(curl -fsSL https://api.github.com/repos/authelia/authelia/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_arm64.deb" -o $(basename "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_arm64.deb") +curl -fsSL "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_arm64.deb" -o "authelia_${RELEASE}_arm64.deb" $STD dpkg -i "authelia_${RELEASE}_arm64.deb" msg_ok "Install Authelia completed" diff --git a/install/authentik-install.sh b/install/authentik-install.sh deleted file mode 100644 index 69738990a..000000000 --- a/install/authentik-install.sh +++ /dev/null @@ -1,237 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: remz1337 -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://goauthentik.io/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y \ - pkg-config \ - libffi-dev \ - build-essential \ - libpq-dev \ - libkrb5-dev \ - libssl-dev \ - libsqlite3-dev \ - tk-dev \ - libgdbm-dev \ - libc6-dev \ - libbz2-dev \ - zlib1g-dev \ - libxmlsec1 \ - libxmlsec1-dev \ - libxmlsec1-openssl \ - libmaxminddb0 \ - python3-pip \ - redis-server \ - git -msg_ok "Installed Dependencies" - -setup_uv -PG_VERSION="16" install_postgresql -NODE_VERSION="22" install_node_and_modules -install_go - -msg_info "Installing yq" -cd /tmp -YQ_LATEST="$(curl -fsSL https://api.github.com/repos/mikefarah/yq/releases/latest | grep -Po '"tag_name": "\K.*?(?=")')" -curl -fsSL "https://github.com/mikefarah/yq/releases/download/${YQ_LATEST}/yq_linux_arm64" -o /usr/bin/yq -chmod +x /usr/bin/yq -msg_ok "Installed yq" - -msg_info "Installing GeoIP" -cd /tmp -GEOIP_RELEASE=$(curl -fsSL https://api.github.com/repos/maxmind/geoipupdate/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/maxmind/geoipupdate/releases/download/v${GEOIP_RELEASE}/geoipupdate_${GEOIP_RELEASE}_linux_arm64.deb" -o "geoipupdate.deb" -$STD dpkg -i geoipupdate.deb -cat </etc/GeoIP.conf -#GEOIPUPDATE_EDITION_IDS="GeoLite2-City GeoLite2-ASN" -#GEOIPUPDATE_VERBOSE="1" -#GEOIPUPDATE_ACCOUNT_ID_FILE="/run/secrets/GEOIPUPDATE_ACCOUNT_ID" -#GEOIPUPDATE_LICENSE_KEY_FILE="/run/secrets/GEOIPUPDATE_LICENSE_KEY" -EOF -msg_ok "Installed GeoIP" - -msg_info "Setting up Python 3" -cd /tmp -curl -fsSL "https://www.python.org/ftp/python/3.12.1/Python-3.12.1.tgz" -o "Python.tgz" -tar -zxf Python.tgz -cd Python-3.12.1 -$STD ./configure --enable-optimizations -$STD make altinstall -cd ~ -$STD update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1 -msg_ok "Setup Python 3" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-arm64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -rm -f "$temp_file" -set -o pipefail -msg_ok "Installed Golang" - -msg_info "Installing Redis" -$STD apt-get install -y redis-server -systemctl enable -q --now redis-server -msg_ok "Installed Redis" - -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)" -$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;" -$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" -$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;" -$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;" -$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" -msg_ok "Installed PostgreSQL" - -msg_info "Installing authentik" -RELEASE=$(curl -fsSL https://api.github.com/repos/goauthentik/authentik/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}') -mkdir -p /opt/authentik -curl -fsSL "${RELEASE}" -o "authentik.tar.gz" -tar -xzf authentik.tar.gz -C /opt/authentik --strip-components 1 --overwrite -export NODE_OPTIONS="--max-old-space-size=4096" -cd /opt/authentik/website -$STD npm install -$STD npm run build-bundled - -cd /opt/authentik/web -$STD npm install -$STD npm run build - -cd /opt/authentik -$STD go mod download -$STD go build -o /go/authentik ./cmd/server -$STD go build -o /opt/authentik/authentik-server /opt/authentik/cmd/server/ -$STD uv sync --frozen --no-install-project --no-dev -#$STD pip3 install --no-cache-dir --upgrade pip -#$STD pip3 install --upgrade pip -#$STD pip3 install poetry poetry-plugin-export - -#ln -s /usr/local/bin/poetry /usr/bin/poetry -#$STD poetry install --only=main --no-ansi --no-interaction --no-root -#$STD poetry export --without-hashes --without-urls -f requirements.txt --output requirements.txt -#$STD pip install --no-cache-dir -r requirements.txt -#$STD pip install . -mkdir -p /etc/authentik -mv /opt/authentik/authentik/lib/default.yml /etc/authentik/config.yml -$STD yq -i ".secret_key = \"$(openssl rand -hex 32)\"" /etc/authentik/config.yml -$STD yq -i ".postgresql.password = \"${DB_PASS}\"" /etc/authentik/config.yml -$STD yq -i ".geoip = \"/opt/authentik/tests/GeoLite2-City-Test.mmdb\"" /etc/authentik/config.yml -cp -r /opt/authentik/authentik/blueprints /opt/authentik/blueprints -$STD yq -i ".blueprints_dir = \"/opt/authentik/blueprints\"" /etc/authentik/config.yml -#ln -s /usr/bin/python3 /usr/bin/python -#ln -s /usr/local/bin/gunicorn /usr/bin/gunicorn -#ln -s /usr/local/bin/celery /usr/bin/celery -#$STD bash /opt/authentik/lifecycle/ak migrate -cd /opt/authentik -uv run python -m lifecycle.migrate -ln -s /opt/authentik/.venv/bin/gunicorn /usr/local/bin/gunicorn -ln -s /opt/authentik/.venv/bin/celery /usr/local/bin/celery -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Installed authentik" - -msg_info "Creating Services" -cat </etc/systemd/system/authentik-server.service -[Unit] -Description=authentik Go Server (API Gateway) -After=network.target -Wants=redis.service postgresql.service - -[Service] -WorkingDirectory=/opt/authentik/ -ExecStart=/opt/authentik/authentik-server -Restart=always -RestartSec=5 -Environment=DJANGO_SETTINGS_MODULE=authentik.root.settings - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/authentik-worker.service -[Unit] -Description=authentik Celery Worker -After=network.target redis.service postgresql.service -Requires=redis.service - -[Service] -Type=simple -WorkingDirectory=/opt/authentik -ExecStart=/opt/authentik/.venv/bin/celery \ - -A authentik.root.celery worker \ - -Ofair \ - --max-tasks-per-child=1 \ - --autoscale 3,1 \ - -Q authentik,authentik_scheduled,authentik_events \ - -E -Restart=always -RestartSec=5 -Environment=DJANGO_SETTINGS_MODULE=authentik.root.settings - -[Install] -WantedBy=multi-user.target -EOF - -cat </etc/systemd/system/authentik-celery-beat.service -[Unit] -Description=authentik Celery Beat Scheduler -After=network.target - -[Service] -Type=simple -WorkingDirectory=/opt/authentik -ExecStart=/opt/authentik/.venv/bin/celery \ - -A authentik.root.celery beat \ - -s /tmp/celerybeat-schedule -Restart=always -RestartSec=5 -#User=authentik -Environment=DJANGO_SETTINGS_MODULE=authentik.root.settings - -[Install] -WantedBy=multi-user.target -EOF - -systemctl enable -q --now authentik-server authentik-worker authentik-celery-beat -msg_ok "Created Services" - -motd_ssh -customize - -msg_info "Cleaning up" -rm -rf /tmp/Python-3.12.1 -rm -rf /tmp/Python.tgz -rm -rf go/ -rm -rf /tmp/geoipupdate.deb -rm -rf authentik.tar.gz -$STD apt-get -y remove yq -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" diff --git a/install/backrest-install.sh b/install/backrest-install.sh new file mode 100644 index 000000000..f8cc5a06c --- /dev/null +++ b/install/backrest-install.sh @@ -0,0 +1,54 @@ +#!/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 </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" diff --git a/install/baikal-install.sh b/install/baikal-install.sh index da5054684..0176c4f48 100644 --- a/install/baikal-install.sh +++ b/install/baikal-install.sh @@ -15,31 +15,32 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - postgresql \ - apache2 \ - libapache2-mod-php \ - php-{pgsql,dom} + apache2 \ + libapache2-mod-php \ + php-{pgsql,dom} msg_ok "Installed Dependencies" -msg_info "Setting up PostgreSQL" +PG_VERSION="16" install_postgresql + +msg_info "Setting up PostgreSQL Database" 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" +msg_ok "Set up PostgreSQL Database" 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) }') cd /opt -curl -fsSL "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip" -o $(basename "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip") -unzip -q "baikal-${RELEASE}.zip" +curl -fsSL "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip" -o "baikal-${RELEASE}.zip" +$STD unzip "baikal-${RELEASE}.zip" cat </opt/baikal/config/baikal.yaml database: backend: pgsql diff --git a/install/barcode-buddy-install.sh b/install/barcode-buddy-install.sh index b646bf9ee..d9f02d9f1 100644 --- a/install/barcode-buddy-install.sh +++ b/install/barcode-buddy-install.sh @@ -24,8 +24,8 @@ msg_ok "Installed Dependencies" msg_info "Installing barcodebuddy" RELEASE=$(curl -fsSL https://api.github.com/repos/Forceu/barcodebuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip") -unzip -q "v${RELEASE}.zip" +curl -fsSL "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip "v${RELEASE}.zip" mv "/opt/barcodebuddy-${RELEASE}" /opt/barcodebuddy chown -R www-data:www-data /opt/barcodebuddy/data echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/bazarr-install.sh b/install/bazarr-install.sh index f252de45e..d1c77b28e 100644 --- a/install/bazarr-install.sh +++ b/install/bazarr-install.sh @@ -23,8 +23,8 @@ msg_ok "Setup Python3" msg_info "Installing Bazarr" mkdir -p /var/lib/bazarr/ -curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o $(basename "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip") -unzip -qq bazarr -d /opt/bazarr +curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o "bazarr.zip" +$STD unzip bazarr -d /opt/bazarr chmod 775 /opt/bazarr /var/lib/bazarr/ $STD python3 -m pip install -q -r /opt/bazarr/requirements.txt msg_ok "Installed Bazarr" diff --git a/install/bookstack-install.sh b/install/bookstack-install.sh index 42607cb2b..9b18a499a 100644 --- a/install/bookstack-install.sh +++ b/install/bookstack-install.sh @@ -15,27 +15,28 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - unzip \ - mariadb-server \ apache2 \ + unzip \ php8.2-{mbstring,gd,fpm,curl,intl,ldap,tidy,bz2,mysql,zip,xml} \ composer \ libapache2-mod-php \ - make \ + make msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=bookstack DB_USER=bookstack DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -$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;" +$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 "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" @@ -43,8 +44,8 @@ msg_info "Setup Bookstack (Patience)" LOCAL_IP="$(hostname -I | awk '{print $1}')" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip +curl -fsSL "https://github.com/BookStackApp/BookStack/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v${RELEASE}.zip mv BookStack-${RELEASE} /opt/bookstack cd /opt/bookstack cp .env.example .env diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index d7f4eef9a..fc26582c8 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -14,7 +14,6 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gpg $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release msg_ok "Installed Dependencies" diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh index e668982ca..535ae685b 100644 --- a/install/bytestash-install.sh +++ b/install/bytestash-install.sh @@ -13,21 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing ByteStash" JWT_SECRET=$(openssl rand -base64 32 | tr -d '/+=') diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 2b7dcad74..76f2a1b81 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -17,8 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ debian-keyring \ debian-archive-keyring \ - apt-transport-https \ - gpg + apt-transport-https msg_ok "Installed Dependencies" msg_info "Installing Caddy" @@ -30,22 +29,12 @@ msg_ok "Installed Caddy" read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - msg_info "Installing Golang" - set +o pipefail - temp_file=$(mktemp) - golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-arm64\.tar\.gz' | head -n 1) - curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" - tar -C /usr/local -xzf "$temp_file" - ln -sf /usr/local/go/bin/go /usr/local/bin/go - rm -f "$temp_file" - set -o pipefail - msg_ok "Installed Golang" - + install_go msg_info "Setup xCaddy" $STD apt-get install -y git cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_arm64.deb" -o $(basename "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_arm64.deb") + curl -fsSL "https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_arm64.deb" -o "xcaddy_${RELEASE:1}_linux_arm64.deb" $STD dpkg -i xcaddy_"${RELEASE:1}"_linux_arm64.deb rm -rf /opt/xcaddy* $STD xcaddy build diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index 80a04e6c9..f62efd264 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -40,8 +40,7 @@ $STD apt-get install -y \ qpdf \ xdg-utils \ xvfb \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" msg_info "Setup Python3" @@ -52,16 +51,7 @@ $STD apt-get install -y \ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing Change Detection" mkdir /opt/changedetection diff --git a/install/commafeed-install.sh b/install/commafeed-install.sh index ac6653528..95f46d6b7 100644 --- a/install/commafeed-install.sh +++ b/install/commafeed-install.sh @@ -19,7 +19,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Azul Zulu" curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" -o "/etc/apt/trusted.gpg.d/zulu-repo.asc" -curl -fsSL "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o $(basename "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb") +curl -fsSL "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o "zulu-repo_1.0.0-3_all.deb" $STD dpkg -i zulu-repo_1.0.0-3_all.deb $STD apt-get update $STD apt-get -y install zulu17-jdk @@ -28,8 +28,8 @@ msg_ok "Installed Azul Zulu" RELEASE=$(curl -fsSL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing CommaFeed ${RELEASE}" mkdir /opt/commafeed -curl -fsSL "https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip" -o $(basename "https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip") -unzip -q commafeed-${RELEASE}-h2-jvm.zip +curl -fsSL "https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip" -o "commafeed-${RELEASE}-h2-jvm.zip" +$STD unzip commafeed-${RELEASE}-h2-jvm.zip mv commafeed-${RELEASE}-h2/* /opt/commafeed/ echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed CommaFeed ${RELEASE}" diff --git a/install/cosmos-install.sh b/install/cosmos-install.sh index 9759216b5..a9665fe97 100644 --- a/install/cosmos-install.sh +++ b/install/cosmos-install.sh @@ -15,14 +15,14 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - snapraid \ - avahi-daemon \ - fdisk + snapraid \ + avahi-daemon \ + fdisk msg_ok "Installed Dependencies" msg_info "Install mergerfs" MERGERFS_VERSION="2.40.2" -curl -fsSL "https://github.com/trapexit/mergerfs/releases/download/${MERGERFS_VERSION}/mergerfs_${MERGERFS_VERSION}.debian-bullseye_arm64.deb" -o $(basename "https://github.com/trapexit/mergerfs/releases/download/${MERGERFS_VERSION}/mergerfs_${MERGERFS_VERSION}.debian-bullseye_arm64.deb") +curl -fsSL "https://github.com/trapexit/mergerfs/releases/download/${MERGERFS_VERSION}/mergerfs_${MERGERFS_VERSION}.debian-bullseye_arm64.deb" -o "mergerfs_${MERGERFS_VERSION}.debian-bullseye_arm64.deb" $STD dpkg -i "mergerfs_${MERGERFS_VERSION}.debian-bullseye_arm64.deb" || $STD apt-get install -f -y rm "mergerfs_${MERGERFS_VERSION}.debian-bullseye_arm64.deb" msg_ok "Installed mergerfs" @@ -39,7 +39,7 @@ LATEST_RELEASE=$(curl -fsSL https://api.github.com/repos/azukaar/Cosmos-Server/r ZIP_FILE="cosmos-cloud-${LATEST_RELEASE#v}-arm64.zip" curl -fsSL "https://github.com/azukaar/Cosmos-Server/releases/download/${LATEST_RELEASE}/${ZIP_FILE}" -o "/opt/cosmos/${ZIP_FILE}" cd /opt/cosmos -unzip -o -q "${ZIP_FILE}" +$STD unzip -o -q "${ZIP_FILE}" LATEST_RELEASE_NO_V=${LATEST_RELEASE#v} mv /opt/cosmos/cosmos-cloud-${LATEST_RELEASE_NO_V}-arm64/* /opt/cosmos/ rmdir /opt/cosmos/cosmos-cloud-${LATEST_RELEASE_NO_V}-arm64 diff --git a/install/crafty-controller-install.sh b/install/crafty-controller-install.sh index e70021a53..e037a36f9 100644 --- a/install/crafty-controller-install.sh +++ b/install/crafty-controller-install.sh @@ -47,8 +47,8 @@ cd /opt mkdir -p /opt/crafty-controller/crafty /opt/crafty-controller/server RELEASE=$(curl -fsSL "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//') echo "${RELEASE}" >"/opt/crafty-controller_version.txt" -curl -fsSL "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" -o $(basename "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip") -unzip -q crafty-4-v${RELEASE}.zip +curl -fsSL "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" -o "crafty-4-v${RELEASE}.zip" +$STD unzip crafty-4-v${RELEASE}.zip cp -a crafty-4-v${RELEASE}/. /opt/crafty-controller/crafty/crafty-4/ rm -rf crafty-4-v${RELEASE} diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index e3ec46317..773ba59fe 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -13,20 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing Cronicle Primary Server" LATEST=$(curl -fsSL https://api.github.com/repos/jhuckaby/Cronicle/releases/latest | grep '"tag_name":' | cut -d'"' -f4) diff --git a/install/cross-seed-install.sh b/install/cross-seed-install.sh index 6413cf661..a4dd77f0c 100644 --- a/install/cross-seed-install.sh +++ b/install/cross-seed-install.sh @@ -13,20 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_23.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Setup Node.js Repository" - -msg_info "Setting up Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Setup Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Setup Cross-Seed" $STD npm install cross-seed@latest -g diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index 81bd24c4c..74b7f8074 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -15,20 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Setup Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Setup Node.js" +NODE_VERSION="22" install_node_and_modules read -p "${TAB3}Install OnlyOffice components instead of CKEditor? (Y/N): " onlyoffice diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 303234bdd..ca070341c 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -13,20 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules RELEASE=$(curl -fsSL https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Installing Dashy ${RELEASE} (Patience)" diff --git a/install/docmost-install.sh b/install/docmost-install.sh index 3c6cee72d..a6a74fd5e 100644 --- a/install/docmost-install.sh +++ b/install/docmost-install.sh @@ -15,23 +15,13 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ redis \ - make \ - postgresql + jq \ + make msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g pnpm@10.4.0 -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/docmost/docmost/main/package.json | jq -r '.packageManager | split("@")[1]')" install_node_and_modules +PG_VERSION="16" install_postgresql msg_info "Setting up PostgreSQL" DB_NAME="docmost_db" diff --git a/install/documenso-install.sh b/install/documenso-install.sh index 261f6466b..6a20cdb2b 100644 --- a/install/documenso-install.sh +++ b/install/documenso-install.sh @@ -53,7 +53,7 @@ msg_info "Installing Documenso (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/documenso/documenso/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/documenso/documenso/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip -unzip -q v${RELEASE}.zip +$STD unzip v${RELEASE}.zip mv documenso-${RELEASE} /opt/documenso cd /opt/documenso mv .env.example /opt/documenso/.env diff --git a/install/dolibarr-install.sh b/install/dolibarr-install.sh index d629ce284..0c98f5e74 100644 --- a/install/dolibarr-install.sh +++ b/install/dolibarr-install.sh @@ -16,13 +16,14 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ php-imap \ - debconf-utils \ - mariadb-server + debconf-utils 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;" +$STD mariadb -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '$ROOT_PASS'; flush privileges;" { echo "Dolibarr DB Credentials" echo "MariaDB Root Password: $ROOT_PASS" @@ -31,7 +32,7 @@ msg_ok "Set up database" msg_info "Setup Dolibarr" BASE="https://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/" -RELEASE=$(curl -fsSL "$BASE" | grep -oP '(?<=/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/)[^/"]+' | head -n1) +RELEASE=$(curl -fsSL "$BASE" | grep -oP '(?<=/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/)\d+(\.\d+)+(?=/)' | sort -V | tail -n1) FILE=$(curl -fsSL "${BASE}${RELEASE}/" | grep -oP 'dolibarr_[^"]+_all.deb' | head -n1) curl -fsSL "https://netcologne.dl.sourceforge.net/project/dolibarr/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/${RELEASE}/${FILE}?viasf=1" -o ""$FILE"" echo "dolibarr dolibarr/reconfigure-webserver multiselect apache2" | debconf-set-selections diff --git a/install/duplicati-install.sh b/install/duplicati-install.sh index a285f484f..b780b5e74 100644 --- a/install/duplicati-install.sh +++ b/install/duplicati-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Duplicati" RELEASE=$(curl -fsSL https://api.github.com/repos/duplicati/duplicati/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') -curl -fsSL "https://github.com/duplicati/duplicati/releases/download/v${RELEASE}/duplicati-${RELEASE}-linux-arm64-gui.deb" -o $(basename "https://github.com/duplicati/duplicati/releases/download/v${RELEASE}/duplicati-${RELEASE}-linux-arm64-gui.deb") +curl -fsSL "https://github.com/duplicati/duplicati/releases/download/v${RELEASE}/duplicati-${RELEASE}-linux-arm64-gui.deb" -o "duplicati-${RELEASE}-linux-arm64-gui.deb" $STD dpkg -i duplicati-${RELEASE}-linux-arm64-gui.deb echo "${RELEASE}" >/opt/Duplicati_version.txt msg_ok "Finished setting up Duplicati" diff --git a/install/elementsynapse-install.sh b/install/elementsynapse-install.sh index 285419c20..f9c654f1e 100644 --- a/install/elementsynapse-install.sh +++ b/install/elementsynapse-install.sh @@ -17,21 +17,10 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ lsb-release \ apt-transport-https \ - debconf-utils \ - gpg + debconf-utils msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules read -p "${TAB3}Please enter the name for your server: " servername @@ -65,7 +54,12 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/etkecc/synapse-admin/releases/ curl -fsSL "https://github.com/etkecc/synapse-admin/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar xzf "$temp_file" -C /opt/synapse-admin --strip-components=1 cd /opt/synapse-admin +$STD yarn global add serve $STD yarn install --ignore-engines +$STD yarn build +mv ./dist ../ && \ + rm -rf * && \ + mv ../dist ./ msg_ok "Installed Element Synapse" msg_info "Creating Service" @@ -78,7 +72,7 @@ Requires=matrix-synapse.service [Service] Type=simple WorkingDirectory=/opt/synapse-admin -ExecStart=/usr/bin/yarn start --host +ExecStart=/usr/local/bin/serve -s dist -l 5173 Restart=always [Install] diff --git a/install/emby-install.sh b/install/emby-install.sh index aca75cfe7..70b4e820c 100644 --- a/install/emby-install.sh +++ b/install/emby-install.sh @@ -27,7 +27,7 @@ msg_ok "Set Up Hardware Acceleration" LATEST=$(curl -fsSL https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Installing Emby" -curl -fsSL "https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_arm64.deb" -o $(basename "https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_arm64.deb") +curl -fsSL "https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_arm64.deb" -o "emby-server-deb_${LATEST}_arm64.deb" $STD dpkg -i emby-server-deb_${LATEST}_arm64.deb if [[ "$CTTYPE" == "0" ]]; then sed -i -e 's/^ssl-cert:x:104:$/render:x:104:root,emby/' -e 's/^render:x:108:root,emby$/ssl-cert:x:108:/' /etc/group diff --git a/install/ersatztv-install.sh b/install/ersatztv-install.sh index c833ea77a..2d37d1640 100644 --- a/install/ersatztv-install.sh +++ b/install/ersatztv-install.sh @@ -19,7 +19,7 @@ msg_ok "Installed Dependencies" msg_info "Installing FFmpeg (Patience)" cd /usr/local/bin -curl -fsSL "https://johnvansickle.com/ffmpeg/releasesffmpeg/-release-arm64-static.tar.xz" -o $(basename "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz") +curl -fsSL "https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz" -o "ffmpeg-release-arm64-static.tar.xz" $STD tar -xvf ffmpeg-release-arm64-static.tar.xz rm -f ffmpeg-*.tar.xz cd ffmpeg-* diff --git a/install/evcc-install.sh b/install/evcc-install.sh index c20be53e3..70b358418 100644 --- a/install/evcc-install.sh +++ b/install/evcc-install.sh @@ -16,8 +16,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - lsb-release \ - gpg + lsb-release msg_ok "Installed Dependencies" msg_info "Setting up evcc Repository" diff --git a/install/excalidraw-install.sh b/install/excalidraw-install.sh index 461d8259b..f5a35e591 100644 --- a/install/excalidraw-install.sh +++ b/install/excalidraw-install.sh @@ -15,21 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ xdg-utils msg_ok "Installed Dependencies" -msg_info "Setup Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Setup Node.js Repository" - -msg_info "Setup Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Setup Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Setup Excalidraw" temp_file=$(mktemp) diff --git a/install/fhem-install.sh b/install/fhem-install.sh index 29438a282..8246fa804 100644 --- a/install/fhem-install.sh +++ b/install/fhem-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y avahi-daemon -$STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setting up Fhem Repository" diff --git a/install/fileflows-install.sh b/install/fileflows-install.sh index 0b53a8c1a..bb8292fe9 100644 --- a/install/fileflows-install.sh +++ b/install/fileflows-install.sh @@ -39,7 +39,7 @@ $STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg $STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe temp_file=$(mktemp) curl -fsSL https://fileflows.com/downloads/zip -o "$temp_file" -unzip -q -d /opt/fileflows "$temp_file" +$STD unzip -d /opt/fileflows "$temp_file" (cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true) systemctl enable -q --now fileflows msg_ok "Setup ${APPLICATION}" diff --git a/install/firefly-install.sh b/install/firefly-install.sh index ed9f89a33..c10e9ca8e 100644 --- a/install/firefly-install.sh +++ b/install/firefly-install.sh @@ -18,33 +18,34 @@ 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} \ - mariadb-server \ - composer + apache2 \ + libapache2-mod-php8.4 \ + php8.4-{bcmath,cli,intl,curl,zip,gd,xml,mbstring,mysql} \ + composer msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up database" DB_NAME=firefly DB_USER=firefly DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -MYSQL_VERSION=$(mysql --version | grep -oP 'Distrib \K[0-9]+\.[0-9]+\.[0-9]+') -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;" +MYSQL_VERSION=$(mariadb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1) +$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;" +$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +mariadb -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" msg_info "Installing Firefly III (Patience)" RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') cd /opt -curl -fsSL "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz" -o $(basename "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz") +curl -fsSL "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz" -o "FireflyIII-v${RELEASE}.tar.gz" mkdir -p /opt/firefly tar -xzf FireflyIII-v${RELEASE}.tar.gz -C /opt/firefly chown -R www-data:www-data /opt/firefly diff --git a/install/flaresolverr-install.sh b/install/flaresolverr-install.sh index 1c8ec24fd..6e9488d32 100644 --- a/install/flaresolverr-install.sh +++ b/install/flaresolverr-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y apt-transport-https -$STD apt-get install -y gpg $STD apt-get install -y xvfb $STD apt-get install -y wget $STD apt-get install -y git diff --git a/install/flowiseai-install.sh b/install/flowiseai-install.sh index 85fb9be05..cf78c6434 100644 --- a/install/flowiseai-install.sh +++ b/install/flowiseai-install.sh @@ -13,17 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - -msg_info "Installing Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="20" install_node_and_modules msg_info "Installing FlowiseAI (Patience)" $STD npm install -g flowise \ diff --git a/install/fluid-calendar-install.sh b/install/fluid-calendar-install.sh index 0b1a54643..5dca3c133 100644 --- a/install/fluid-calendar-install.sh +++ b/install/fluid-calendar-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ zip \ - gnupg \ postgresql-common msg_ok "Installed Dependencies" @@ -49,7 +48,7 @@ msg_info "Setup ${APPLICATION}" tmp_file=$(mktemp) RELEASE=$(curl -fsSL https://api.github.com/repos/dotnetfactory/fluid-calendar/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/dotnetfactory/fluid-calendar/archive/refs/tags/v${RELEASE}.zip" -o "$tmp_file" -unzip -q $tmp_file +$STD unzip $tmp_file mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/freshrss-install.sh b/install/freshrss-install.sh index 679737d7a..dc2894f61 100644 --- a/install/freshrss-install.sh +++ b/install/freshrss-install.sh @@ -15,12 +15,13 @@ 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 @@ -38,8 +39,8 @@ msg_ok "Set up PostgreSQL" msg_info "Installing FreshRSS" RELEASE=$(curl -fsSL https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') cd /opt -curl -fsSL "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip") -unzip -q "${RELEASE}.zip" +curl -fsSL "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" +$STD unzip "${RELEASE}.zip" mv "/opt/FreshRSS-${RELEASE}" /opt/freshrss cd /opt/freshrss chown -R www-data:www-data /opt/freshrss diff --git a/install/frigate-install.sh b/install/frigate-install.sh index da6a3a9d8..f5d63a9c1 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -15,7 +15,7 @@ network_check update_os msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y {git,gpg,ca-certificates,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev,jq,moreutils} +$STD apt-get install -y {git,ca-certificates,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev,jq,moreutils} msg_ok "Installed Dependencies" msg_info "Setup Python3" @@ -24,13 +24,7 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD pip install --upgrade pip msg_ok "Setup Python3" -msg_info "Installing Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing go2rtc" mkdir -p /usr/local/go2rtc/bin @@ -143,8 +137,8 @@ msg_info "Installing Coral Object Detection Model (Patience)" cd /opt/frigate export CCACHE_DIR=/root/.ccache export CCACHE_MAXSIZE=2G -curl -fsSL "https://github.com/libusb/libusb/archive/v1.0.26.zip" -o $(basename "https://github.com/libusb/libusb/archive/v1.0.26.zip") -unzip -q v1.0.26.zip +curl -fsSL "https://github.com/libusb/libusb/archive/v1.0.26.zip" -o "v1.0.26.zip" +$STD unzip v1.0.26.zip rm v1.0.26.zip cd libusb-1.0.26 $STD ./bootstrap.sh diff --git a/install/ghost-install.sh b/install/ghost-install.sh index a69e5f44e..14604051d 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -16,18 +16,18 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ nginx \ - mariadb-server \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" +install_mariadb + msg_info "Configuring Database" DB_NAME=ghost DB_USER=ghostuser DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -mariadb -u root -e "CREATE DATABASE $DB_NAME;" -mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" -mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +$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 "Ghost-Credentials" @@ -37,16 +37,7 @@ mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRI } >>~/ghost.creds msg_ok "Configured MySQL" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Setup Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Setup Node.js" +NODE_VERSION="20" install_node_and_modules msg_info "Installing Ghost CLI" $STD npm install ghost-cli@latest -g diff --git a/install/gitea-install.sh b/install/gitea-install.sh index 7868b02af..ecb66e7c1 100644 --- a/install/gitea-install.sh +++ b/install/gitea-install.sh @@ -21,7 +21,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Gitea" RELEASE=$(curl -fsSL https://github.com/go-gitea/gitea/releases/latest | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') -curl -fsSL "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-arm64" -o $(basename "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-arm64") +curl -fsSL "https://github.com/go-gitea/gitea/releases/download/v$RELEASE/gitea-$RELEASE-linux-arm64" -o "gitea-$RELEASE-linux-arm64" mv gitea* /usr/local/bin/gitea chmod +x /usr/local/bin/gitea adduser --system --group --disabled-password --shell /bin/bash --home /etc/gitea gitea >/dev/null diff --git a/install/gitea-mirror-install.sh b/install/gitea-mirror-install.sh new file mode 100644 index 000000000..2a44477b9 --- /dev/null +++ b/install/gitea-mirror-install.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/arunavo4/gitea-mirror + +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 \ + build-essential \ + openssl \ + sqlite3 \ + unzip +msg_ok "Installed Dependencies" + +msg_info "Installing Bun" +export BUN_INSTALL=/opt/bun +curl -fsSL https://bun.sh/install | $STD bash +ln -sf /opt/bun/bin/bun /usr/local/bin/bun +ln -sf /opt/bun/bin/bun /usr/local/bin/bunx +msg_ok "Installed Bun" + +fetch_and_deploy_gh_release "arunavo4/gitea-mirror" + +msg_info "Installing gitea-mirror" +cd /opt/gitea-mirror +$STD bun run setup +$STD bun run build +msg_ok "Installed gitea-mirror" + +msg_info "Creating Services" +JWT_SECRET=$(openssl rand -hex 32) +APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4) +cat </etc/systemd/system/gitea-mirror.service +[Unit] +Description=Gitea Mirror +After=network.target +[Service] +Type=simple +WorkingDirectory=/opt/gitea-mirror +ExecStart=/usr/local/bin/bun dist/server/entry.mjs +Restart=on-failure +RestartSec=10 +Environment=NODE_ENV=production +Environment=HOST=0.0.0.0 +Environment=PORT=4321 +Environment=DATABASE_URL=file:/opt/gitea-mirror/data/gitea-mirror.db +Environment=JWT_SECRET=${JWT_SECRET} +Environment=npm_package_version=${APP_VERSION} +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now gitea-mirror +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/glance-install.sh b/install/glance-install.sh index b8f2bc30d..85f531b7c 100644 --- a/install/glance-install.sh +++ b/install/glance-install.sh @@ -16,7 +16,7 @@ update_os msg_info "Installing Glance" RELEASE=$(curl -fsSL https://api.github.com/repos/glanceapp/glance/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://github.com/glanceapp/glance/releases/download/v${RELEASE}/glance-linux-arm64.tar.gz" -o $(basename "https://github.com/glanceapp/glance/releases/download/v${RELEASE}/glance-linux-arm64.tar.gz") +curl -fsSL "https://github.com/glanceapp/glance/releases/download/v${RELEASE}/glance-linux-arm64.tar.gz" -o "glance-linux-arm64.tar.gz" mkdir -p /opt/glance tar -xzf glance-linux-arm64.tar.gz -C /opt/glance cat </opt/glance/glance.yml diff --git a/install/glpi-install.sh b/install/glpi-install.sh index bbca58a1c..2e9563b6a 100644 --- a/install/glpi-install.sh +++ b/install/glpi-install.sh @@ -15,35 +15,36 @@ 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 \ - mariadb-server \ - cron + libapache2-mod-php msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up database" DB_NAME=glpi_db DB_USER=glpi DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql -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';" -mysql -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +$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 PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';" +$STD mariadb -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" msg_info "Installing GLPi" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') -curl -fsSL "https://github.com/glpi-project/glpi/releases/download/${RELEASE}/glpi-${RELEASE}.tgz" -o $(basename "https://github.com/glpi-project/glpi/releases/download/${RELEASE}/glpi-${RELEASE}.tgz") +curl -fsSL "https://github.com/glpi-project/glpi/releases/download/${RELEASE}/glpi-${RELEASE}.tgz" -o "glpi-${RELEASE}.tgz" $STD tar -xzvf glpi-${RELEASE}.tgz cd /opt/glpi $STD php bin/console db:install --db-name=$DB_NAME --db-user=$DB_USER --db-password=$DB_PASS --no-interaction diff --git a/install/go2rtc-install.sh b/install/go2rtc-install.sh index fce928737..4ba742328 100644 --- a/install/go2rtc-install.sh +++ b/install/go2rtc-install.sh @@ -16,7 +16,7 @@ update_os msg_info "Installing go2rtc" mkdir -p /opt/go2rtc cd /opt/go2rtc -curl -fsSL "https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_arm64" -o $(basename "https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_arm64") +curl -fsSL "https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_arm64" -o "go2rtc_linux_arm64" chmod +x go2rtc_linux_arm64 msg_ok "Installed go2rtc" diff --git a/install/gokapi-install.sh b/install/gokapi-install.sh index ed3d25bd6..d7e067d3a 100644 --- a/install/gokapi-install.sh +++ b/install/gokapi-install.sh @@ -16,8 +16,8 @@ update_os msg_info "Installing Gokapi" LATEST=$(curl -fsSL https://api.github.com/repos/Forceu/Gokapi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) mkdir -p /opt/gokapi/{data,config} -curl -fsSL "https://github.com/Forceu/Gokapi/releases/download/$LATEST/gokapi-linux_arm64.zip" -o $(basename "https://github.com/Forceu/Gokapi/releases/download/$LATEST/gokapi-linux_arm64.zip") -unzip -q gokapi-linux_arm64.zip -d /opt/gokapi +curl -fsSL "https://github.com/Forceu/Gokapi/releases/download/$LATEST/gokapi-linux_arm64.zip" -o "gokapi-linux_arm64.zip" +$STD unzip gokapi-linux_arm64.zip -d /opt/gokapi rm gokapi-linux_arm64.zip chmod +x /opt/gokapi/gokapi-linux_arm64 msg_ok "Installed Gokapi" diff --git a/install/gomft-install.sh b/install/gomft-install.sh index ffebfdeb4..5b5692d89 100644 --- a/install/gomft-install.sh +++ b/install/gomft-install.sh @@ -19,30 +19,11 @@ $STD apt-get install -y \ rclone \ tzdata \ ca-certificates \ - build-essential \ - gnupg + build-essential msg_ok "Installed Dependencies" -msg_info "Setting up Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-arm64\.tar\.gz' | head -n 1) -wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -set -o pipefail -msg_ok "Setup Golang" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +install_go +NODE_VERSION="22" install_node_and_modules msg_info "Setup ${APPLICATION} (Patience)" temp_file=$(mktemp) diff --git a/install/gotify-install.sh b/install/gotify-install.sh index b1ac694d7..71852a9a3 100644 --- a/install/gotify-install.sh +++ b/install/gotify-install.sh @@ -17,8 +17,8 @@ msg_info "Installing Gotify" RELEASE=$(curl -fsSL https://api.github.com/repos/gotify/server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') mkdir -p /opt/gotify cd /opt/gotify -curl -fsSL "https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-arm64.zip" -o $(basename "https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-arm64.zip") -unzip -q gotify-linux-arm64.zip +curl -fsSL "https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-arm64.zip" -o "gotify-linux-arm64.zip" +$STD unzip gotify-linux-arm64.zip rm -rf gotify-linux-arm64.zip chmod +x gotify-linux-arm64 echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/grafana-install.sh b/install/grafana-install.sh index 88a8adcea..aef3e5be9 100644 --- a/install/grafana-install.sh +++ b/install/grafana-install.sh @@ -14,7 +14,6 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gnupg $STD apt-get install -y apt-transport-https $STD apt-get install -y software-properties-common msg_ok "Installed Dependencies" diff --git a/install/graylog-install.sh b/install/graylog-install.sh index 5316dcc4a..21bec8777 100644 --- a/install/graylog-install.sh +++ b/install/graylog-install.sh @@ -13,23 +13,12 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setup MongoDB" -curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor -echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list -$STD apt-get update -$STD apt-get install -y mongodb-org -$STD apt-mark hold mongodb-org -systemctl enable -q --now mongod -msg_ok "Setup MongoDB" +MONGO_VERSION="7.0" install_mongodb msg_info "Setup Graylog Data Node" PASSWORD_SECRET=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) -curl -fsSL "https://packages.graylog2.org/repo/packages/graylog-6.1-repository_latest.deb" -o $(basename "https://packages.graylog2.org/repo/packages/graylog-6.1-repository_latest.deb") -$STD dpkg -i graylog-6.1-repository_latest.deb +curl -fsSL "https://packages.graylog2.org/repo/packages/graylog-6.3-repository_latest.deb" -o "graylog-6.3-repository_latest.deb" +$STD dpkg -i graylog-6.3-repository_latest.deb $STD apt-get update $STD apt-get install graylog-datanode -y sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/datanode/datanode.conf diff --git a/install/grist-install.sh b/install/grist-install.sh index 079a4242a..9649accf4 100644 --- a/install/grist-install.sh +++ b/install/grist-install.sh @@ -16,28 +16,19 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ make \ - gnupg \ ca-certificates \ - unzip \ python3.11-venv msg_ok "Installed Dependencies" -msg_info "Installing Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Installing Grist" RELEASE=$(curl -fsSL https://api.github.com/repos/gristlabs/grist-core/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') export CYPRESS_INSTALL_BINARY=0 export NODE_OPTIONS="--max-old-space-size=2048" cd /opt -curl -fsSL "https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip") -unzip -q v$RELEASE.zip +curl -fsSL "https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v$RELEASE.zip mv grist-core-${RELEASE} grist cd grist $STD yarn install diff --git a/install/grocy-install.sh b/install/grocy-install.sh index e7337f823..ec35f9925 100644 --- a/install/grocy-install.sh +++ b/install/grocy-install.sh @@ -32,7 +32,7 @@ msg_ok "Installed PHP8.2" msg_info "Installing grocy" latest=$(curl -fsSL https://api.github.com/repos/grocy/grocy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/grocy/grocy/releases/download/v${latest}/grocy_${latest}.zip" -o $(basename "https://github.com/grocy/grocy/releases/download/v${latest}/grocy_${latest}.zip") +curl -fsSL "https://github.com/grocy/grocy/releases/download/v${latest}/grocy_${latest}.zip" -o "grocy_${latest}.zip" $STD unzip grocy_${latest}.zip -d /var/www/html chown -R www-data:www-data /var/www/html cp /var/www/html/config-dist.php /var/www/html/data/config.php diff --git a/install/habitica-install.sh b/install/habitica-install.sh index 044771ebe..482771e8b 100644 --- a/install/habitica-install.sh +++ b/install/habitica-install.sh @@ -15,24 +15,14 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - libkrb5-dev \ - gnupg \ - build-essential \ - git -curl -fsSL "http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb" -o $(basename "http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb") -$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb + libkrb5-dev \ + build-essential \ + git +curl -fsSL "http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb" -o "libssl1.1_1.1.1f-1ubuntu2_arm64.deb" +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2_arm64.deb msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Setup Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Setup Node.js" +NODE_VERSION="20" install_node_and_modules msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) diff --git a/install/headscale-install.sh b/install/headscale-install.sh index 67084f0c6..eaba6cb07 100644 --- a/install/headscale-install.sh +++ b/install/headscale-install.sh @@ -15,7 +15,7 @@ update_os RELEASE=$(curl -fsSL https://api.github.com/repos/juanfont/headscale/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing ${APPLICATION} v${RELEASE}" -curl -fsSL "https://github.com/juanfont/headscale/releases/download/v${RELEASE}/headscale_${RELEASE}_linux_arm64.deb" -o $(basename "https://github.com/juanfont/headscale/releases/download/v${RELEASE}/headscale_${RELEASE}_linux_arm64.deb") +curl -fsSL "https://github.com/juanfont/headscale/releases/download/v${RELEASE}/headscale_${RELEASE}_linux_arm64.deb" -o "headscale_${RELEASE}_linux_arm64.deb" $STD dpkg -i headscale_${RELEASE}_linux_arm64.deb systemctl enable -q --now headscale echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/heimdall-dashboard-install.sh b/install/heimdall-dashboard-install.sh index da1e0eba7..131c342c8 100644 --- a/install/heimdall-dashboard-install.sh +++ b/install/heimdall-dashboard-install.sh @@ -22,7 +22,7 @@ msg_ok "Installed Dependencies" RELEASE=$(curl -fsSL "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]') echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt msg_info "Installing Heimdall Dashboard ${RELEASE}" -curl -fsSL "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -o $(basename "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz") +curl -fsSL "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -o "${RELEASE}".tar.gz tar xzf "${RELEASE}".tar.gz VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') rm -rf "${RELEASE}".tar.gz diff --git a/install/hivemq-install.sh b/install/hivemq-install.sh index a46214b82..a0d4cc5e1 100644 --- a/install/hivemq-install.sh +++ b/install/hivemq-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Installing OpenJDK" curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=arm64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list @@ -26,8 +22,8 @@ msg_ok "Installed OpenJDK" msg_info "Installing HiveMQ CE" RELEASE=$(curl -fsSL https://api.github.com/repos/hivemq/hivemq-community-edition/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/hivemq/hivemq-community-edition/releases/download/${RELEASE}/hivemq-ce-${RELEASE}.zip" -o $(basename "https://github.com/hivemq/hivemq-community-edition/releases/download/${RELEASE}/hivemq-ce-${RELEASE}.zip") -unzip -q hivemq-ce-${RELEASE}.zip +curl -fsSL "https://github.com/hivemq/hivemq-community-edition/releases/download/${RELEASE}/hivemq-ce-${RELEASE}.zip" -o "hivemq-ce-${RELEASE}.zip" +$STD unzip hivemq-ce-${RELEASE}.zip mkdir -p /opt/hivemq mv hivemq-ce-${RELEASE}/* /opt/hivemq useradd -d /opt/hivemq hivemq diff --git a/install/homarr-install.sh b/install/homarr-install.sh index bafc31c89..1116534bd 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ redis-server \ ca-certificates \ - gpg \ make \ g++ \ build-essential \ diff --git a/install/homeassistant-core-install.sh b/install/homeassistant-core-install.sh index 8c13aa488..fc5305bac 100644 --- a/install/homeassistant-core-install.sh +++ b/install/homeassistant-core-install.sh @@ -19,7 +19,6 @@ $STD curl -O http://ports.ubuntu.com/pool/main/t/tiff/libtiff6_4.5.1+git230720-4 $STD apt --fix-broken install -y $STD apt-get install -y \ git \ - gnupg \ ca-certificates \ bluez \ tzdata \ diff --git a/install/homebridge-install.sh b/install/homebridge-install.sh index 275733c7b..23a508fa5 100644 --- a/install/homebridge-install.sh +++ b/install/homebridge-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y avahi-daemon -$STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setting up Homebridge Repository" diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 2c94b156d..7726b5ea1 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -14,25 +14,15 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gpg jq ca-certificates +$STD apt-get install -y jq msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g pnpm -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules LOCAL_IP=$(hostname -I | awk '{print $1}') RELEASE=$(curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Homepage v${RELEASE} (Patience)" -curl -fsSL "https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz" -o $(basename "https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz") +curl -fsSL "https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz" -o "v${RELEASE}.tar.gz" $STD tar -xzf v${RELEASE}.tar.gz rm -rf v${RELEASE}.tar.gz mkdir -p /opt/homepage/config diff --git a/install/homer-install.sh b/install/homer-install.sh index fc3a9b342..732eff912 100644 --- a/install/homer-install.sh +++ b/install/homer-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Homer" mkdir -p /opt/homer cd /opt/homer -curl -fsSL "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip" -o $(basename "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip") +curl -fsSL "https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip" -o "homer.zip" $STD unzip homer.zip rm -rf homer.zip cp assets/config.yml.dist assets/config.yml diff --git a/install/hyperhdr-install.sh b/install/hyperhdr-install.sh index 371440e8d..6915f8979 100644 --- a/install/hyperhdr-install.sh +++ b/install/hyperhdr-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Installing HyperHDR" curl -fsSL https://awawa-dev.github.io/hyperhdr.public.apt.gpg.key >/usr/share/keyrings/hyperhdr.public.apt.gpg.key chmod go+r /usr/share/keyrings/hyperhdr.public.apt.gpg.key diff --git a/install/hyperion-install.sh b/install/hyperion-install.sh index 1f3e99c0e..876688de4 100644 --- a/install/hyperion-install.sh +++ b/install/hyperion-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y lsb-release -$STD apt-get install -y gpg $STD apt-get install -y apt-transport-https $STD apt-get install -y libpython3.11 msg_ok "Installed Dependencies" diff --git a/install/immich-install.sh b/install/immich-install.sh new file mode 100644 index 000000000..be7312767 --- /dev/null +++ b/install/immich-install.sh @@ -0,0 +1,459 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://immich.app + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Configuring apt and installing dependencies" +echo "deb http://deb.debian.org/debian testing main contrib" >/etc/apt/sources.list.d/immich.list +cat </etc/apt/preferences.d/immich +Package: * +Pin: release a=testing +Pin-Priority: -10 +EOF + +$STD apt-get update +$STD apt-get install --no-install-recommends -y \ + git \ + redis \ + autoconf \ + build-essential \ + python3-venv \ + python3-dev \ + cmake \ + jq \ + libbrotli-dev \ + libde265-dev \ + libexif-dev \ + libexpat1-dev \ + libglib2.0-dev \ + libgsf-1-dev \ + libjpeg62-turbo-dev \ + librsvg2-dev \ + libspng-dev \ + meson \ + ninja-build \ + pkg-config \ + cpanminus \ + libde265-0 \ + libexif12 \ + libexpat1 \ + libgcc-s1 \ + libglib2.0-0 \ + libgomp1 \ + libgsf-1-114 \ + liblcms2-dev \ + liblqr-1-0 \ + libltdl7 \ + libmimalloc2.0 \ + libopenexr-dev \ + libgif-dev \ + libopenjp2-7 \ + librsvg2-2 \ + libspng0 \ + mesa-utils \ + mesa-va-drivers \ + mesa-vulkan-drivers \ + tini \ + zlib1g +$STD apt-get install -y \ + libgdk-pixbuf-2.0-dev librsvg2-dev libtool +curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg +DPKG_ARCHITECTURE="$(dpkg --print-architecture)" +export DPKG_ARCHITECTURE +cat </etc/apt/sources.list.d/jellyfin.sources +Types: deb +URIs: https://repo.jellyfin.org/debian +Suites: bookworm +Components: main +Architectures: ${DPKG_ARCHITECTURE} +Signed-By: /etc/apt/keyrings/jellyfin.gpg +EOF +$STD apt-get update +$STD apt-get install -y jellyfin-ffmpeg7 +ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg +ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe +msg_ok "Dependencies Installed" + +NODE_VERSION="22" install_node_and_modules +PG_VERSION="16" install_postgresql + +read -r -p "${TAB3}Install OpenVINO dependencies for Intel HW-accelerated machine-learning? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing OpenVINO dependencies" + touch ~/.openvino + $STD apt-get -y install --no-install-recommends ocl-icd-libopencl1 + tmp_dir=$(mktemp -d) + $STD pushd "$tmp_dir" + curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-core_1.0.17384.11_amd64.deb -O + curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-opencl_1.0.17384.11_amd64.deb -O + curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-opencl-icd_24.31.30508.7_amd64.deb -O + curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/libigdgmm12_22.4.1_amd64.deb -O + $STD dpkg -i ./*.deb + $STD popd + rm -rf "$tmp_dir" + dpkg -l | grep "intel-opencl-icd" | awk '{print $3}' >~/.intel_version + if [[ "$CTTYPE" == "0" ]]; then + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser "$(id -u -n)" video + $STD adduser "$(id -u -n)" render + fi + msg_ok "Installed OpenVINO dependencies" +fi + +msg_info "Setting up Postgresql Database" +$STD apt-get install postgresql-16-pgvector +curl -fsSL https://github.com/tensorchord/VectorChord/releases/download/0.3.0/postgresql-16-vchord_0.3.0-1_amd64.deb -o vchord.deb +$STD dpkg -i vchord.deb +rm vchord.deb +DB_NAME="immich" +DB_USER="immich" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c18) +sed -i -e "/^#shared_preload/s/^#//;/^shared_preload/s/''/'vchord.so'/" /etc/postgresql/16/main/postgresql.conf +systemctl restart postgresql.service +$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;" +$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;" +{ + echo "${APPLICATION} DB Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >>~/"$APPLICATION".creds +msg_ok "Set up Postgresql Database" + +msg_info "Installing Packages from Testing Repo" +export APT_LISTCHANGES_FRONTEND=none +export DEBIAN_FRONTEND=noninteractive +$STD apt-get install -t testing --no-install-recommends -y \ + libio-compress-brotli-perl \ + libwebp7 \ + libwebpdemux2 \ + libwebpmux3 \ + libhwy1t64 \ + libdav1d-dev \ + libhwy-dev \ + libwebp-dev +if [[ -f ~/.openvino ]]; then + $STD apt-get install -t testing -y patchelf +fi +msg_ok "Packages from Testing Repo Installed" + +# Fix default DB collation issue after libc update +$STD sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;" +$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;" + +msg_info "Compiling Custom Photo-processing Library (extreme patience)" +LD_LIBRARY_PATH=/usr/local/lib +export LD_RUN_PATH=/usr/local/lib +STAGING_DIR=/opt/staging +BASE_REPO="https://github.com/immich-app/base-images" +BASE_DIR=${STAGING_DIR}/base-images +SOURCE_DIR=${STAGING_DIR}/image-source +$STD git clone -b main "$BASE_REPO" "$BASE_DIR" +mkdir -p "$SOURCE_DIR" + +cd "$STAGING_DIR" +SOURCE=${SOURCE_DIR}/libjxl +JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62" +JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0" +: "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}" +$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE" +cd "$SOURCE" +$STD git reset --hard "$LIBJXL_REVISION" +$STD git submodule update --init --recursive --depth 1 --recommend-shallow +$STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-empty-dht-marker.patch +$STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-icc-warning.patch +mkdir build +cd build +$STD cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DJPEGXL_ENABLE_DOXYGEN=OFF \ + -DJPEGXL_ENABLE_MANPAGES=OFF \ + -DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF \ + -DJPEGXL_ENABLE_BENCHMARK=OFF \ + -DJPEGXL_ENABLE_EXAMPLES=OFF \ + -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \ + -DJPEGXL_FORCE_SYSTEM_HWY=ON \ + -DJPEGXL_ENABLE_JPEGLI=ON \ + -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON \ + -DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \ + -DJPEGXL_ENABLE_PLUGINS=ON \ + -DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="$JPEGLI_LIBJPEG_LIBRARY_SOVERSION" \ + -DJPEGLI_LIBJPEG_LIBRARY_VERSION="$JPEGLI_LIBJPEG_LIBRARY_VERSION" \ + -DLIBJPEG_TURBO_VERSION_NUMBER=2001005 \ + .. +$STD cmake --build . -- -j"$(nproc)" +$STD cmake --install . +ldconfig /usr/local/lib +$STD make clean +cd "$STAGING_DIR" +rm -rf "$SOURCE"/{build,third_party} + +SOURCE=${SOURCE_DIR}/libheif +: "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}" +$STD git clone https://github.com/strukturag/libheif.git "$SOURCE" +cd "$SOURCE" +$STD git reset --hard "$LIBHEIF_REVISION" +mkdir build +cd build +$STD cmake --preset=release-noplugins \ + -DWITH_DAV1D=ON \ + -DENABLE_PARALLEL_TILE_DECODING=ON \ + -DWITH_LIBSHARPYUV=ON \ + -DWITH_LIBDE265=ON \ + -DWITH_AOM_DECODER=OFF \ + -DWITH_AOM_ENCODER=OFF \ + -DWITH_X265=OFF \ + -DWITH_EXAMPLES=OFF \ + .. +$STD make install -j "$(nproc)" +ldconfig /usr/local/lib +$STD make clean +cd "$STAGING_DIR" +rm -rf "$SOURCE"/build + +SOURCE=${SOURCE_DIR}/libraw +: "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}" +$STD git clone https://github.com/libraw/libraw.git "$SOURCE" +cd "$SOURCE" +$STD git reset --hard "$LIBRAW_REVISION" +$STD autoreconf --install +$STD ./configure +$STD make -j"$(nproc)" +$STD make install +ldconfig /usr/local/lib +$STD make clean +cd "$STAGING_DIR" + +SOURCE=$SOURCE_DIR/imagemagick +: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/imagemagick.json)}" +$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE" +cd "$SOURCE" +$STD git reset --hard "$IMAGEMAGICK_REVISION" +$STD ./configure --with-modules +$STD make -j"$(nproc)" +$STD make install +ldconfig /usr/local/lib +$STD make clean +cd "$STAGING_DIR" + +SOURCE=$SOURCE_DIR/libvips +: "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}" +$STD git clone https://github.com/libvips/libvips.git "$SOURCE" +cd "$SOURCE" +$STD git reset --hard "$LIBVIPS_REVISION" +$STD meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled +cd build +$STD ninja install +ldconfig /usr/local/lib +cd "$STAGING_DIR" +rm -rf "$SOURCE"/build +{ + echo "imagemagick: $IMAGEMAGICK_REVISION" + echo "libheif: $LIBHEIF_REVISION" + echo "libjxl: $LIBJXL_REVISION" + echo "libraw: $LIBRAW_REVISION" + echo "libvips: $LIBVIPS_REVISION" +} >~/.immich_library_revisions +msg_ok "Custom Photo-processing Library Compiled" + +msg_info "Installing ${APPLICATION} (more patience please)" +tmp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/immich-app/immich/releases?per_page=1 | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/immich-app/immich/archive/refs/tags/v${RELEASE}.zip" -o "$tmp_file" +unzip -q "$tmp_file" +INSTALL_DIR="/opt/${APPLICATION}" +UPLOAD_DIR="${INSTALL_DIR}/upload" +SRC_DIR="${INSTALL_DIR}/source" +APP_DIR="${INSTALL_DIR}/app" +ML_DIR="${APP_DIR}/machine-learning" +GEO_DIR="${INSTALL_DIR}/geodata" +mkdir -p "$INSTALL_DIR" +mv "$APPLICATION-$RELEASE"/ "$SRC_DIR" +mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${ML_DIR}","${INSTALL_DIR}"/cache} + +cd "$SRC_DIR"/server +$STD npm install -g node-gyp node-pre-gyp +$STD npm ci +$STD npm run build +$STD npm prune --omit=dev --omit=optional +cd "$SRC_DIR"/open-api/typescript-sdk +$STD npm ci +$STD npm run build +cd "$SRC_DIR"/web +$STD npm ci +$STD npm run build +cd "$SRC_DIR" +cp -a server/{node_modules,dist,bin,resources,package.json,package-lock.json,start*.sh} "$APP_DIR"/ +cp -a web/build "$APP_DIR"/www +cp LICENSE "$APP_DIR" +msg_ok "Installed Immich Web Components" + +cd "$SRC_DIR"/machine-learning +$STD python3 -m venv "$ML_DIR/ml-venv" +if [[ -f ~/.openvino ]]; then + msg_info "Installing HW-accelerated machine-learning" + ( + source "$ML_DIR"/ml-venv/bin/activate + $STD pip3 install uv + uv -q sync --extra openvino --no-cache --active + ) + patchelf --clear-execstack "$ML_DIR"/ml-venv/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-311-x86_64-linux-gnu.so + msg_ok "Installed HW-accelerated machine-learning" +else + msg_info "Installing machine-learning" + ( + source "$ML_DIR"/ml-venv/bin/activate + $STD pip3 install uv + uv -q sync --extra cpu --no-cache --active + ) + msg_ok "Installed machine-learning" +fi +cd "$SRC_DIR" +cp -a machine-learning/{ann,immich_ml} "$ML_DIR" +if [[ -f ~/.openvino ]]; then + sed -i "/intra_op/s/int = 0/int = os.cpu_count() or 0/" "$ML_DIR"/immich_ml/config.py +fi +ln -sf "$APP_DIR"/resources "$INSTALL_DIR" + +cd "$APP_DIR" +grep -Rl /usr/src | xargs -n1 sed -i "s|\/usr/src|$INSTALL_DIR|g" +grep -RlE "'/build'" | xargs -n1 sed -i "s|'/build'|'$APP_DIR'|g" +sed -i "s@\"/cache\"@\"$INSTALL_DIR/cache\"@g" "$ML_DIR"/immich_ml/config.py +ln -s "$UPLOAD_DIR" "$APP_DIR"/upload +ln -s "$UPLOAD_DIR" "$ML_DIR"/upload + +msg_info "Installing Immich CLI" +$STD npm install --build-from-source sharp +rm -rf "$APP_DIR"/node_modules/@img/sharp-{libvips*,linuxmusl-x64} +$STD npm i -g @immich/cli +msg_ok "Installed Immich CLI" + +msg_info "Installing GeoNames data" +cd "$GEO_DIR" +URL_LIST=( + https://download.geonames.org/export/dump/admin1CodesASCII.txt + https://download.geonames.org/export/dump/admin2Codes.txt + https://download.geonames.org/export/dump/cities500.zip + https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson +) +echo "${URL_LIST[@]}" | xargs -n1 -P 8 wget -q +unzip -q cities500.zip +date --iso-8601=seconds | tr -d "\n" >geodata-date.txt +rm cities500.zip +cd "$INSTALL_DIR" +ln -s "$GEO_DIR" "$APP_DIR" +msg_ok "Installed GeoNames data" + +mkdir -p /var/log/immich +touch /var/log/immich/{web.log,ml.log} +echo "$RELEASE" >/opt/"${APPLICATION}"_version.txt +msg_ok "Installed ${APPLICATION}" + +msg_info "Creating user, env file, scripts & services" +$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich +if [[ -f ~/.openvino ]]; then + usermod -aG video,render immich +fi +cat <"${INSTALL_DIR}"/.env +TZ=$(cat /etc/timezone) +IMMICH_VERSION=release +NODE_ENV=production + +DB_HOSTNAME=127.0.0.1 +DB_USERNAME=${DB_USER} +DB_PASSWORD=${DB_PASS} +DB_DATABASE_NAME=${DB_NAME} +DB_VECTOR_EXTENSION=vectorchord + +REDIS_HOSTNAME=127.0.0.1 +IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003 +MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache + +IMMICH_MEDIA_LOCATION=${UPLOAD_DIR} +EOF +cat <"${ML_DIR}"/ml_start.sh +#!/usr/bin/env bash + +cd ${ML_DIR} +. ml-venv/bin/activate + +set -a +. ${INSTALL_DIR}/.env +set +a + +python -m immich_ml +EOF +chmod +x "$ML_DIR"/ml_start.sh +cat </etc/systemd/system/"${APPLICATION}"-web.service +[Unit] +Description=${APPLICATION} Web Service +After=network.target +Requires=redis-server.service +Requires=postgresql.service +Requires=immich-ml.service + +[Service] +Type=simple +User=immich +Group=immich +UMask=0077 +WorkingDirectory=${APP_DIR} +EnvironmentFile=${INSTALL_DIR}/.env +ExecStart=/usr/bin/node ${APP_DIR}/dist/main +Restart=on-failure +SyslogIdentifier=immich-web +StandardOutput=append:/var/log/immich/web.log +StandardError=append:/var/log/immich/web.log + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/"${APPLICATION}"-ml.service +[Unit] +Description=${APPLICATION} Machine-Learning +After=network.target + +[Service] +Type=simple +UMask=0077 +User=immich +Group=immich +WorkingDirectory=${APP_DIR} +EnvironmentFile=${INSTALL_DIR}/.env +ExecStart=${ML_DIR}/ml_start.sh +Restart=on-failure +SyslogIdentifier=immich-machine-learning +StandardOutput=append:/var/log/immich/ml.log +StandardError=append:/var/log/immich/ml.log + +[Install] +WantedBy=multi-user.target +EOF +chown -R immich:immich "$INSTALL_DIR" /var/log/immich +systemctl enable -q --now "$APPLICATION"-ml.service "$APPLICATION"-web.service +msg_ok "Created user, env file, scripts and services" + +sed -i "$ a VERSION_ID=12" /etc/os-release # otherwise the motd_ssh function will fail +motd_ssh +customize + +msg_info "Cleaning up" +rm -f "$tmp_file" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/influxdb-install.sh b/install/influxdb-install.sh index 8745d4bff..283de4893 100644 --- a/install/influxdb-install.sh +++ b/install/influxdb-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y lsb-base $STD apt-get install -y lsb-release -$STD apt-get install -y gnupg2 msg_ok "Installed Dependencies" msg_info "Setting up InfluxDB Repository" @@ -37,8 +36,8 @@ if [[ $INFLUX == "2" ]]; then $STD apt-get install -y influxdb2 else $STD apt-get install -y influxdb - curl -fsSL "https://dl.influxdata.com/chronograf/releases/chronograf_1.10.1_arm64.deb" -o $(basename "https://dl.influxdata.com/chronograf/releases/chronograf_1.10.1_arm64.deb") - $STD dpkg -i chronograf_1.10.1_arm64.deb + curl -fsSL "https://dl.influxdata.com/chronograf/releases/chronograf_1.10.7_arm64.deb" -o "/chronograf_1.10.7_arm64.deb" + $STD dpkg -i chronograf_1.10.7_arm64.deb fi $STD systemctl enable --now influxdb msg_ok "Installed InfluxDB" diff --git a/install/inspircd-install.sh b/install/inspircd-install.sh index e17996157..b72bdf788 100644 --- a/install/inspircd-install.sh +++ b/install/inspircd-install.sh @@ -18,7 +18,7 @@ update_os msg_info "Installing InspIRCd" RELEASE=$(curl -fsSL https://api.github.com/repos/inspircd/inspircd/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u2_amd64.deb" -o $(basename "https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u2_amd64.deb") +curl -fsSL "https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u2_amd64.deb" -o "inspircd_${RELEASE}.deb12u2_amd64.deb" $STD apt-get install "./inspircd_${RELEASE}.deb12u2_amd64.deb" -y &>/dev/null cat </etc/inspircd/inspircd.conf diff --git a/install/inventree-install.sh b/install/inventree-install.sh index 9c83d9363..1b2495aa6 100644 --- a/install/inventree-install.sh +++ b/install/inventree-install.sh @@ -14,7 +14,6 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gnupg temp_file=$(mktemp) curl -fsSL "http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb" -o "$temp_file" $STD dpkg -i $temp_file diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 4b4109e82..11674d6a0 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -15,19 +15,9 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing ioBroker (Patience)" $STD bash <(curl -fsSL https://iobroker.net/install.sh) diff --git a/install/iventoy-install.sh b/install/iventoy-install.sh index ebc30b2b9..94f93eea3 100644 --- a/install/iventoy-install.sh +++ b/install/iventoy-install.sh @@ -16,7 +16,7 @@ update_os RELEASE=$(curl -fsSL https://api.github.com/repos/ventoy/pxe/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing iVentoy v${RELEASE}" mkdir -p /opt/iventoy/{data,iso} -curl -fsSL "https://github.com/ventoy/PXE/releases/download/v${RELEASE}/iventoy-${RELEASE}-linux-free.tar.gz" -o $(basename "https://github.com/ventoy/PXE/releases/download/v${RELEASE}/iventoy-${RELEASE}-linux-free.tar.gz") +curl -fsSL "https://github.com/ventoy/PXE/releases/download/v${RELEASE}/iventoy-${RELEASE}-linux-free.tar.gz" -o "iventoy-${RELEASE}-linux-free.tar.gz" tar -C /tmp -xzf iventoy*.tar.gz mv /tmp/iventoy*/* /opt/iventoy/ rm -rf iventoy*.tar.gz diff --git a/install/jackett-install.sh b/install/jackett-install.sh index cb94a37ae..86e97642d 100644 --- a/install/jackett-install.sh +++ b/install/jackett-install.sh @@ -15,7 +15,8 @@ update_os msg_info "Installing Jackett" RELEASE=$(curl -fsSL https://github.com/Jackett/Jackett/releases/latest | grep "title>Release" | cut -d " " -f 4) -curl -fsSL "https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxARM64.tar.gz" -o $(basename "https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxARM64.tar.gz") +cd /opt +curl -fsSL "https://github.com/Jackett/Jackett/releases/download/$RELEASE/Jackett.Binaries.LinuxARM64.tar.gz" -o "Jackett.Binaries.LinuxARM64.tar.gz" tar -xzf Jackett.Binaries.LinuxARM64.tar.gz -C /opt rm -rf Jackett.Binaries.LinuxARM64.tar.gz echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/jellyfin-install.sh b/install/jellyfin-install.sh index 73474d461..b0f58bcd0 100644 --- a/install/jellyfin-install.sh +++ b/install/jellyfin-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,vainfo} if [[ "$CTTYPE" == "0" ]]; then diff --git a/install/karakeep-install.sh b/install/karakeep-install.sh index 2c627ee6c..fa0d6e4de 100644 --- a/install/karakeep-install.sh +++ b/install/karakeep-install.sh @@ -18,7 +18,6 @@ $STD apt-get install -y \ g++ \ build-essential \ git \ - gnupg \ ca-certificates \ chromium/stable \ chromium-common/stable \ @@ -49,20 +48,14 @@ sed -i \ /etc/meilisearch.toml msg_ok "Installed Meilisearch" -msg_info "Installing Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules $STD npm install -g corepack@0.31.0 -msg_ok "Installed Node.js" msg_info "Installing karakeep" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" -unzip -q "v${RELEASE}.zip" +$STD unzip "v${RELEASE}.zip" mv karakeep-"${RELEASE}" /opt/karakeep cd /opt/karakeep corepack enable @@ -98,10 +91,26 @@ BROWSER_WEB_URL="http://127.0.0.1:9222" # If you're planning to use ollama for tagging, uncomment the following lines: # OLLAMA_BASE_URL="" +# OLLAMA_KEEP_ALIVE="5m" # You can change the models used by uncommenting the following lines, and changing them according to your needs: # INFERENCE_TEXT_MODEL="gpt-4o-mini" # INFERENCE_IMAGE_MODEL="gpt-4o-mini" + +# Additional inference defaults +# INFERENCE_CONTEXT_LENGTH="2048" +# INFERENCE_ENABLE_AUTO_TAGGING=true +# INFERENCE_ENABLE_AUTO_SUMMARIZATION=false + +# Crawler defaults +# CRAWLER_NUM_WORKERS="1" +# CRAWLER_DOWNLOAD_BANNER_IMAGE=true +# CRAWLER_STORE_SCREENSHOT=true +# CRAWLER_FULL_PAGE_SCREENSHOT=false +# CRAWLER_FULL_PAGE_ARCHIVE=false +# CRAWLER_VIDEO_DOWNLOAD=false +# CRAWLER_VIDEO_DOWNLOAD_MAX_SIZE="50" +# CRAWLER_ENABLE_ADBLOCKER=true EOF echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed karakeep" diff --git a/install/kasm-install.sh b/install/kasm-install.sh index edf88bf47..b1d7913aa 100644 --- a/install/kasm-install.sh +++ b/install/kasm-install.sh @@ -16,10 +16,9 @@ update_os msg_info "Installing Kasm Workspaces" KASM_VERSION=$(curl -fsSL 'https://www.kasmweb.com/downloads' | grep -o 'https://kasm-static-content.s3.amazonaws.com/kasm_release_[^"]*\.tar\.gz' | head -n 1 | sed -E 's/.*release_(.*)\.tar\.gz/\1/') curl -fsSL -o "/opt/kasm_release_${KASM_VERSION}.tar.gz" "https://kasm-static-content.s3.amazonaws.com/kasm_release_${KASM_VERSION}.tar.gz" -cd /opt -tar -xf "kasm_release_${KASM_VERSION}.tar.gz" -chmod +x /opt/kasm_release/install.sh -printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh | tee ~/kasm-install.output +tar -xf "/opt/kasm_release_${KASM_VERSION}.tar.gz" -C /opt +printf 'y\ny\ny\n4\n' | bash /opt/kasm_release/install.sh +touch ~/kasm-install.output sed -n '/Kasm UI Login Credentials/,$p' ~/kasm-install.output >~/kasm.creds msg_ok "Installed Kasm Workspaces" @@ -27,7 +26,7 @@ motd_ssh customize msg_info "Cleaning up" -$STD rm -f /opt/kasm_release_${KASM_VERSION}.tar.gz +$STD rm -f "/opt/kasm_release_${KASM_VERSION}.tar.gz" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index e33e458d4..d37e69d9c 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - msg_info "Installing OpenJDK" curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg echo 'deb [arch=arm64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list diff --git a/install/kimai-install.sh b/install/kimai-install.sh index a65789f36..1df625cba 100644 --- a/install/kimai-install.sh +++ b/install/kimai-install.sh @@ -20,10 +20,11 @@ $STD apt-get install -y \ git \ expect \ composer \ - mariadb-server \ lsb-release msg_ok "Installed Dependencies" +install_mysql + 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 @@ -43,10 +44,10 @@ msg_info "Setting up database" DB_NAME=kimai_db DB_USER=kimai DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -MYSQL_VERSION=$(mysql --version | grep -oP 'Distrib \K[0-9]+\.[0-9]+\.[0-9]+') -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;" +MYSQL_VERSION=$(mysql --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') +$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 ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" { echo "Kimai-Credentials" echo "Kimai Database User: $DB_USER" @@ -57,8 +58,8 @@ msg_ok "Set up database" msg_info "Installing Kimai (Patience)" RELEASE=$(curl -fsSL https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip") -unzip -q "${RELEASE}".zip +curl -fsSL "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}".zip +$STD unzip "${RELEASE}".zip mv kimai-"${RELEASE}" /opt/kimai cd /opt/kimai echo "export COMPOSER_ALLOW_SUPERUSER=1" >>~/.bashrc diff --git a/install/koillection-install.sh b/install/koillection-install.sh index 6ca2f0cc2..177dca51d 100644 --- a/install/koillection-install.sh +++ b/install/koillection-install.sh @@ -15,11 +15,13 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 postgresql \ apache2 \ lsb-release msg_ok "Installed Dependencies" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules +PG_VERSION="16" install_postgresql + msg_info "Setup PHP8.4 Repository" $STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb $STD dpkg -i /tmp/debsuryorg-archive-keyring.deb @@ -49,21 +51,11 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP } >>~/koillection.creds msg_ok "Set up PostgreSQL" -msg_info "Setting up Node.js/Yarn" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g npm@latest -$STD npm install -g yarn -msg_ok "Installed Node.js/Yarn" - msg_info "Installing Koillection" RELEASE=$(curl -fsSL https://api.github.com/repos/benjaminjonard/koillection/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') cd /opt -curl -fsSL "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip") -unzip -q "${RELEASE}.zip" +curl -fsSL "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip" -o "/opt/${RELEASE}.zip" +$STD unzip "${RELEASE}.zip" mv "/opt/koillection-${RELEASE}" /opt/koillection cd /opt/koillection cp /opt/koillection/.env /opt/koillection/.env.local diff --git a/install/komga-install.sh b/install/komga-install.sh index 4236c9cc6..595a24f7e 100644 --- a/install/komga-install.sh +++ b/install/komga-install.sh @@ -19,7 +19,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Komga" RELEASE=$(curl -fsSL https://api.github.com/repos/gotson/komga/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar" -o $(basename "https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar") +curl -fsSL "https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar" -o "komga-${RELEASE}.jar" mkdir -p /opt/komga mv -f komga-${RELEASE}.jar /opt/komga/komga.jar echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" diff --git a/install/komodo-install.sh b/install/komodo-install.sh index f6fef282a..99771b97f 100644 --- a/install/komodo-install.sh +++ b/install/komodo-install.sh @@ -61,7 +61,7 @@ case $DB_CHOICE in esac mkdir -p /opt/komodo cd /opt/komodo -curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/$DB_COMPOSE_FILE" -o $(basename "https://raw.githubusercontent.com/moghtech/komodo/main/compose/$DB_COMPOSE_FILE") +curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/$DB_COMPOSE_FILE" -o "/opt/komodo/$DB_COMPOSE_FILE" msg_info "Setup Komodo Environment" curl -fsSL "https://raw.githubusercontent.com/moghtech/komodo/main/compose/compose.env" -o "/opt/komodo/compose.env" diff --git a/install/kubo-install.sh b/install/kubo-install.sh index db795cb77..4ae4ee431 100644 --- a/install/kubo-install.sh +++ b/install/kubo-install.sh @@ -14,12 +14,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -$STD apt-get install -y wget -$STD apt-get install -y openssh-server -msg_ok "Installed Dependencies" - msg_info "Installing IPFS" RELEASE=$(curl -fsSL https://github.com/ipfs/kubo/releases/latest | grep "title>Release" | cut -d " " -f 4) $STD curl -fsSL "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-arm64.tar.gz" -o "kubo_${RELEASE}_linux-arm64.tar.gz" diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 4a2501428..42821232f 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -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? " 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 </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" diff --git a/install/listmonk-install.sh b/install/listmonk-install.sh index 380922165..ee8c16f97 100644 --- a/install/listmonk-install.sh +++ b/install/listmonk-install.sh @@ -36,7 +36,7 @@ cd /opt mkdir /opt/listmonk mkdir /opt/listmonk/uploads RELEASE=$(curl -fsSL https://api.github.com/repos/knadh/listmonk/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_arm64.tar.gz" -o $(basename "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_arm64.tar.gz") +curl -fsSL "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_arm64.tar.gz" -o "listmonk_${RELEASE}_linux_arm64.tar.gz" tar -xzf "listmonk_${RELEASE}_linux_arm64.tar.gz" -C /opt/listmonk $STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml diff --git a/install/lldap-install.sh b/install/lldap-install.sh index 3aea0e7ba..1774ec607 100644 --- a/install/lldap-install.sh +++ b/install/lldap-install.sh @@ -14,12 +14,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -$STD apt-get install -y wget -$STD apt-get install -y openssh-server -msg_ok "Installed Dependencies" - msg_info "Installing lldap" source /etc/os-release os=$ID diff --git a/install/lubelogger-install.sh b/install/lubelogger-install.sh index 66701f97f..515212f12 100644 --- a/install/lubelogger-install.sh +++ b/install/lubelogger-install.sh @@ -25,8 +25,8 @@ mkdir -p /opt/lubelogger RELEASE=$(curl -fsSL https://api.github.com/repos/hargata/lubelog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE_TRIMMED=$(echo "${RELEASE}" | tr -d ".") cd /opt/lubelogger -curl -fsSL "https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip" -o $(basename "https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip") -unzip -q LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip +curl -fsSL "https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip" -o "LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip" +$STD unzip LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip chmod 700 /opt/lubelogger/CarCareTracker cp /opt/lubelogger/appsettings.json /opt/lubelogger/appsettings_bak.json jq '.Kestrel = {"Endpoints": {"Http": {"Url": "http://0.0.0.0:5000"}}}' /opt/lubelogger/appsettings_bak.json >/opt/lubelogger/appsettings.json diff --git a/install/lyrionmusicserver-install.sh b/install/lyrionmusicserver-install.sh new file mode 100644 index 000000000..9061c4ddd --- /dev/null +++ b/install/lyrionmusicserver-install.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Omar Minaya +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://lyrion.org/getting-started/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Setup Lyrion Music Server" +DEB_URL=$(curl -fsSL 'https://lyrion.org/getting-started/' | grep -oP ']*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1) +RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)') +DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb" +curl -fsSL -o "$DEB_FILE" "$DEB_URL" +$STD apt install "$DEB_FILE" -y +echo "${RELEASE}" >"/opt/lyrion_version.txt" +msg_ok "Setup Lyrion Music Server v${RELEASE}" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD rm -f "$DEB_FILE" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/mafl-install.sh b/install/mafl-install.sh index 6fed9ac39..f219d5d42 100644 --- a/install/mafl-install.sh +++ b/install/mafl-install.sh @@ -18,25 +18,13 @@ $STD apt-get install -y make $STD apt-get install -y g++ $STD apt-get install -y gcc $STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g npm@latest -$STD npm install -g yarn -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules RELEASE=$(curl -fsSL https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Mafl v${RELEASE}" -curl -fsSL "https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz" -o $(basename "https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz") +curl -fsSL "https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz" -o "v${RELEASE}.tar.gz" tar -xzf v${RELEASE}.tar.gz mkdir -p /opt/mafl/data curl -fsSL "https://raw.githubusercontent.com/hywax/mafl/main/.example/config.yml" -o "/opt/mafl/data/config.yml" diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 59d582352..f58109361 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -13,20 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Setup MagicMirror" temp_file=$(mktemp) diff --git a/install/managemydamnlife-install.sh b/install/managemydamnlife-install.sh new file mode 100644 index 000000000..41f9f48f3 --- /dev/null +++ b/install/managemydamnlife-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: vhsdream +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/intri-in/manage-my-damn-life-nextjs + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +NODE_VERSION="20" install_node_and_modules +MYSQL_VERSION="8.0" install_mysql + +msg_info "Setting up Database" +DB_NAME="mmdl" +DB_USER="mmdl" +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 by '$DB_PASS';" +$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "Manage My Damn Life Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >>~/mmdl.creds +msg_ok "Set up Database" + +msg_info "Installing ${APPLICATION}" +RELEASE=$(curl -fsSL https://api.github.com/repos/intri-in/manage-my-damn-life-nextjs/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSLO "https://github.com/intri-in/manage-my-damn-life-nextjs/archive/refs/tags/v${RELEASE}.zip" +unzip -q v"$RELEASE".zip +mv manage-my-damn-life-nextjs-"$RELEASE"/ /opt/mmdl +cp /opt/mmdl/sample.env.local /opt/mmdl/.env + +sed -i -e 's|db|localhost|' \ + -e "s|myuser|${DB_USER}|" \ + -e "s|mypassword|${DB_PASS}|" \ + -e 's|5433|3306|' \ + -e 's|DB_DIALECT=postgres|DB_DIALECT=mysql|' \ + -e "s|sample_install_mmdm|${DB_NAME}|" \ + -e "s|=PASSWORD|=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9' | head -c40)|" \ + /opt/mmdl/.env + +cd /opt/mmdl +export NEXT_TELEMETRY_DISABLE=1 +export CI="true" +$STD npm install +$STD npm run migrate +$STD npm run build +echo "${RELEASE}" >/opt/mmdl_version.txt +msg_ok "Installed ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/mmdl.service +[Unit] +Description=${APPLICATION} Service +After=network.target mysql.service + +[Service] +WorkingDirectory=/opt/mmdl +EnvironmentFile=/opt/mmdl/.env +ExecStart=/usr/bin/npm run start +Restart=on-abnormal + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now mmdl +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f ~/v${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/mariadb-install.sh b/install/mariadb-install.sh index 352599605..37c04778a 100644 --- a/install/mariadb-install.sh +++ b/install/mariadb-install.sh @@ -13,15 +13,12 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" +install_mariadb -msg_info "Installing MariaDB" -$STD apt-get install -y mariadb-server +msg_info "Setup MariaDB" 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 "Installed MariaDB" +msg_ok "Setup MariaDB" read -r -p "${TAB3}Would you like to add PhpMyAdmin? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then @@ -36,9 +33,9 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then php-json \ php-curl - curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz" -o $(basename "https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz") + curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.tar.gz" -o "phpMyAdmin-5.2.2-all-languages.tar.gz" mkdir -p /var/www/html/phpMyAdmin - tar xf phpMyAdmin-5.2.1-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin + tar xf phpMyAdmin-5.2.2-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php SECRET=$(openssl rand -base64 24) sed -i "s#\$cfg\['blowfish_secret'\] = '';#\$cfg['blowfish_secret'] = '${SECRET}';#" /var/www/html/phpMyAdmin/config.inc.php diff --git a/install/mattermost-install.sh b/install/mattermost-install.sh index 6bf04627a..0a2481055 100644 --- a/install/mattermost-install.sh +++ b/install/mattermost-install.sh @@ -13,11 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - gpg \ - postgresql -msg_ok "Installed Dependencies" +PG_VERSION="16" install_postgresql msg_info "Setting up PostgreSQL" DB_NAME=mattermost diff --git a/install/mediamtx-install.sh b/install/mediamtx-install.sh index 0febbf35b..477c2540e 100644 --- a/install/mediamtx-install.sh +++ b/install/mediamtx-install.sh @@ -21,7 +21,7 @@ msg_info "Installing MediaMTX" RELEASE=$(curl -fsSL https://api.github.com/repos/bluenviron/mediamtx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') mkdir -p /opt/mediamtx cd /opt/mediamtx -curl -fsSL "https://github.com/bluenviron/mediamtx/releases/download/${RELEASE}/mediamtx_${RELEASE}_linux_arm64v8.tar.gz" -o $(basename "https://github.com/bluenviron/mediamtx/releases/download/${RELEASE}/mediamtx_${RELEASE}_linux_arm64v8.tar.gz") +curl -fsSL "https://github.com/bluenviron/mediamtx/releases/download/${RELEASE}/mediamtx_${RELEASE}_linux_arm64v8.tar.gz" -o "mediamtx_${RELEASE}_linux_arm64v8.tar.gz" tar xzf mediamtx_${RELEASE}_linux_arm64v8.tar.gz rm -rf mediamtx_${RELEASE}_linux_arm64v8.tar.gz msg_ok "Installed MediaMTX" diff --git a/install/medusa-install.sh b/install/medusa-install.sh index 8caac35ff..b2883a0a7 100644 --- a/install/medusa-install.sh +++ b/install/medusa-install.sh @@ -15,9 +15,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gpg -$STD apt-get install -y git-core -$STD apt-get install -y mediainfo +$STD apt-get install -y \ + git-core \ + mediainfo + cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware EOF diff --git a/install/meilisearch-install.sh b/install/meilisearch-install.sh index a25a20360..ff76d4f27 100644 --- a/install/meilisearch-install.sh +++ b/install/meilisearch-install.sh @@ -13,11 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - gnupg -msg_ok "Installed Dependencies" - msg_info "Setup ${APPLICATION}" tmp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') @@ -40,17 +35,7 @@ msg_ok "Setup ${APPLICATION}" read -r -p "${TAB3}Do you want add meilisearch-ui? [y/n]: " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - msg_info "Setting up Node.js Repository" - mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list - msg_ok "Set up Node.js Repository" - - msg_info "Installing Node.js" - $STD apt-get update - $STD apt-get install -y nodejs - $STD npm install -g pnpm - msg_ok "Installed Node.js" + NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules msg_info "Setup ${APPLICATION}-ui" tmp_file=$(mktemp) @@ -58,7 +43,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then mkdir -p /opt/meilisearch-ui RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o "$tmp_file" - unzip -q "$tmp_file" -d "$tmp_dir" + $STD unzip "$tmp_file" -d "$tmp_dir" mv "$tmp_dir"/*/* /opt/meilisearch-ui/ cd /opt/meilisearch-ui sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts diff --git a/install/memos-install.sh b/install/memos-install.sh index 84a7b43ef..b26ed4ea2 100644 --- a/install/memos-install.sh +++ b/install/memos-install.sh @@ -21,31 +21,8 @@ $STD apt-get install -y \ tzdata msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing pnpm" -$STD npm install -g pnpm -msg_ok "Installed pnpm" - -msg_info "Installing Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-arm64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -rm -f "$temp_file" -set -o pipefail -msg_ok "Installed Golang" +NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules +install_go msg_info "Installing Memos (Patience)" mkdir -p /opt/memos_data diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 227a0b8e6..8595006f0 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -15,19 +15,9 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing MeshCentral" mkdir /opt/meshcentral diff --git a/install/metube-install.sh b/install/metube-install.sh index c33a34abc..32eff7af8 100644 --- a/install/metube-install.sh +++ b/install/metube-install.sh @@ -25,7 +25,6 @@ $STD apt-get install -y --no-install-recommends \ ffmpeg \ git \ make \ - gnupg \ ca-certificates msg_ok "Installed Dependencies" @@ -38,16 +37,7 @@ $STD apt-get install -y \ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing MeTube" $STD git clone https://github.com/alexta69/metube /opt/metube diff --git a/install/minarca-install.sh b/install/minarca-install.sh new file mode 100644 index 000000000..2faf101b0 --- /dev/null +++ b/install/minarca-install.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: SlaviΕ‘a AreΕΎina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://minarca.org/en_CA + +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 \ + apt-transport-https \ + ca-certificates \ + lsb-release +msg_ok "Installed Dependencies" + +msg_info "Installing Minarca" +curl -fsSL https://www.ikus-soft.com/archive/minarca/public.key | gpg --dearmor >/usr/share/keyrings/minarca-keyring.gpg +echo "deb [arch=amd64 signed-by=/usr/share/keyrings/minarca-keyring.gpg] https://nexus.ikus-soft.com/repository/apt-release-$(lsb_release -sc)/ $(lsb_release -sc) main" >/etc/apt/sources.list.d/minarca.list +$STD apt-get update +$STD apt-get install -y minarca-server +msg_ok "Installed Minarca" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/minio-install.sh b/install/minio-install.sh index 5a5cd2317..c94af1227 100644 --- a/install/minio-install.sh +++ b/install/minio-install.sh @@ -15,8 +15,7 @@ update_os msg_info "Setup MinIO" RELEASE=$(curl -fsSL https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}') -curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o $(basename "https://dl.min.io/server/minio/release/linux-amd64/minio") -mv minio /usr/local/bin/ +curl -fsSL "https://dl.min.io/server/minio/release/linux-amd64/minio" -o /usr/local/bin/minio chmod +x /usr/local/bin/minio useradd -r minio-user -s /sbin/nologin mkdir -p /home/minio-user @@ -30,10 +29,10 @@ MINIO_ROOT_USER=${MINIO_ADMIN_USER} MINIO_ROOT_PASSWORD=${MINIO_ADMIN_PASSWORD} EOF { - echo "" - echo "MinIO-Credentials" - echo "MinIO Admin User: $MINIO_ADMIN_USER" - echo "MinIO Admin Password: $MINIO_ADMIN_PASSWORD" + echo "" + echo "MinIO-Credentials" + echo "MinIO Admin User: $MINIO_ADMIN_USER" + echo "MinIO Admin Password: $MINIO_ADMIN_PASSWORD" } >>~/minio.creds echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Setup MinIO" diff --git a/install/mongodb-install.sh b/install/mongodb-install.sh index a16f8dc56..529566112 100644 --- a/install/mongodb-install.sh +++ b/install/mongodb-install.sh @@ -20,10 +20,6 @@ if ! echo "$cpu_info" | grep -q 'asimdrdm\|asimdhf\|dotprod\|fp16'; then exit fi -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - read -p "${TAB3}Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8 if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then MONGODB_VERSION="8.0" diff --git a/install/monica-install.sh b/install/monica-install.sh index 66de5dc76..823150342 100644 --- a/install/monica-install.sh +++ b/install/monica-install.sh @@ -15,51 +15,43 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 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 + 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="20" NODE_MODULE="yarn@latest" install_node_and_modules + msg_info "Setting up MariaDB" DB_NAME=monica DB_USER=monica 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;" +$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 "monica-Credentials" - echo "monica Database User: $DB_USER" - echo "monica Database Password: $DB_PASS" - echo "monica Database Name: $DB_NAME" + echo "monica-Credentials" + echo "monica Database User: $DB_USER" + echo "monica Database Password: $DB_PASS" + echo "monica Database Name: $DB_NAME" } >>~/monica.creds msg_ok "Set up MariaDB" -msg_info "Setting up Node.js/Yarn" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g npm@latest -$STD npm install -g yarn -msg_ok "Installed Node.js/Yarn" - msg_info "Installing monica" RELEASE=$(curl -fsSL https://api.github.com/repos/monicahq/monica/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://github.com/monicahq/monica/releases/download/v${RELEASE}/monica-v${RELEASE}.tar.bz2" -o $(basename "https://github.com/monicahq/monica/releases/download/v${RELEASE}/monica-v${RELEASE}.tar.bz2") +curl -fsSL "https://github.com/monicahq/monica/releases/download/v${RELEASE}/monica-v${RELEASE}.tar.bz2" -o "monica-v${RELEASE}.tar.bz2" tar -xjf "monica-v${RELEASE}.tar.bz2" mv "/opt/monica-v${RELEASE}" /opt/monica cd /opt/monica cp /opt/monica/.env.example /opt/monica/.env HASH_SALT=$(openssl rand -base64 32) sed -i -e "s|^DB_USERNAME=.*|DB_USERNAME=${DB_USER}|" \ - -e "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASS}|" \ - -e "s|^HASH_SALT=.*|HASH_SALT=${HASH_SALT}|" \ - /opt/monica/.env + -e "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASS}|" \ + -e "s|^HASH_SALT=.*|HASH_SALT=${HASH_SALT}|" \ + /opt/monica/.env $STD composer install --no-dev -o --no-interaction $STD yarn install $STD yarn run production diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index f02b103b0..7d1360cd0 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Installing Mosquitto MQTT Broker" source /etc/os-release curl -fsSL http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/usr/share/keyrings/mosquitto-repo.gpg.key diff --git a/install/myspeed-install.sh b/install/myspeed-install.sh index 29953bdc5..40d1e600d 100644 --- a/install/myspeed-install.sh +++ b/install/myspeed-install.sh @@ -16,26 +16,16 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ build-essential \ - gpg \ ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing MySpeed" RELEASE=$(curl -fsSL https://github.com/gnmyt/myspeed/releases/latest | grep "title>Release" | cut -d " " -f 5) cd /opt -curl -fsSL "https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip" -o $(basename "https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip") -unzip -q MySpeed-$RELEASE.zip -d myspeed +curl -fsSL "https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip" -o "MySpeed-$RELEASE.zip" +$STD unzip MySpeed-$RELEASE.zip -d myspeed cd myspeed $STD npm install echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/mysql-install.sh b/install/mysql-install.sh index 2d4fc5e2e..0f4723a39 100644 --- a/install/mysql-install.sh +++ b/install/mysql-install.sh @@ -16,8 +16,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - lsb-release \ - gnupg + lsb-release msg_ok "Installed Dependencies" RELEASE_REPO="mysql-8.0" @@ -63,9 +62,9 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then php-json \ php-curl - curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz" -o $(basename "https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz") + curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/5.2.2/phpMyAdmin-5.2.2-all-languages.tar.gz" -o "phpMyAdmin-5.2.2-all-languages.tar.gz" mkdir -p /var/www/html/phpMyAdmin - tar xf phpMyAdmin-5.2.1-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin + tar xf phpMyAdmin-5.2.2-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpMyAdmin cp /var/www/html/phpMyAdmin/config.sample.inc.php /var/www/html/phpMyAdmin/config.inc.php SECRET=$(openssl rand -base64 24) sed -i "s#\$cfg\['blowfish_secret'\] = '';#\$cfg['blowfish_secret'] = '${SECRET}';#" /var/www/html/phpMyAdmin/config.inc.php diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 08a86bb86..0417d5fb5 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -15,20 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing n8n (Patience)" $STD npm install --global patch-package diff --git a/install/neo4j-install.sh b/install/neo4j-install.sh index 79aab302d..9d641fd34 100644 --- a/install/neo4j-install.sh +++ b/install/neo4j-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 \ lsb-release msg_ok "Installed Dependencies" diff --git a/install/netbox-install.sh b/install/netbox-install.sh index 165410f12..6a3499c4c 100644 --- a/install/netbox-install.sh +++ b/install/netbox-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ apache2 \ redis-server \ - postgresql \ build-essential \ libxml2-dev \ libxslt1-dev \ @@ -27,6 +26,8 @@ $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 \ @@ -52,8 +53,8 @@ msg_ok "Set up PostgreSQL" msg_info "Installing NetBox (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/netbox-community/netbox/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip") -unzip -q "v${RELEASE}.zip" +curl -fsSL "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip "v${RELEASE}.zip" mv /opt/netbox-"${RELEASE}"/ /opt/netbox $STD adduser --system --group netbox diff --git a/install/nextpvr-install.sh b/install/nextpvr-install.sh index 3754dfb8b..be0b2ae69 100644 --- a/install/nextpvr-install.sh +++ b/install/nextpvr-install.sh @@ -29,7 +29,7 @@ msg_ok "Installed Dependencies" msg_info "Setup NextPVR (Patience)" cd /opt -curl -fsSL "https://nextpvr.com/nextpvr-helper.deb" -o $(basename "https://nextpvr.com/nextpvr-helper.deb") +curl -fsSL "https://nextpvr.com/nextpvr-helper.deb" -o "/opt/nextpvr-helper.deb" $STD dpkg -i nextpvr-helper.deb msg_ok "Installed NextPVR" diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index d2d2877f4..92b359200 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get update $STD apt-get -y install \ - gnupg \ ca-certificates \ apache2-utils \ logrotate \ diff --git a/install/node-red-install.sh b/install/node-red-install.sh index afe202880..335d26bfd 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -16,20 +16,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ git \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing Node-Red" $STD npm install -g --unsafe-perm node-red diff --git a/install/nodebb-install.sh b/install/nodebb-install.sh index 823cc9331..d4f1093ae 100644 --- a/install/nodebb-install.sh +++ b/install/nodebb-install.sh @@ -15,32 +15,14 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ - build-essential \ - redis-server \ - expect \ - gnupg \ - ca-certificates + build-essential \ + redis-server \ + expect \ + ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js & MongoDB Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list - -curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | gpg --dearmor -o /etc/apt/keyrings/mongodb-server-8.0.gpg -echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/mongodb-server-8.0.gpg] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" >/etc/apt/sources.list.d/mongodb-org-8.0.list -$STD apt-get update -msg_ok "Set up Repositories" - -msg_info "Installing Node.js" -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing MongoDB" -$STD apt-get install -y mongodb-org -systemctl enable -q --now mongod -sleep 10 # MongoDB needs some secounds to start, if not sleep it collide with following mongosh -msg_ok "Installed MongoDB" +install_mongodb +NODE_VERSION="22" install_node_and_modules msg_info "Configure MongoDB" MONGO_ADMIN_USER="admin" @@ -50,12 +32,12 @@ NODEBB_PWD="$(openssl rand -base64 18 | cut -c1-13)" MONGO_CONNECTION_STRING="mongodb://${NODEBB_USER}:${NODEBB_PWD}@localhost:27017/nodebb" NODEBB_SECRET=$(uuidgen) { - echo "NodeBB-Credentials" - echo "Mongo Database User: $MONGO_ADMIN_USER" - echo "Mongo Database Password: $MONGO_ADMIN_PWD" - echo "NodeBB User: $NODEBB_USER" - echo "NodeBB Password: $NODEBB_PWD" - echo "NodeBB Secret: $NODEBB_SECRET" + echo "NodeBB-Credentials" + echo "Mongo Database User: $MONGO_ADMIN_USER" + echo "Mongo Database Password: $MONGO_ADMIN_PWD" + echo "NodeBB User: $NODEBB_USER" + echo "NodeBB Password: $NODEBB_PWD" + echo "NodeBB Secret: $NODEBB_SECRET" } >>~/nodebb.creds $STD mongosh </etc/apt/sources.list.d/non-free.list diff --git a/install/oauth2-proxy-install.sh b/install/oauth2-proxy-install.sh new file mode 100644 index 000000000..3ed3fecea --- /dev/null +++ b/install/oauth2-proxy-install.sh @@ -0,0 +1,58 @@ +#!/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: https://github.com/oauth2-proxy/oauth2-proxy/ + +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 \ + jq +msg_ok "Installed Dependencies" + +msg_info "Setup OAuth2-Proxy" +RELEASE=$(curl -fsSL https://api.github.com/repos/oauth2-proxy/oauth2-proxy/releases/latest | jq -r .tag_name | sed 's/^v//') +mkdir -p /opt/oauth2-proxy +curl -fsSL "https://github.com/oauth2-proxy/oauth2-proxy/releases/download/v${RELEASE}/oauth2-proxy-v${RELEASE}.linux-amd64.tar.gz" -o /opt/oauth2-proxy.tar.gz +tar -xzf /opt/oauth2-proxy.tar.gz -C /opt +mv /opt/oauth2-proxy-v${RELEASE}.linux-amd64/oauth2-proxy /opt/oauth2-proxy +touch /opt/oauth2-proxy/config.toml +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup OAuth2-Proxy" + +msg_info "Creating Service" +cat </etc/systemd/system/oauth2-proxy.service +[Unit] +Description=OAuth2-Proxy Service +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/oauth2-proxy +ExecStart=/opt/oauth2-proxy/oauth2-proxy --config config.toml +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now oauth2-proxy +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f "/opt/oauth2-proxy.tar.gz" +rm -rf "/opt/oauth2-proxy-v${RELEASE}.linux-amd64" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/omada-install.sh b/install/omada-install.sh index e299aa28e..90e484b7a 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -14,16 +14,16 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gnupg jsvc +$STD apt-get install -y jsvc msg_ok "Installed Dependencies" msg_info "Checking CPU Features" if lscpu | grep -q 'avx'; then - MONGODB_VERSION="7.0" - msg_ok "AVX detected: Using MongoDB 7.0" + MONGODB_VERSION="7.0" + msg_ok "AVX detected: Using MongoDB 7.0" else - msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/" - exit 0 + msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/" + exit 0 fi msg_info "Installing Azul Zulu Java" @@ -36,10 +36,10 @@ msg_ok "Installed Azul Zulu Java" msg_info "Installing libssl (if needed)" if ! dpkg -l | grep -q 'libssl1.1'; then - curl -fsSL "http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb" -o "/tmp/libssl.deb" - $STD dpkg -i /tmp/libssl.deb - rm -f /tmp/libssl.deb - msg_ok "Installed libssl1.1" + curl -fsSL "http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.24_arm64.deb" -o "/tmp/libssl.deb" + $STD dpkg -i /tmp/libssl.deb + rm -f /tmp/libssl.deb + msg_ok "Installed libssl1.1" fi msg_info "Installing MongoDB $MONGODB_VERSION" @@ -51,8 +51,8 @@ msg_ok "Installed MongoDB $MONGODB_VERSION" msg_info "Installing Omada Controller" OMADA_URL=$(curl -fsSL "https://support.omadanetworks.com/en/download/software/omada-controller/" | - grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | - head -n1) + grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | + head -n1) OMADA_PKG=$(basename "$OMADA_URL") curl -fsSL "$OMADA_URL" -o "$OMADA_PKG" $STD dpkg -i "$OMADA_PKG" diff --git a/install/ombi-install.sh b/install/ombi-install.sh index 50d16fd35..58c47a73b 100644 --- a/install/ombi-install.sh +++ b/install/ombi-install.sh @@ -15,7 +15,7 @@ update_os msg_info "Installing Ombi" RELEASE=$(curl -fsSL https://api.github.com/repos/Ombi-app/Ombi/releases/latest | grep '"tag_name":' | cut -d'"' -f4) -curl -fsSL "https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-arm64.tar.gz" -o $(basename "https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-arm64.tar.gz") +curl -fsSL "https://github.com/Ombi-app/Ombi/releases/download/${RELEASE}/linux-arm64.tar.gz" -o "linux-arm64.tar.gz" echo "${RELEASE}" >/opt/${APPLICATION}_version.txt mkdir -p /opt/ombi tar -xzf linux-arm64.tar.gz -C /opt/ombi diff --git a/install/omv-install.sh b/install/omv-install.sh index 4cb7e8da8..c5c5030c0 100644 --- a/install/omv-install.sh +++ b/install/omv-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Installing OpenMediaVault (Patience)" curl -fsSL "https://packages.openmediavault.org/public/archive.key" | gpg --dearmor >"/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.gpg" cat </etc/apt/sources.list.d/openmediavault.list diff --git a/install/onedev-install.sh b/install/onedev-install.sh index e788f4f14..42c544fb9 100644 --- a/install/onedev-install.sh +++ b/install/onedev-install.sh @@ -15,14 +15,14 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - default-jdk \ - git \ - git-lfs + default-jdk \ + git \ + git-lfs msg_ok "Installed Dependencies" msg_info "Installing OneDev" cd /opt -curl -fsSL "https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz" -o $(basename "https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz") +curl -fsSL "https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz" -o "/opt/onedev-latest.tar.gz" tar -xzf onedev-latest.tar.gz mv /opt/onedev-latest /opt/onedev $STD /opt/onedev/bin/server.sh install diff --git a/install/opengist-install.sh b/install/opengist-install.sh index 0f6014b77..0da1a79d1 100644 --- a/install/opengist-install.sh +++ b/install/opengist-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Install Opengist" RELEASE=$(curl -fsSL https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" -curl -fsSL "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-arm64.tar.gz" -o $(basename "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-arm64.tar.gz") +curl -fsSL "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-arm64.tar.gz" -o "opengist${RELEASE}-linux-arm64.tar.gz" $STD tar -xzf opengist${RELEASE}-linux-arm64.tar.gz mv opengist /opt/opengist chmod +x /opt/opengist/opengist diff --git a/install/openhab-install.sh b/install/openhab-install.sh index 822da10ed..fac10df27 100644 --- a/install/openhab-install.sh +++ b/install/openhab-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ ca-certificates \ apt-transport-https msg_ok "Installed Dependencies" diff --git a/install/openproject-install.sh b/install/openproject-install.sh index 02b9ef8f0..4f2ad09ae 100644 --- a/install/openproject-install.sh +++ b/install/openproject-install.sh @@ -16,13 +16,12 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ apt-transport-https \ - ca-certificates \ - gpg + ca-certificates msg_ok "Installed Dependencies" msg_info "Setting up OpenProject Repository" curl -fsSL "https://dl.packager.io/srv/opf/openproject/key" | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg -curl -fsSL "https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo" -o "/etc/apt/sources.list.d/openproject.list" +curl -fsSL "https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo" -o "/etc/apt/sources.list.d/openproject.list" msg_ok "Setup OpenProject Repository" msg_info "Setting up PostgreSQL Repository" diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 090562ecd..94e813c95 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ git \ ffmpeg msg_ok "Installed Dependencies" @@ -28,16 +27,7 @@ $STD apt-get install -y --no-install-recommends \ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing Open WebUI (Patience)" $STD git clone https://github.com/open-webui/open-webui.git /opt/open-webui diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index 78a2c0ad5..ed114f5f0 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Installing openziti" mkdir -p --mode=0755 /usr/share/keyrings curl -fsSL https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg diff --git a/install/openziti-tunnel-install.sh b/install/openziti-tunnel-install.sh index e781fa51e..1be0417b8 100644 --- a/install/openziti-tunnel-install.sh +++ b/install/openziti-tunnel-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Installing openziti" mkdir -p --mode=0755 /usr/share/keyrings curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg diff --git a/install/outline-install.sh b/install/outline-install.sh index 541b2e1d1..d733179f4 100644 --- a/install/outline-install.sh +++ b/install/outline-install.sh @@ -15,31 +15,15 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ mkcert \ git \ redis msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" +NODE_VERSION="20" NODE_MODULE="yarn@latest" install_node_and_modules +PG_VERSION="16" install_postgresql -msg_info "Setting up PostgreSQL Repository" -curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg -echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list -msg_ok "Set up PostgreSQL Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Installed Node.js" - -msg_info "Install/Set up PostgreSQL Database" -$STD apt-get install -y postgresql-16 +msg_info "Set up PostgreSQL Database" DB_NAME="outline" DB_USER="outline" DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" @@ -48,7 +32,13 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" -msg_ok "Set up PostgreSQL" +{ + echo "Outline-Credentials" + echo "Outline Database User: $DB_USER" + echo "Outline Database Password: $DB_PASS" + echo "Outline Database Name: $DB_NAME" +} >>~/outline.creds +msg_ok "Set up PostgreSQL Database" msg_info "Setup Outline (Patience)" SECRET_KEY="$(openssl rand -hex 32)" diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index 600335782..3bc992b44 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -16,24 +16,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ git \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Yarn" -$STD npm install -g yarn -msg_ok "Installed Yarn" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Installing Overseerr (Patience)" git clone -q https://github.com/sct/overseerr.git /opt/overseerr diff --git a/install/pairdrop-install.sh b/install/pairdrop-install.sh index 907937c93..088050eb9 100644 --- a/install/pairdrop-install.sh +++ b/install/pairdrop-install.sh @@ -15,20 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - gpg + git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing PairDrop" git clone -q https://github.com/schlagmichdoch/PairDrop.git /opt/pairdrop diff --git a/install/paperless-ai-install.sh b/install/paperless-ai-install.sh index fd93aa8e0..f4972ef46 100644 --- a/install/paperless-ai-install.sh +++ b/install/paperless-ai-install.sh @@ -28,8 +28,8 @@ install_node_and_modules msg_info "Setup Paperless-AI" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/clusterzx/paperless-ai/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip +curl -fsSL "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v${RELEASE}.zip mv paperless-ai-${RELEASE} /opt/paperless-ai cd /opt/paperless-ai $STD pip install --no-cache-dir -r requirements.txt diff --git a/install/paperless-gpt-install.sh b/install/paperless-gpt-install.sh index 7ccb1c456..43b994229 100644 --- a/install/paperless-gpt-install.sh +++ b/install/paperless-gpt-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ gcc \ - gnupg \ ca-certificates \ musl-dev \ mupdf \ @@ -24,27 +23,8 @@ $STD apt-get install -y \ musl-tools msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -rm -f "$temp_file" -set -o pipefail -msg_ok "Installed Golang" +NODE_VERSION="22" install_node_and_modules +install_go msg_info "Setup Paperless-GPT" temp_file=$(mktemp) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index a9c74ed4e..1f23e9460 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -16,12 +16,10 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ redis \ - postgresql \ build-essential \ imagemagick \ fonts-liberation \ optipng \ - gnupg \ libpq-dev \ libmagic-dev \ mime-support \ @@ -37,6 +35,8 @@ $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 \ @@ -60,7 +60,7 @@ $STD apt-get install -y \ tesseract-ocr-eng cd /tmp -curl -fsSL "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz" -o $(basename "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz") +curl -fsSL "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz" -o "ghostscript-10.04.0.tar.gz" $STD tar -xzf ghostscript-10.04.0.tar.gz cd ghostscript-10.04.0 $STD ./configure diff --git a/install/part-db-install.sh b/install/part-db-install.sh index 9cd883bb9..3fde07809 100644 --- a/install/part-db-install.sh +++ b/install/part-db-install.sh @@ -21,10 +21,12 @@ $STD apt-get install -y \ lsb-release \ php-{opcache,curl,gd,mbstring,xml,bcmath,intl,zip,xsl,pgsql} \ libapache2-mod-php \ - composer \ - postgresql + composer msg_ok "Installed Dependencies" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules +PG_VERSION="16" install_postgresql + msg_info "Setting up PHP" PHPVER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "\n";') sed -i "s@post_max_size = 8M@post_max_size = 100M@g" /etc/php/${PHPVER}/apache2/php.ini @@ -45,21 +47,11 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP } >>~/partdb.creds msg_ok "Set up PostgreSQL" -msg_info "Setting up Node.js/Yarn" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g npm@latest -$STD npm install -g yarn -msg_ok "Installed Node.js/Yarn" - msg_info "Installing Part-DB (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/Part-DB/Part-DB-server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip") -unzip -q "v${RELEASE}.zip" +curl -fsSL "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip" -o "/opt/v${RELEASE}.zip" +$STD unzip "v${RELEASE}.zip" mv /opt/Part-DB-server-${RELEASE}/ /opt/partdb cd /opt/partdb/ diff --git a/install/paymenter-install.sh b/install/paymenter-install.sh index d2d17f857..c36585341 100644 --- a/install/paymenter-install.sh +++ b/install/paymenter-install.sh @@ -15,16 +15,16 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - software-properties-common \ - apt-transport-https \ - ca-certificates \ - gnupg2 \ - mariadb-server \ - nginx \ - redis-server + git \ + software-properties-common \ + apt-transport-https \ + ca-certificates \ + 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" @@ -58,14 +58,14 @@ DB_NAME=paymenter DB_USER=paymenter DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql -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;" +$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 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 diff --git a/install/peanut-install.sh b/install/peanut-install.sh index ee9bfe4ea..f39c582d6 100644 --- a/install/peanut-install.sh +++ b/install/peanut-install.sh @@ -14,17 +14,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - -msg_info "Installing Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing NUT" $STD apt-get install -y nut-client diff --git a/install/pelican-panel-install.sh b/install/pelican-panel-install.sh index 2ddea5993..c78013f25 100644 --- a/install/pelican-panel-install.sh +++ b/install/pelican-panel-install.sh @@ -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 @@ -41,9 +41,9 @@ msg_info "Setting up MariaDB" DB_NAME=panel DB_USER=pelican 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;" +$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 "Pelican Panel-Credentials" echo "Pelican Panel Database User: $DB_USER" @@ -56,7 +56,7 @@ msg_info "Installing Pelican Panel" RELEASE=$(curl -fsSL https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') mkdir /opt/pelican-panel cd /opt/pelican-panel -curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz") +curl -fsSL "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" -o "panel.tar.gz" tar -xzf "panel.tar.gz" $STD composer install --no-dev --optimize-autoloader --no-interaction $STD php artisan p:environment:setup diff --git a/install/petio-install.sh b/install/petio-install.sh index 282fac042..573ed54aa 100644 --- a/install/petio-install.sh +++ b/install/petio-install.sh @@ -13,19 +13,15 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - msg_info "Installing MongoDB 4.4" curl -fsSL "https://www.mongodb.org/static/pgp/server-4.4.asc" | gpg --dearmor >/usr/share/keyrings/mongodb-server-4.4.gpg # Determine OS ID OS_ID=$(grep '^ID=' /etc/os-release | cut -d'=' -f2) if [ "$OS_ID" = "debian" ]; then - echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/4.4 main" >/etc/apt/sources.list.d/mongodb-org-4.4.list + echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/4.4 main" >/etc/apt/sources.list.d/mongodb-org-4.4.list else - echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/ubuntu $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/4.4 multiverse" >/etc/apt/sources.list.d/mongodb-org-4.4.list + echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/ubuntu $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/4.4 multiverse" >/etc/apt/sources.list.d/mongodb-org-4.4.list fi $STD apt-get update @@ -38,7 +34,7 @@ msg_info "Installing Petio" useradd -M --shell=/bin/false petio mkdir /opt/Petio curl -fsSL "https://petio.tv/releases/latest" -o "petio-latest.zip" -$STD unzip -q petio-latest.zip -d /opt/Petio +$STD unzip petio-latest.zip -d /opt/Petio rm -rf petio-latest.zip chown -R petio:petio /opt/Petio msg_ok "Installed Petio" diff --git a/install/pf2etools-install.sh b/install/pf2etools-install.sh index 13c5f0283..ed1e7bbab 100644 --- a/install/pf2etools-install.sh +++ b/install/pf2etools-install.sh @@ -16,27 +16,17 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ apache2 \ - gpg \ ca-certificates \ git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Setup Pf2eTools" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip") -unzip -q "${RELEASE}.zip" +curl -fsSL "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" +$STD unzip "${RELEASE}.zip" mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools cd /opt/Pf2eTools $STD npm install diff --git a/install/phpipam-install.sh b/install/phpipam-install.sh index e06bc76e0..df903dea3 100644 --- a/install/phpipam-install.sh +++ b/install/phpipam-install.sh @@ -15,40 +15,41 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - 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 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;" +$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" + 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" msg_info "Installing phpIPAM" RELEASE=$(curl -fsSL https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip" -o $(basename "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip") -unzip -q "phpipam-v${RELEASE}.zip" -mysql -u root "${DB_NAME}" /opt/${APPLICATION}_version.txt msg_ok "Installed phpIPAM" diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index 73a2973fb..d85ecb859 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -16,28 +16,16 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - gnupg + git msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install pm2 -g -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="pm2" install_node_and_modules msg_info "Installing Pingvin Share (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/stonith404/pingvin-share/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" -curl -fsSL "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip +curl -fsSL "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v${RELEASE}.zip echo "${RELEASE}" >"/opt/pingvin_version.txt" mv pingvin-share-${RELEASE} /opt/pingvin-share cd /opt/pingvin-share/backend @@ -49,10 +37,9 @@ sed -i '/"admin.config.smtp.allow-unauthorized-certificates":\|admin.config.smtp $STD npm install $STD npm run build $STD pm2 start --name="pingvin-share-frontend" npm -- run start -# create and enable pm2-root systemd script $STD pm2 startup systemd -# save running pm2 processes so pingvin-share can survive reboots $STD pm2 save +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Pingvin Share" motd_ssh diff --git a/install/plant-it-install.sh b/install/plant-it-install.sh index 21fda4fad..99a012b25 100644 --- a/install/plant-it-install.sh +++ b/install/plant-it-install.sh @@ -15,12 +15,12 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg2 \ - mariadb-server \ - redis \ - nginx + 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 @@ -37,20 +37,20 @@ JWT_SECRET=$(openssl rand -base64 24 | tr -d '/+=') DB_NAME=plantit DB_USER=plantit_usr 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;" +$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 "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" msg_info "Setup Plant-it" RELEASE=$(curl -fsSL https://api.github.com/repos/MDeLuise/plant-it/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/MDeLuise/plant-it/releases/download/${RELEASE}/server.jar" -o $(basename "https://github.com/MDeLuise/plant-it/releases/download/${RELEASE}/server.jar") +curl -fsSL "https://github.com/MDeLuise/plant-it/releases/download/${RELEASE}/server.jar" -o "server.jar" mkdir -p /opt/plant-it/{backend,frontend} mkdir -p /opt/plant-it-data mv -f server.jar /opt/plant-it/backend/server.jar @@ -80,7 +80,7 @@ CACHE_PORT=6379 EOF cd /opt/plant-it/frontend -curl -fsSL "https://github.com/MDeLuise/plant-it/releases/download/${RELEASE}/client.tar.gz" -o $(basename "https://github.com/MDeLuise/plant-it/releases/download/${RELEASE}/client.tar.gz") +curl -fsSL "https://github.com/MDeLuise/plant-it/releases/download/${RELEASE}/client.tar.gz" -o "client.tar.gz" tar -xzf client.tar.gz echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Setup Plant-it" diff --git a/install/plex-install.sh b/install/plex-install.sh index 9320f8809..3e29e10d2 100644 --- a/install/plex-install.sh +++ b/install/plex-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gpg -msg_ok "Installed Dependencies" - msg_info "Setting Up Hardware Acceleration" $STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,vainfo} if [[ "$CTTYPE" == "0" ]]; then diff --git a/install/pocketbase-install.sh b/install/pocketbase-install.sh index e4b9490dd..f79062d1f 100644 --- a/install/pocketbase-install.sh +++ b/install/pocketbase-install.sh @@ -17,7 +17,7 @@ msg_info "Installing Pocketbase" RELEASE="$(curl -fsSL https://api.github.com/repos/pocketbase/pocketbase/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')" curl -fsSL "https://github.com/pocketbase/pocketbase/releases/download/v${RELEASE}/pocketbase_${RELEASE}_linux_arm64.zip" -o "/tmp/pocketbase.zip" mkdir -p /opt/pocketbase/{pb_public,pb_migrations,pb_hooks} -unzip -q -o /tmp/pocketbase.zip -d /opt/pocketbase +$STD unzip -o /tmp/pocketbase.zip -d /opt/pocketbase cat </etc/systemd/system/pocketbase.service [Unit] diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index ce4503bd6..e12462536 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -13,19 +13,7 @@ setting_up_container network_check update_os -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 +PG_VERSION="17" install_postgresql cat </etc/postgresql/17/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File @@ -127,7 +115,7 @@ default_text_search_config = 'pg_catalog.english' include_dir = 'conf.d' EOF -sudo systemctl restart postgresql +systemctl restart postgresql msg_ok "Installed PostgreSQL" read -r -p "${TAB3}Would you like to add Adminer? " prompt diff --git a/install/privatebin-install.sh b/install/privatebin-install.sh index 3fd6e83f7..7e5487228 100644 --- a/install/privatebin-install.sh +++ b/install/privatebin-install.sh @@ -15,11 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - nginx \ - php8.2-fpm \ - php8.2-{common,cli,gd,mbstring,xml,fpm,curl,zip} \ - unzip \ - openssl + nginx \ + php8.2-fpm \ + php8.2-{common,cli,gd,mbstring,xml,fpm,curl,zip} \ + openssl msg_ok "Installed Dependencies" msg_info "Installing PrivateBin" @@ -27,17 +26,17 @@ RELEASE=$(curl -fsSL https://api.github.com/repos/PrivateBin/PrivateBin/releases echo "${RELEASE}" >/opt/${APPLICATION}_version.txt mkdir -p /opt/privatebin cd /opt/privatebin -curl -fsSL "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip") -$STD unzip -q ${RELEASE}.zip +curl -fsSL "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" +$STD unzip ${RELEASE}.zip mv PrivateBin-${RELEASE}/* . msg_ok "Installed PrivateBin" msg_info "Generating Universal SSL Certificate" mkdir -p /etc/ssl/privatebin $STD openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \ - -keyout /etc/ssl/privatebin/key.pem \ - -out /etc/ssl/privatebin/cert.pem \ - -subj "/CN=PrivateBin" + -keyout /etc/ssl/privatebin/key.pem \ + -out /etc/ssl/privatebin/cert.pem \ + -subj "/CN=PrivateBin" msg_ok "Certificate Generated" msg_info "Configuring Environment" diff --git a/install/projectsend-install.sh b/install/projectsend-install.sh index 8dc819b9a..54624323b 100644 --- a/install/projectsend-install.sh +++ b/install/projectsend-install.sh @@ -15,46 +15,47 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - mariadb-server \ - apache2 \ - libapache2-mod-php \ - php8.2-{pdo,mysql,mbstring,gettext,fileinfo,gd,xml,zip} + 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 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;" +$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 "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" msg_info "Installing projectsend" RELEASE=$(curl -fsSL https://api.github.com/repos/projectsend/projectsend/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip" -o $(basename "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip") +curl -fsSL "https://github.com/projectsend/projectsend/releases/download/r${RELEASE}/projectsend-r${RELEASE}.zip" -o "projectsend-r${RELEASE}.zip" mkdir projectsend -unzip -q "projectsend-r${RELEASE}.zip" -d projectsend +$STD unzip "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 + -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" diff --git a/install/prometheus-alertmanager-install.sh b/install/prometheus-alertmanager-install.sh old mode 100755 new mode 100644 index 4471c53f7..a86eec9e6 --- a/install/prometheus-alertmanager-install.sh +++ b/install/prometheus-alertmanager-install.sh @@ -17,7 +17,7 @@ msg_info "Installing Prometheus Alertmanager" RELEASE=$(curl -fsSL https://api.github.com/repos/prometheus/alertmanager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') mkdir -p /etc/alertmanager mkdir -p /var/lib/alertmanager -curl -fsSL "https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-arm64.tar.gz" -o $(basename "https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-arm64.tar.gz") +curl -fsSL "https://github.com/prometheus/alertmanager/releases/download/v${RELEASE}/alertmanager-${RELEASE}.linux-arm64.tar.gz" -o "alertmanager-${RELEASE}.linux-arm64.tar.gz" tar -xf alertmanager-${RELEASE}.linux-arm64.tar.gz mv alertmanager-${RELEASE}.linux-arm64/alertmanager alertmanager-${RELEASE}.linux-arm64/amtool /usr/local/bin/ mv alertmanager-${RELEASE}.linux-arm64/alertmanager.yml /etc/alertmanager/alertmanager.yml diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index fb6ac2fcd..7760638f8 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -17,7 +17,7 @@ msg_info "Installing Prometheus" RELEASE=$(curl -fsSL https://api.github.com/repos/prometheus/prometheus/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') mkdir -p /etc/prometheus mkdir -p /var/lib/prometheus -curl -fsSL "https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-arm64.tar.gz" -o $(basename "https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-arm64.tar.gz") +curl -fsSL "https://github.com/prometheus/prometheus/releases/download/v${RELEASE}/prometheus-${RELEASE}.linux-arm64.tar.gz" -o "prometheus-${RELEASE}.linux-arm64.tar.gz" tar -xf prometheus-${RELEASE}.linux-arm64.tar.gz mv prometheus-${RELEASE}.linux-arm64/prometheus prometheus-${RELEASE}.linux-arm64/promtool /usr/local/bin/ mv prometheus-${RELEASE}.linux-arm64/prometheus.yml /etc/prometheus/prometheus.yml diff --git a/install/prometheus-paperless-ngx-exporter-install.sh b/install/prometheus-paperless-ngx-exporter-install.sh old mode 100755 new mode 100644 index 7c727c92a..2796313f8 --- a/install/prometheus-paperless-ngx-exporter-install.sh +++ b/install/prometheus-paperless-ngx-exporter-install.sh @@ -15,7 +15,7 @@ update_os msg_info "Installing Prometheus Paperless NGX Exporter" RELEASE=$(curl -fsSL https://api.github.com/repos/hansmi/prometheus-paperless-exporter/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/hansmi/prometheus-paperless-exporter/releases/download/v${RELEASE}/prometheus-paperless-exporter_${RELEASE}_linux_arm64.tar.gz" -o $(basename "https://github.com/hansmi/prometheus-paperless-exporter/releases/download/v${RELEASE}/prometheus-paperless-exporter_${RELEASE}_linux_arm64.tar.gz") +curl -fsSL "https://github.com/hansmi/prometheus-paperless-exporter/releases/download/v${RELEASE}/prometheus-paperless-exporter_${RELEASE}_linux_arm64.tar.gz" -o "prometheus-paperless-exporter_${RELEASE}_linux_arm64.tar.gz" tar -xf prometheus-paperless-exporter_${RELEASE}_linux_arm64.tar.gz mv prometheus-paperless-exporter_${RELEASE}_linux_arm64/prometheus-paperless-exporter /usr/local/bin/ mkdir -p /etc/prometheus-paperless-ngx-exporter diff --git a/install/proxmox-backup-server-install.sh b/install/proxmox-backup-server-install.sh index 32ed474f3..3b2d5f9a0 100644 --- a/install/proxmox-backup-server-install.sh +++ b/install/proxmox-backup-server-install.sh @@ -14,16 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ - sudo \ - gpg \ - mc \ - wget \ - openssh-server \ - git \ - dpkg-dev -msg_ok "Installed Dependencies" +$STD apt-get install -y git msg_info "Installing Proxmox Backup Server (Patience)" export DEBIAN_FRONTEND=noninteractive diff --git a/install/proxmox-datacenter-manager-install.sh b/install/proxmox-datacenter-manager-install.sh index e823df699..5e6b2e3e5 100644 --- a/install/proxmox-datacenter-manager-install.sh +++ b/install/proxmox-datacenter-manager-install.sh @@ -18,8 +18,8 @@ curl -fsSL https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg | echo "deb [signed-by=/etc/apt/keyrings/proxmox-release-bookworm.gpg] http://download.proxmox.com/debian/pdm bookworm pdm-test " >/etc/apt/sources.list.d/proxmox-release-bookworm.list $STD apt-get update $STD apt-get install -y \ - proxmox-datacenter-manager \ - proxmox-datacenter-manager-ui + proxmox-datacenter-manager \ + proxmox-datacenter-manager-ui msg_ok "Installed Proxmox Datacenter Manager" motd_ssh diff --git a/install/ps5-mqtt-install.sh b/install/ps5-mqtt-install.sh index 496f3d9c7..6aa49e2ac 100644 --- a/install/ps5-mqtt-install.sh +++ b/install/ps5-mqtt-install.sh @@ -16,21 +16,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ jq \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm i -g playactor -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="playactor" install_node_and_modules msg_info "Installing PS5-MQTT" RELEASE=$(curl -fsSL https://api.github.com/repos/FunkeyFlo/ps5-mqtt/releases/latest | jq -r '.tag_name') diff --git a/install/pterodactyl-panel-install.sh b/install/pterodactyl-panel-install.sh index 1c3d1650f..a0c0608ef 100644 --- a/install/pterodactyl-panel-install.sh +++ b/install/pterodactyl-panel-install.sh @@ -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 @@ -42,9 +42,9 @@ msg_info "Setting up MariaDB" DB_NAME=panel DB_USER=pterodactyl 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;" +$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 "pterodactyl Panel-Credentials" echo "pterodactyl Panel Database User: $DB_USER" @@ -61,7 +61,7 @@ msg_info "Installing pterodactyl Panel" RELEASE=$(curl -fsSL https://api.github.com/repos/pterodactyl/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') mkdir /opt/pterodactyl-panel cd /opt/pterodactyl-panel -curl -fsSL "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz" -o $(basename "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz") +curl -fsSL "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz" -o "panel.tar.gz" tar -xzf "panel.tar.gz" cp .env.example .env IP=$(hostname -I | awk '{print $1}') diff --git a/install/pulse-install.sh b/install/pulse-install.sh new file mode 100644 index 000000000..5fe6b016c --- /dev/null +++ b/install/pulse-install.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: rcourtman +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/rcourtman/Pulse + +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 \ + diffutils \ + policykit-1 +msg_ok "Installed Dependencies" + +msg_info "Creating dedicated user pulse..." +if useradd -r -m -d /opt/pulse-home -s /bin/bash pulse; then + msg_ok "User created." +else + msg_error "User creation failed." + exit 1 +fi + +NODE_VERSION="20" install_node_and_modules + +msg_info "Setup Pulse" +RELEASE=$(curl -fsSL https://api.github.com/repos/rcourtman/Pulse/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +temp_file=$(mktemp) +mkdir -p /opt/pulse +curl -fsSL "https://github.com/rcourtman/Pulse/releases/download/v${RELEASE}/pulse-v${RELEASE}.tar.gz" -o "$temp_file" +tar zxf "$temp_file" --strip-components=1 -C /opt/pulse +touch /opt/pulse/.env +chown pulse:pulse /opt/pulse/.env +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Pulse" + + +msg_info "Setting permissions for /opt/pulse..." +chown -R pulse:pulse "/opt/pulse" +find "/opt/pulse" -type d -exec chmod 755 {} \; +find "/opt/pulse" -type f -exec chmod 644 {} \; +msg_ok "Set permissions." + +msg_info "Creating Service" +cat </etc/systemd/system/pulse.service +[Unit] +Description=Pulse Monitoring Application +After=network.target + +[Service] +Type=simple +User=pulse +Group=pulse +WorkingDirectory=/opt/pulse +EnvironmentFile=/opt/pulse/.env +ExecStart=/usr/bin/npm run start +Restart=on-failure +RestartSec=5 +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now pulse +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" diff --git a/install/rabbitmq-install.sh b/install/rabbitmq-install.sh index 0fdd6b8bb..45c4c7cce 100644 --- a/install/rabbitmq-install.sh +++ b/install/rabbitmq-install.sh @@ -17,7 +17,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ lsb-release \ - gnupg \ apt-transport-https \ make \ software-properties-common diff --git a/install/rclone-install.sh b/install/rclone-install.sh index 35cae3ae3..5340ab753 100644 --- a/install/rclone-install.sh +++ b/install/rclone-install.sh @@ -14,9 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - apache2-utils \ - unzip +$STD apt-get install -y apache2-utils fuse3 msg_ok "Installed Dependencies" msg_info "Installing rclone" diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index fd17ad250..684dc194a 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -34,8 +34,8 @@ $STD ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet msg_ok "Installed ASP.NET Core Runtime" msg_info "Installing rdtclient" -curl -fsSL "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip" -o $(basename "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip") -unzip -qq RealDebridClient.zip -d /opt/rdtc +curl -fsSL "https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip" -o RealDebridClient.zip +$STD unzip RealDebridClient.zip -d /opt/rdtc rm RealDebridClient.zip cd /opt/rdtc mkdir -p data/{db,downloads} diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index 175dbed0f..87ba61cf8 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -14,21 +14,13 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - gnupg \ - unzip \ - postgresql-common -msg_ok "Installed Dependencies" - -msg_info "Installing Additional Dependencies" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -echo "YES" | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh &>/dev/null -$STD apt-get install -y postgresql-16 nodejs cd /tmp curl -fsSL https://dl.min.io/server/minio/release/linux-arm64/minio.deb -o minio.deb $STD dpkg -i minio.deb +msg_ok "Installed Dependencies" + +PG_VERSION="16" PG_MODULES="common" install_postgresql +NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules msg_info "Setting up Database" DB_USER="rxresume" @@ -49,7 +41,7 @@ LOCAL_IP=$(hostname -I | awk '{print $1}') TAG=$(curl -fsSL https://api.github.com/repos/browserless/browserless/tags?per_page=1 | grep "name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -fsSL https://api.github.com/repos/AmruthPillai/Reactive-Resume/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') curl -fsSL "https://github.com/AmruthPillai/Reactive-Resume/archive/refs/tags/v${RELEASE}.zip" -o v${RELEASE}.zip -unzip -q v${RELEASE}.zip +$STD unzip v${RELEASE}.zip mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION} cd /opt/${APPLICATION} corepack enable @@ -66,7 +58,7 @@ msg_ok "Installed ${APPLICATION}" msg_info "Installing Browserless (Patience)" cd /tmp curl -fsSL https://github.com/browserless/browserless/archive/refs/tags/v${TAG}.zip -o v${TAG}.zip -unzip -q v${TAG}.zip +$STD unzip v${TAG}.zip mv browserless-${TAG} /opt/browserless cd /opt/browserless $STD npm install @@ -126,11 +118,11 @@ TOKEN=${CHROME_TOKEN} EOF echo "${RELEASE}" >/opt/${APPLICATION}_version.txt { - echo "${APPLICATION} Credentials" - echo "Database User: $DB_USER" - echo "Database Password: $DB_PASS" - echo "Database Name: $DB_NAME" - echo "Minio Root Password: ${MINIO_PASS}" + echo "${APPLICATION} Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" + echo "Minio Root Password: ${MINIO_PASS}" } >>~/${APPLICATION}.creds msg_ok "Configured applications" diff --git a/install/redis-install.sh b/install/redis-install.sh index f20fbca9d..b1d45c612 100644 --- a/install/redis-install.sh +++ b/install/redis-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y apt-transport-https -$STD apt-get install -y gpg $STD apt-get install -y lsb-release msg_ok "Installed Dependencies" diff --git a/install/revealjs-install.sh b/install/revealjs-install.sh index e234bcc00..3db939c3b 100644 --- a/install/revealjs-install.sh +++ b/install/revealjs-install.sh @@ -13,20 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Setup Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Setup Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Setup ${APPLICATION}" temp_file=$(mktemp) diff --git a/install/runtipi-install.sh b/install/runtipi-install.sh index dd4c14fc5..01b6e15c0 100644 --- a/install/runtipi-install.sh +++ b/install/runtipi-install.sh @@ -18,7 +18,7 @@ DOCKER_CONFIG_PATH='/etc/docker/daemon.json' mkdir -p "$(dirname "$DOCKER_CONFIG_PATH")" echo -e '{\n "log-driver": "journald"\n}' >"$DOCKER_CONFIG_PATH" cd /opt -curl -fsSL "https://raw.githubusercontent.com/runtipi/runtipi/master/scripts/install.sh" -o $(basename "https://raw.githubusercontent.com/runtipi/runtipi/master/scripts/install.sh") +curl -fsSL "https://raw.githubusercontent.com/runtipi/runtipi/master/scripts/install.sh" -o "install.sh" chmod +x install.sh $STD ./install.sh chmod 666 /opt/runtipi/state/settings.json diff --git a/install/searxng-install.sh b/install/searxng-install.sh index e58fee3b8..0d955cb20 100644 --- a/install/searxng-install.sh +++ b/install/searxng-install.sh @@ -54,7 +54,7 @@ server: bind_address: "0.0.0.0" port: 8888 secret_key: "${SECRET_KEY}" - limiter: true + limiter: false image_proxy: true redis: url: "redis://127.0.0.1:6379/0" diff --git a/install/seelf-install.sh b/install/seelf-install.sh index f38c5d930..24bf5740c 100644 --- a/install/seelf-install.sh +++ b/install/seelf-install.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: tremor021 +# Author: SlaviΕ‘a AreΕΎina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/YuukanOO/seelf @@ -16,45 +16,22 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ make \ - gcc \ - gpg + gcc msg_ok "Installed Dependencies" -msg_info "Installing Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -set -o pipefail -msg_ok "Installed Golang" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +install_go +NODE_VERSION="22" install_node_and_modules +fetch_and_deploy_gh_release "YuukanOO/seelf" msg_info "Setting up seelf. Patience" -RELEASE=$(curl -fsSL https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz" -o $(basename "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz") -tar -xzf v"${RELEASE}".tar.gz -mv seelf-"${RELEASE}"/ /opt/seelf cd /opt/seelf $STD make build PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +mkdir -p /opt/seelf/data { echo "ADMIN_EMAIL=admin@example.com" echo "ADMIN_PASSWORD=$PASS" } | tee .env ~/seelf.creds >/dev/null - -echo "${RELEASE}" >/opt/seelf_version.txt SEELF_ADMIN_EMAIL=admin@example.com SEELF_ADMIN_PASSWORD=$PASS ./seelf serve &>/dev/null & sleep 5 kill $! @@ -70,8 +47,10 @@ After=network.target Type=simple User=root Group=root +EnvironmentFile=/opt/seelf/.env +Environment=DATA_PATH=/opt/seelf/data WorkingDirectory=/opt/seelf -ExecStart=/opt/seelf/./seelf serve +ExecStart=/opt/seelf/./seelf -c data/conf.yml serve Restart=always [Install] @@ -83,13 +62,7 @@ msg_ok "Created Service" motd_ssh customize -# Cleanup msg_info "Cleaning up" -rm -f ~/v"${RELEASE}".tar.gz -rm -f "$temp_file" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" - -motd_ssh -customize diff --git a/install/semaphore-install.sh b/install/semaphore-install.sh index fd94868a7..bd10d12e6 100644 --- a/install/semaphore-install.sh +++ b/install/semaphore-install.sh @@ -15,8 +15,7 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - git \ - gpg + git curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | gpg --dearmour >/usr/share/keyrings/ansible-archive-keyring.gpg cat </etc/apt/sources.list.d/ansible.list @@ -30,7 +29,7 @@ msg_info "Setup Semaphore" RELEASE=$(curl -fsSL https://api.github.com/repos/semaphoreui/semaphore/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') mkdir -p /opt/semaphore cd /opt/semaphore -curl -fsSL "https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_arm64.deb" -o $(basename "https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_arm64.deb") +curl -fsSL "https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_arm64.deb" -o "semaphore_${RELEASE}_linux_arm64.deb" $STD dpkg -i semaphore_${RELEASE}_linux_arm64.deb SEM_HASH=$(openssl rand -base64 32) diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh index 770c931b0..2d0859fcb 100644 --- a/install/sftpgo-install.sh +++ b/install/sftpgo-install.sh @@ -14,20 +14,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gpg $STD apt-get install -y sqlite3 msg_ok "Installed Dependencies" -msg_info "Installing Golang" -set +o pipefail -temp_file=$(mktemp) -golang_tarball=$(curl -fsSL https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-arm64\.tar\.gz' | head -n 1) -curl -fsSL "https://golang.org/dl/${golang_tarball}" -o "$temp_file" -tar -C /usr/local -xzf "$temp_file" -ln -sf /usr/local/go/bin/go /usr/local/bin/go -rm -f "$temp_file" -set -o pipefail -msg_ok "Installed Golang" +install_go msg_info "Installing SFTPGo" curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 44c00fb6a..71d38182f 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -17,19 +17,10 @@ msg_info "Installing Dependencies" $STD apt-get install -y make zip net-tools git $STD apt-get install -y gcc g++ cmake $STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules +install_mariadb msg_info "Installing FFMPEG" $STD apt-get install -y ffmpeg @@ -51,9 +42,8 @@ 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 +$STD mariadb -u "$sqluser" -p"$sqlpass" -e "source sql/user.sql" || true msg_ok "Installed Database" msg_info "Installing Shinobi" diff --git a/install/silverbullet-install.sh b/install/silverbullet-install.sh index 14f5b8a9f..f3c30ce3d 100644 --- a/install/silverbullet-install.sh +++ b/install/silverbullet-install.sh @@ -16,8 +16,9 @@ update_os msg_info "Installing Silverbullet" RELEASE=$(curl -fsSL https://api.github.com/repos/silverbulletmd/silverbullet/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') mkdir -p /opt/silverbullet/bin /opt/silverbullet/space -curl -fsSL "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-aarch64.zip" -o $(basename "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-aarch64.zip") -unzip -oq -d /opt/silverbullet/bin/ silverbullet-server-linux-aarch64.zip +cd /opt +curl -fsSL "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-aarch64.zip" -o "silverbullet-server-linux-aarch64.zip" +$STD unzip -o -d /opt/silverbullet/bin/ silverbullet-server-linux-aarch64.zip chmod +x /opt/silverbullet/bin/silverbullet echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Silverbullet" @@ -46,7 +47,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf silverbullet-server-linux-aarch64.zip +rm -rf /opt/silverbullet-server-linux-aarch64.zip $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/slskd-install.sh b/install/slskd-install.sh index ba884ac7a..9cab6a896 100644 --- a/install/slskd-install.sh +++ b/install/slskd-install.sh @@ -22,7 +22,7 @@ msg_info "Setup ${APPLICATION}" tmp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-arm64.zip" -o $tmp_file -unzip -q $tmp_file -d /opt/${APPLICATION} +$STD unzip $tmp_file -d /opt/${APPLICATION} echo "${RELEASE}" >/opt/${APPLICATION}_version.txt JWT_KEY=$(openssl rand -base64 44) SLSKD_API_KEY=$(openssl rand -base64 44) @@ -35,7 +35,7 @@ sed -i \ s|0.0.0.0/0,::/0|& # Replace this with your subnet|" \ -e "\|soulseek|,\|write_queue|s|^#||" \ -e "\|jwt:|,\|ttl|s|key: ~|key: $JWT_KEY|" \ - -e "s|^ picture|# picture|" \ + -e "s|^ picture|# picture|" \ /opt/${APPLICATION}/config/slskd.yml msg_ok "Setup ${APPLICATION}" @@ -43,7 +43,7 @@ msg_info "Installing Soularr" rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED cd /tmp curl -fsSL -o main.zip https://github.com/mrusse/soularr/archive/refs/heads/main.zip -unzip -q main.zip +$STD unzip main.zip mv soularr-main /opt/soularr cd /opt/soularr $STD pip install -r requirements.txt diff --git a/install/snipeit-install.sh b/install/snipeit-install.sh index 8df86daf7..372375a07 100644 --- a/install/snipeit-install.sh +++ b/install/snipeit-install.sh @@ -15,25 +15,26 @@ 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} \ - mariadb-server + composer \ + git \ + nginx \ + php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli} msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up database" DB_NAME=snipeit_db DB_USER=snipeit DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) -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;" +$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 "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" @@ -48,9 +49,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 diff --git a/install/spoolman-install.sh b/install/spoolman-install.sh index 0bb841f0c..4a70725bf 100644 --- a/install/spoolman-install.sh +++ b/install/spoolman-install.sh @@ -19,7 +19,6 @@ $STD apt-get install -y \ build-essential \ make \ libpq-dev \ - gpg \ ca-certificates msg_ok "Installed Dependencies" @@ -34,8 +33,8 @@ msg_ok "Setup Python3" msg_info "Installing Spoolman" RELEASE=$(curl -fsSL https://github.com/Donkie/Spoolman/releases/latest | grep "title>Release" | cut -d " " -f 4) cd /opt -curl -fsSL "https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip" -o $(basename "https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip") -unzip -q spoolman.zip -d spoolman +curl -fsSL "https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip" -o "spoolman.zip" +$STD unzip spoolman.zip -d spoolman rm -rf spoolman.zip cd spoolman $STD pip3 install -r requirements.txt diff --git a/install/sqlserver2022-install.sh b/install/sqlserver2022-install.sh index 8cb13a1fe..0e70df904 100644 --- a/install/sqlserver2022-install.sh +++ b/install/sqlserver2022-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - gpg \ coreutils msg_ok "Installed Dependencies" diff --git a/install/stirling-pdf-install.sh b/install/stirling-pdf-install.sh index 97bd8eeb5..e764c0f97 100644 --- a/install/stirling-pdf-install.sh +++ b/install/stirling-pdf-install.sh @@ -55,7 +55,7 @@ msg_ok "Installed Python Dependencies" msg_info "Installing Azul Zulu" curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" -o "/etc/apt/trusted.gpg.d/zulu-repo.asc" -curl -fsSL "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o $(basename "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb") +curl -fsSL "https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb" -o "/zulu-repo_1.0.0-3_all.deb" $STD dpkg -i zulu-repo_1.0.0-3_all.deb $STD apt-get update $STD apt-get -y install zulu17-jdk @@ -76,7 +76,7 @@ msg_ok "Installed Language Packs" msg_info "Installing Stirling-PDF (Additional Patience)" RELEASE=$(curl -fsSL https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v${RELEASE}.tar.gz" -o $(basename "https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v${RELEASE}.tar.gz") +curl -fsSL "https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v${RELEASE}.tar.gz" -o "v${RELEASE}.tar.gz" tar -xzf v${RELEASE}.tar.gz cd Stirling-PDF-$RELEASE chmod +x ./gradlew diff --git a/install/syncthing-install.sh b/install/syncthing-install.sh index 0082a5590..d99b4890e 100644 --- a/install/syncthing-install.sh +++ b/install/syncthing-install.sh @@ -13,12 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -$STD apt-get install -y openssh-server -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Installed Dependencies" - msg_info "Installing Syncthing" curl -fsSL -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg sh -c 'echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list' diff --git a/install/tandoor-install.sh b/install/tandoor-install.sh index 229495dee..a79c187d0 100644 --- a/install/tandoor-install.sh +++ b/install/tandoor-install.sh @@ -24,7 +24,6 @@ $STD apt-get install -y --no-install-recommends \ libsasl2-dev \ libldap2-dev \ libssl-dev \ - gpg \ git \ make \ pkg-config \ @@ -43,17 +42,7 @@ $STD apt-get install -y \ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Installed Node.js" +NODE_VERSION="20" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Installing Tandoor (Patience)" $STD git clone https://github.com/TandoorRecipes/recipes -b master /opt/tandoor diff --git a/install/tasmoadmin-install.sh b/install/tasmoadmin-install.sh index a494d1eb2..ac79d3c2b 100644 --- a/install/tasmoadmin-install.sh +++ b/install/tasmoadmin-install.sh @@ -25,7 +25,7 @@ $STD apt-get install -y git msg_ok "Installed Dependencies" msg_info "Installing TasmoAdmin" -curl -fsSL "https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.1.1/tasmoadmin_v3.1.1.tar.gz" -o $(basename "https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.1.1/tasmoadmin_v3.1.1.tar.gz") +curl -fsSL "https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.1.1/tasmoadmin_v3.1.1.tar.gz" -o tasmoadmin_v3.1.1.tar.gz tar -xzf tasmoadmin_v3.1.1.tar.gz -C /var/www/ rm -rf tasmoadmin_v3.1.1.tar.gz /etc/php/8.2/apache2/conf.d/10-opcache.ini chown -R www-data:www-data /var/www/tasmoadmin diff --git a/install/tasmocompiler-install.sh b/install/tasmocompiler-install.sh index 2ff43218c..1ba241f0b 100644 --- a/install/tasmocompiler-install.sh +++ b/install/tasmocompiler-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies. Patience" $STD apt-get install -y \ - gnupg \ git msg_ok "Installed Dependencies" @@ -23,14 +22,7 @@ msg_info "Setup Python3" $STD apt-get install -y python3-venv msg_ok "Setup Python3" -msg_info "Setup Node.js & yarn" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Setup Node.js & yarn" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Setup Platformio" curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py diff --git a/install/teddycloud-install.sh b/install/teddycloud-install.sh index c16224649..5e3ec0fe4 100644 --- a/install/teddycloud-install.sh +++ b/install/teddycloud-install.sh @@ -26,8 +26,8 @@ msg_ok "Installed Dependencies" msg_info "Installing TeddyCloud" RELEASE="$(curl -fsSL https://api.github.com/repos/toniebox-reverse-engineering/teddycloud/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')" VERSION="${RELEASE#tc_v}" -curl -fsSL "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip" -o $(basename "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip") -unzip -q -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip" +curl -fsSL "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip" -o "teddycloud.amd64.release_v${VERSION}.zip" +$STD unzip -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip" ln -fns "/opt/teddycloud-${VERSION}" /opt/teddycloud rm -rf teddycloud.amd64.release_v${VERSION}.zip echo "${VERSION}" >"/opt/${APPLICATION}_version.txt" diff --git a/install/the-lounge-install.sh b/install/the-lounge-install.sh index 4fe52a7e5..28d7f0862 100644 --- a/install/the-lounge-install.sh +++ b/install/the-lounge-install.sh @@ -15,27 +15,15 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gpg \ build-essential msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install --global yarn -$STD npm install --global node-gyp -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest,node-gyp" install_node_and_modules msg_info "Installing The Lounge" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb" -o $(basename "https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb") +curl -fsSL "https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb" -o "./thelounge_${RELEASE}_all.deb" $STD dpkg -i ./thelounge_${RELEASE}_all.deb echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed The Lounge" diff --git a/install/tianji-install.sh b/install/tianji-install.sh index a2a1bd246..9fb9c93b2 100644 --- a/install/tianji-install.sh +++ b/install/tianji-install.sh @@ -16,26 +16,18 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - postgresql \ python3 \ cmake \ g++ \ build-essential \ git \ make \ - gnupg \ - ca-certificates + ca-certificates \ + jq msg_ok "Installed Dependencies" -msg_info "Installing Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g pnpm@9.7.1 -export NODE_OPTIONS="--max_old_space_size=4096" -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/msgbyte/tianji/master/package.json | jq -r '.packageManager | split("@")[1]')" install_node_and_modules +PG_VERSION="16" install_postgresql msg_info "Setting up PostgreSQL" DB_NAME=tianji_db @@ -57,8 +49,8 @@ msg_ok "Set up PostgreSQL" msg_info "Installing Tianji (Extreme Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/msgbyte/tianji/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip +curl -fsSL "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v${RELEASE}.zip mv tianji-${RELEASE} /opt/tianji cd tianji $STD pnpm install --filter @tianji/client... --config.dedupe-peer-dependents=false --frozen-lockfile diff --git a/install/traccar-install.sh b/install/traccar-install.sh index c01e8d464..525a6584a 100644 --- a/install/traccar-install.sh +++ b/install/traccar-install.sh @@ -15,7 +15,7 @@ update_os RELEASE=$(curl -fsSL https://api.github.com/repos/traccar/traccar/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing Traccar v${RELEASE}" -curl -fsSL "https://github.com/traccar/traccar/releases/download/v${RELEASE}/traccar-linux-arm-${RELEASE}.zip" -o $(basename "https://github.com/traccar/traccar/releases/download/v${RELEASE}/traccar-linux-arm-${RELEASE}.zip") +curl -fsSL "https://github.com/traccar/traccar/releases/download/v${RELEASE}/traccar-linux-arm-${RELEASE}.zip" -o "traccar-linux-arm-${RELEASE}.zip" $STD unzip traccar-linux-arm-${RELEASE}.zip $STD ./traccar.run systemctl enable -q --now traccar diff --git a/install/traefik-install.sh b/install/traefik-install.sh index c98c437c7..c7920c828 100644 --- a/install/traefik-install.sh +++ b/install/traefik-install.sh @@ -14,14 +14,13 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gpg $STD apt-get install -y apt-transport-https msg_ok "Installed Dependencies" RELEASE=$(curl -fsSL https://api.github.com/repos/traefik/traefik/releases | grep -oP '"tag_name":\s*"v\K[\d.]+?(?=")' | sort -V | tail -n 1) msg_info "Installing Traefik v${RELEASE}" mkdir -p /etc/traefik/{conf.d,ssl} -curl -fsSL "https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_arm64.tar.gz" -o $(basename "https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_arm64.tar.gz") +curl -fsSL "https://github.com/traefik/traefik/releases/download/v${RELEASE}/traefik_v${RELEASE}_linux_arm64.tar.gz" -o "traefik_v${RELEASE}_linux_arm64.tar.gz" tar -C /tmp -xzf traefik*.tar.gz mv /tmp/traefik /usr/bin/ rm -rf traefik*.tar.gz diff --git a/install/trilium-install.sh b/install/trilium-install.sh index f633cebb6..5657a8ed2 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -16,7 +16,7 @@ update_os msg_info "Setup TriliumNext" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/TriliumNext/Notes/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-arm64.tar.xz" -o $(basename "https://github.com/TriliumNext/Notes/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-arm64.tar.xz") +curl -fsSL "https://github.com/TriliumNext/Notes/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-arm64.tar.xz" -o "TriliumNextNotes-Server-v${RELEASE}-linux-arm64.tar.xz" tar -xf TriliumNextNotes-Server-v${RELEASE}-linux-arm64.tar.xz mv TriliumNextNotes-Server-$RELEASE-linux-arm64 /opt/trilium echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" diff --git a/install/typesense-install.sh b/install/typesense-install.sh index 3057930a5..c4c2a27fe 100644 --- a/install/typesense-install.sh +++ b/install/typesense-install.sh @@ -16,7 +16,7 @@ update_os msg_info "Installing TypeSense" RELEASE=$(curl -fsSL https://api.github.com/repos/typesense/typesense/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cd /opt -curl -fsSL "https://dl.typesense.org/releases/${RELEASE}/typesense-server-${RELEASE}-arm64.deb" -o $(basename "https://dl.typesense.org/releases/${RELEASE}/typesense-server-${RELEASE}-arm64.deb") +curl -fsSL "https://dl.typesense.org/releases/${RELEASE}/typesense-server-${RELEASE}-arm64.deb" -o "/opt/typesense-server-${RELEASE}-arm64.deb" $STD apt install -y /opt/typesense-server-${RELEASE}-arm64.deb echo 'enable-cors = true' >>/etc/typesense/typesense-server.ini echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" diff --git a/install/umami-install.sh b/install/umami-install.sh index 5733f0467..e9fa625f0 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -15,21 +15,10 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y git -$STD apt-get install -y gpg -$STD apt-get install -y postgresql msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules +PG_VERSION="16" install_postgresql msg_info "Setting up postgresql" DB_NAME=umamidb @@ -41,12 +30,13 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" -echo "" >~/umami.creds -echo "Umami Database Credentials" >>~/umami.creds -echo "" >>~/umami.creds -echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>~/umami.creds -echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>~/umami.creds -echo -e "umami Database Name: \e[32m$DB_NAME\e[0m" >>~/umami.creds +{ + echo "Umami-Credentials" + echo "Umami Database User: $DB_USER" + echo "Umami Database Password: $DB_PASS" + echo "Umami Database Name: $DB_NAME" + echo "Umami Secret Key: $SECRET_KEY" +} >>~/umami.creds msg_ok "Set up postgresql" msg_info "Installing Umami (Patience)" diff --git a/install/umbrel-install.sh b/install/umbrel-install.sh deleted file mode 100644 index a48994926..000000000 --- a/install/umbrel-install.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://umbrel.com/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing Umbrel (Patience)" -DOCKER_CONFIG_PATH='/etc/docker/daemon.json' -mkdir -p $(dirname $DOCKER_CONFIG_PATH) -echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json -$STD bash <(curl -fsSL https://umbrel.sh) -systemctl daemon-reload -$STD systemctl enable --now umbrel-startup -msg_ok "Installed Umbrel" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get autoremove -$STD apt-get autoclean -msg_ok "Cleaned" diff --git a/install/umlautadaptarr-install.sh b/install/umlautadaptarr-install.sh index 62ae37a95..40a8dfd72 100644 --- a/install/umlautadaptarr-install.sh +++ b/install/umlautadaptarr-install.sh @@ -18,15 +18,15 @@ $STD curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microso $STD dpkg -i packages-microsoft-prod.deb $STD apt-get update $STD apt-get install -y \ - dotnet-sdk-8.0 \ - aspnetcore-runtime-8.0 + dotnet-sdk-8.0 \ + aspnetcore-runtime-8.0 msg_ok "Installed Dependencies" msg_info "Installing Umlautadaptarr" temp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file -unzip -qj $temp_file '*/**' -d /opt/UmlautAdaptarr +$STD unzip -j $temp_file '*/**' -d /opt/UmlautAdaptarr echo "${RELEASE}" >"/opt/UmlautAdaptarr_version.txt" msg_ok "Installation completed" diff --git a/install/unifi-install.sh b/install/unifi-install.sh index 079c32f89..c86c6e880 100644 --- a/install/unifi-install.sh +++ b/install/unifi-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y apt-transport-https -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Installing Eclipse Temurin JRE" @@ -29,7 +28,7 @@ if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then msg_ok "No AVX Support Detected" msg_info "Installing MongoDB 4.4" if ! dpkg -l | grep -q "libssl1.1"; then - curl -fsSL "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_arm64.deb" -o $(basename "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_arm64.deb") + curl -fsSL "http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_arm64.deb" -o "libssl1.1_1.1.1n-0+deb10u6_arm64.deb" $STD dpkg -i libssl1.1_1.1.1n-0+deb10u6_arm64.deb fi curl -fsSL "https://www.mongodb.org/static/pgp/server-4.4.asc" | gpg --dearmor >/usr/share/keyrings/mongodb-server-4.4.gpg diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index 7f7d470df..84d47aab0 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -16,19 +16,9 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y git $STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Installing Uptime Kuma" $STD git clone https://github.com/louislam/uptime-kuma.git diff --git a/install/urbackupserver-install.sh b/install/urbackupserver-install.sh index 998fd3309..a0732561f 100644 --- a/install/urbackupserver-install.sh +++ b/install/urbackupserver-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gnupg \ coreutils msg_ok "Installed Dependencies" diff --git a/install/victoriametrics-install.sh b/install/victoriametrics-install.sh index e8008e333..e155d59a8 100644 --- a/install/victoriametrics-install.sh +++ b/install/victoriametrics-install.sh @@ -18,8 +18,8 @@ temp_dir=$(mktemp -d) cd $temp_dir mkdir -p /opt/victoriametrics/data RELEASE=$(curl -fsSL https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/victoria-metrics-linux-arm64-v${RELEASE}.tar.gz" -o $(basename "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/victoria-metrics-linux-arm64-v${RELEASE}.tar.gz") -curl -fsSL "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/vmutils-linux-arm64-v${RELEASE}.tar.gz" -o $(basename "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/vmutils-linux-arm64-v${RELEASE}.tar.gz") +curl -fsSL "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/victoria-metrics-linux-arm64-v${RELEASE}.tar.gz" -o "victoria-metrics-linux-arm64-v${RELEASE}.tar.gz" +curl -fsSL "https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/vmutils-linux-arm64-v${RELEASE}.tar.gz" -o "vmutils-linux-arm64-v${RELEASE}.tar.gz" tar -xf victoria-metrics-linux-arm64-v${RELEASE}.tar.gz -C /opt/victoriametrics tar -xf vmutils-linux-arm64-v${RELEASE}.tar.gz -C /opt/victoriametrics chmod +x /opt/victoriametrics/* diff --git a/install/vikunja-install.sh b/install/vikunja-install.sh index 28489ea1f..f56d073d3 100644 --- a/install/vikunja-install.sh +++ b/install/vikunja-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Setup Vikunja (Patience)" cd /opt RELEASE=$(curl -fsSL https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) -curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o $(basename "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb") +curl -fsSL "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" -o vikunja-$RELEASE-amd64.deb $STD dpkg -i vikunja-$RELEASE-amd64.deb sed -i 's|^ timezone: .*| timezone: UTC|' /etc/vikunja/config.yml sed -i 's|"./vikunja.db"|"/etc/vikunja/vikunja.db"|' /etc/vikunja/config.yml diff --git a/install/wallos-install.sh b/install/wallos-install.sh index eda4de4a2..0eb91e4c9 100644 --- a/install/wallos-install.sh +++ b/install/wallos-install.sh @@ -25,8 +25,8 @@ msg_ok "Installed Dependencies" msg_info "Installing Wallos (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/ellite/Wallos/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip") -unzip -q v${RELEASE}.zip +curl -fsSL "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v${RELEASE}.zip mv Wallos-${RELEASE} /opt/wallos cd /opt/wallos mv /opt/wallos/db/wallos.empty.db /opt/wallos/db/wallos.db diff --git a/install/wastebin-install.sh b/install/wastebin-install.sh index fac364f46..adef24d42 100644 --- a/install/wastebin-install.sh +++ b/install/wastebin-install.sh @@ -13,28 +13,14 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y --no-install-recommends \ - build-essential \ - unzip \ - git \ - make \ - ca-certificates -msg_ok "Installed Dependencies" - -msg_info "Installing Rust (Patience)" -$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y -source ~/.cargo/env -msg_ok "Installed Rust" - -msg_info "Installing Wastebin (Patience)" -RELEASE=$(curl -s https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget -q "https://github.com/matze/wastebin/archive/refs/tags/${RELEASE}.zip" -unzip -q ${RELEASE}.zip -mv wastebin-${RELEASE} /opt/wastebin -rm -R ${RELEASE}.zip -cd /opt/wastebin -cargo build -q --release +msg_info "Installing Wastebin" +temp_file=$(mktemp) +RELEASE=$(curl -fsSL https://api.github.com/repos/matze/wastebin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -fsSL "https://github.com/matze/wastebin/releases/download/${RELEASE}/wastebin_${RELEASE}_aarch64-unknown-linux-musl.tar.zst" -o "$temp_file" +tar -xf $temp_file +mkdir -p /opt/wastebin +mv wastebin /opt/wastebin/ +chmod +x /opt/wastebin/wastebin mkdir -p /opt/wastebin-data cat </opt/wastebin-data/.env diff --git a/install/watcharr-install.sh b/install/watcharr-install.sh index fb20155cd..ae8219211 100644 --- a/install/watcharr-install.sh +++ b/install/watcharr-install.sh @@ -15,19 +15,11 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - gcc \ - gnupg + gcc msg_ok "Installed Dependencies" install_go - -msg_info "Setup Node.js" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Setup Node.js" +NODE_VERSION="22" install_node_and_modules msg_info "Setup Watcharr" temp_file=$(mktemp) diff --git a/install/watchyourlan-install.sh b/install/watchyourlan-install.sh index 975df2b4f..39f779d52 100644 --- a/install/watchyourlan-install.sh +++ b/install/watchyourlan-install.sh @@ -14,12 +14,12 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y {gpg,arp-scan,ieee-data,libwww-perl} +$STD apt-get install -y {arp-scan,ieee-data,libwww-perl} msg_ok "Installed Dependencies" msg_info "Installing WatchYourLAN" RELEASE=$(curl -fsSL https://api.github.com/repos/aceberg/WatchYourLAN/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d '"' -f 4) -curl -fsSL "https://github.com/aceberg/WatchYourLAN/releases/download/$RELEASE/watchyourlan_${RELEASE}_linux_arm64.deb" -o $(basename "https://github.com/aceberg/WatchYourLAN/releases/download/$RELEASE/watchyourlan_${RELEASE}_linux_arm64.deb") +curl -fsSL "https://github.com/aceberg/WatchYourLAN/releases/download/$RELEASE/watchyourlan_${RELEASE}_linux_arm64.deb" -o "watchyourlan_${RELEASE}_linux_arm64.deb" $STD dpkg -i watchyourlan_${RELEASE}_linux_arm64.deb rm watchyourlan_${RELEASE}_linux_arm64.deb mkdir /data diff --git a/install/wavelog-install.sh b/install/wavelog-install.sh index 3e93aaf0d..8e2a36e44 100644 --- a/install/wavelog-install.sh +++ b/install/wavelog-install.sh @@ -21,18 +21,20 @@ $STD apt-get install -y \ unzip msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=wavelog DB_USER=waveloguser 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;" +$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 "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" @@ -44,8 +46,8 @@ msg_ok "Set up PHP" msg_info "Installing Wavelog" RELEASE=$(curl -fsSL https://api.github.com/repos/wavelog/wavelog/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip") -unzip -q ${RELEASE}.zip +curl -fsSL "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" +$STD unzip ${RELEASE}.zip mv wavelog-${RELEASE}/ /opt/wavelog chown -R www-data:www-data /opt/wavelog/ find /opt/wavelog/ -type d -exec chmod 755 {} \; diff --git a/install/web-check-install.sh b/install/web-check-install.sh index c2d1bd5e4..6ad50f6cf 100644 --- a/install/web-check-install.sh +++ b/install/web-check-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" export DEBIAN_FRONTEND=noninteractive $STD apt-get -y install --no-install-recommends \ git \ - gnupg \ traceroute \ make \ g++ \ @@ -36,11 +35,7 @@ $STD apt-get -y install --no-install-recommends \ x11-apps msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" +NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules msg_info "Setup Python3" $STD apt-get install -y python3 @@ -57,12 +52,6 @@ $STD apt-get -y install \ lsb-release msg_ok "Installed Chromium" -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn -msg_ok "Installed Node.js" - msg_info "Setting up Chromium" /usr/bin/chromium --no-sandbox --version >/etc/chromium-version chmod 755 /usr/bin/chromium diff --git a/install/wger-install.sh b/install/wger-install.sh index fe0f6c690..69eccaabd 100644 --- a/install/wger-install.sh +++ b/install/wger-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ git \ - gnupg \ apache2 \ libapache2-mod-wsgi-py3 msg_ok "Installed Dependencies" @@ -26,17 +25,7 @@ $STD apt-get install -y python3-pip rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g yarn sass -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="yarn@latest,sass" install_node_and_modules msg_info "Setting up wger" $STD adduser wger --disabled-password --gecos "" @@ -49,7 +38,7 @@ chmod o+w /home/wger/media temp_dir=$(mktemp -d) cd $temp_dir RELEASE=$(curl -fsSL https://api.github.com/repos/wger-project/wger/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') -curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o $(basename "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz") +curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -o "$RELEASE.tar.gz" tar xzf $RELEASE.tar.gz mv wger-$RELEASE /home/wger/src cd /home/wger/src diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 86693e07d..c718ccb0f 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -24,26 +24,10 @@ $STD apt-get install -y \ make msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Setting up PostgreSQL Repository" -curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg -echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list -msg_ok "Set up PostgreSQL Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install --global yarn -$STD npm install -g node-gyp -msg_ok "Installed Node.js" +NODE_VERSION="20" NODE_MODULE="yarn@latest,node-gyp" install_node_and_modules +PG_VERSION="17" install_postgresql msg_info "Set up PostgreSQL" -$STD apt-get install -y postgresql-17 DB_NAME="wiki" DB_USER="wikijs_user" DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" diff --git a/install/wordpress-install.sh b/install/wordpress-install.sh index 214ac7128..dae1f307e 100644 --- a/install/wordpress-install.sh +++ b/install/wordpress-install.sh @@ -22,34 +22,36 @@ $STD apt-get install -y \ mariadb-server msg_ok "Installed Dependencies" +install_mariadb + msg_info "Setting up Database" DB_NAME=wordpress_db DB_USER=wordpress 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 BY '$DB_PASS';" -$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +$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 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" msg_info "Installing Wordpress (Patience)" cd /var/www/html -curl -fsSL "https://wordpress.org/latest.zip" -o $(basename "https://wordpress.org/latest.zip") -unzip -q latest.zip +curl -fsSL "https://wordpress.org/latest.zip" -o "latest.zip" +$STD unzip latest.zip chown -R www-data:www-data wordpress/ cd /var/www/html/wordpress 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" diff --git a/install/yunohost-install.sh b/install/yunohost-install.sh index f49a5f54d..b854d3a79 100644 --- a/install/yunohost-install.sh +++ b/install/yunohost-install.sh @@ -14,7 +14,6 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y gnupg $STD apt-get install -y apt-transport-https $STD apt-get install -y lsb-release $STD apt-get install -y ca-certificates diff --git a/install/zammad-install.sh b/install/zammad-install.sh index fe5fefd4d..0018d52c2 100644 --- a/install/zammad-install.sh +++ b/install/zammad-install.sh @@ -16,10 +16,8 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ git \ - gpg \ nginx \ - apt-transport-https \ - gnupg + apt-transport-https msg_ok "Installed Dependencies" msg_info "Setting up Elasticsearch" diff --git a/install/zerotier-one-install.sh b/install/zerotier-one-install.sh index a8ad6541f..941c6dac3 100644 --- a/install/zerotier-one-install.sh +++ b/install/zerotier-one-install.sh @@ -13,10 +13,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - msg_info "Setting up Zerotier-One" curl -fsSL 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/main/doc/contact%40zerotier.com.gpg' | gpg --import && if z="$(curl -fsSL 'https://install.zerotier.com/' | gpg)"; then diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index c3e21c855..f2f3070f5 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -19,30 +19,16 @@ $STD apt-get install -y \ make \ g++ \ gcc \ - ca-certificates \ - gnupg + ca-certificates msg_ok "Installed Dependencies" -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -msg_info "Installing pnpm" -$STD npm install -g pnpm -msg_ok "Installed pnpm" +NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules msg_info "Setting up Zigbee2MQTT" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip") -unzip -q ${RELEASE}.zip +curl -fsSL "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip" +$STD unzip ${RELEASE}.zip mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt cd /opt/zigbee2mqtt/data mv configuration.example.yaml configuration.yaml diff --git a/install/zipline-install.sh b/install/zipline-install.sh index 0e73f187c..4e124633b 100644 --- a/install/zipline-install.sh +++ b/install/zipline-install.sh @@ -14,23 +14,8 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - postgresql \ - gpg -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -$STD npm install -g pnpm -msg_ok "Installed Node.js" +NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules +PG_VERSION="16" install_postgresql msg_info "Setting up PostgreSQL" DB_NAME=ziplinedb @@ -42,18 +27,20 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" -echo "" >>~/zipline.creds -echo -e "Zipline Database User: $DB_USER" >>~/zipline.creds -echo -e "Zipline Database Password: $DB_PASS" >>~/zipline.creds -echo -e "Zipline Database Name: $DB_NAME" >>~/zipline.creds -echo -e "Zipline Secret: $SECRET_KEY" >>~/zipline.creds +{ + echo "Zipline-Credentials" + echo "Zipline Database User: $DB_USER" + echo "Zipline Database Password: $DB_PASS" + echo "Zipline Database Name: $DB_NAME" + echo "Zipline Secret Key: $SECRET_KEY" +} >>~/zipline.creds msg_ok "Set up PostgreSQL" msg_info "Installing Zipline (Patience)" cd /opt RELEASE=$(curl -fsSL https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip") -unzip -q v"${RELEASE}".zip +curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o "v${RELEASE}.zip" +$STD unzip v"${RELEASE}".zip mv zipline-"${RELEASE}" /opt/zipline cd /opt/zipline cat </opt/zipline/.env @@ -91,6 +78,7 @@ msg_ok "Created Service" motd_ssh customize msg_info "Cleaning up" +rm -f /opt/v${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/zitadel-install.sh b/install/zitadel-install.sh index cea45fb87..805109853 100644 --- a/install/zitadel-install.sh +++ b/install/zitadel-install.sh @@ -17,8 +17,9 @@ msg_info "Installing Dependencies (Patience)" $STD apt-get install -y ca-certificates msg_ok "Installed Dependecies" +PG_VERSION="17" PG_MODULES="common" install_postgresql + msg_info "Installing Postgresql" -$STD apt-get install -y postgresql postgresql-common DB_NAME="zitadel" DB_USER="zitadel" DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) diff --git a/install/zoraxy-install.sh b/install/zoraxy-install.sh index ba5dbdf77..d37f43f30 100644 --- a/install/zoraxy-install.sh +++ b/install/zoraxy-install.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +f#!/usr/bin/env bash # Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) @@ -15,7 +15,7 @@ update_os msg_info "Installing Zoraxy (Patience)" RELEASE=$(curl -fsSL https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_arm64" -o $(basename "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_arm64") +curl -fsSL "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_arm64" -o zoraxy_linux_arm64 mkdir -p /opt/zoraxy mv zoraxy_linux_arm64 /opt/zoraxy/zoraxy chmod +x /opt/zoraxy/zoraxy diff --git a/install/zot-registry-install.sh b/install/zot-registry-install.sh new file mode 100644 index 000000000..beaf3ea91 --- /dev/null +++ b/install/zot-registry-install.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://zotregistry.dev/ + +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 apache2-utils +msg_ok "Installed Dependencies" + +msg_info "Installing Zot Registry" +RELEASE=$(curl -fsSL https://api.github.com/repos/project-zot/zot/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -fsSL "https://github.com/project-zot/zot/releases/download/${RELEASE}/zot-linux-amd64" -o /usr/bin/zot +chmod +x /usr/bin/zot +chown root:root /usr/bin/zot +mkdir -p /etc/zot +curl -fsSL https://raw.githubusercontent.com/project-zot/zot/refs/heads/main/examples/config-ui.json -o /etc/zot/config.json +ZOTPASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD htpasswd -b -B -c /etc/zot/htpasswd admin "$ZOTPASSWORD" +{ + echo "Zot-Credentials" + echo "Zot User: admin" + echo "Zot Password: $ZOTPASSWORD" +} >>~/zot.creds +echo "${RELEASE}" >~/.${APPLICATION} +msg_ok "Installed Zot Registry" + +msg_info "Setup Service" +cat </etc/systemd/system/zot.service +[Unit] +Description=OCI Distribution Registry +Documentation=https://zotregistry.dev/ +After=network.target auditd.service local-fs.target + +[Service] +Type=simple +ExecStart=/usr/bin/zot serve /etc/zot/config.json +Restart=on-failure +User=root +LimitNOFILE=500000 +MemoryHigh=2G +MemoryMax=4G + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now zot +msg_ok "Setup Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index 92f2279a9..61d1059b6 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -18,8 +18,8 @@ mkdir -p /opt/zwave-js-ui mkdir -p /opt/zwave_store cd /opt/zwave-js-ui RELEASE=$(curl -fsSL https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL "https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip" -o $(basename "https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip") -unzip -q zwave-js-ui-${RELEASE}-linux-arm64.zip +curl -fsSL "https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip" -o "zwave-js-ui-${RELEASE}-linux-arm64.zip" +$STD unzip zwave-js-ui-${RELEASE}-linux-arm64.zip cat </opt/.env ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave_store/.config-db STORE_DIR=/opt/zwave_store diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 29becc127..5ae3b4457 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -142,7 +142,7 @@ update_os() { msg_info "Installing core dependencies" $STD apk update - $STD apk add newt curl openssh nano mc ncurses + $STD apk add newt curl openssh nano mc ncurses gpg msg_ok "Core dependencies installed" } diff --git a/misc/api.func b/misc/api.func index ffce144fa..b08c84f9e 100644 --- a/misc/api.func +++ b/misc/api.func @@ -39,9 +39,11 @@ post_to_api() { EOF ) - RESPONSE=$(curl -fsSL -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ + if [[ "$DIAGNOSTICS" == "yes" ]]; then + RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ -H "Content-Type: application/json" \ -d "$JSON_PAYLOAD") || true + fi } post_to_api_vm() { @@ -87,9 +89,11 @@ post_to_api_vm() { EOF ) - RESPONSE=$(curl -fsSL -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ + if [[ "$DIAGNOSTICS" == "yes" ]]; then + RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ -H "Content-Type: application/json" \ -d "$JSON_PAYLOAD") || true + fi } POST_UPDATE_DONE=false @@ -115,9 +119,11 @@ post_update_to_api() { EOF ) - RESPONSE=$(curl -fsSL -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ + if [[ "$DIAGNOSTICS" == "yes" ]]; then + RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ -H "Content-Type: application/json" \ -d "$JSON_PAYLOAD") || true + fi POST_UPDATE_DONE=true } diff --git a/misc/build.func b/misc/build.func index 80ed69fd9..ca9405956 100644 --- a/misc/build.func +++ b/misc/build.func @@ -378,13 +378,13 @@ write_config() { CT_TYPE="${CT_TYPE}" DISK_SIZE="${DISK_SIZE}" -CORE_COUNT="${DISK_SIZE}" +CORE_COUNT="${CORE_COUNT}" RAM_SIZE="${RAM_SIZE}" HN="${HN}" BRG="${BRG}" APT_CACHER_IP="${APT_CACHER_IP:-none}" DISABLEIP6="${DISABLEIP6}" -PW="${PW:-none}" +PW='${PW:-none}' SSH="${SSH}" SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}" VERBOSE="${VERBOSE}" @@ -396,6 +396,7 @@ SD="${SD:-none}" MAC="${MAC:-none}" NS="${NS:-none}" NET="${NET}" +FUSE="${ENABLE_FUSE}" EOF echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}" @@ -409,13 +410,13 @@ EOF CT_TYPE="${CT_TYPE}" DISK_SIZE="${DISK_SIZE}" -CORE_COUNT="${DISK_SIZE}" +CORE_COUNT="${CORE_COUNT}" RAM_SIZE="${RAM_SIZE}" HN="${HN}" BRG="${BRG}" APT_CACHER_IP="${APT_CACHER_IP:-none}" DISABLEIP6="${DISABLEIP6}" -PW="${PW:-none}" +PW='${PW:-none}' SSH="${SSH}" SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}" VERBOSE="${VERBOSE}" @@ -427,6 +428,7 @@ SD="${SD:-none}" MAC="${MAC:-none}" NS="${NS:-none}" NET="${NET}" +FUSE="${ENABLE_FUSE}" EOF echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}" @@ -794,7 +796,7 @@ advanced_settings() { echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" fi - if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE support?\nRequired for tools like rclone, mergerfs, AppImage, etc." 10 58); then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE support?\nRequired for tools like rclone, mergerfs, AppImage, etc." 10 58); then ENABLE_FUSE="yes" else ENABLE_FUSE="no" @@ -1091,6 +1093,8 @@ build_container() { else export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/install.func)" fi + + export DIAGNOSTICS="$DIAGNOSTICS" export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" @@ -1142,7 +1146,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "immich" || "$APP" == "Tdarr" || "$APP" == "Open WebUI" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then cat <>"$LXC_CONFIG" # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm @@ -1154,7 +1158,7 @@ lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,creat EOF fi else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "immich" || "$APP" == "Tdarr" || "$APP" == "Open WebUI" || "$APP" == "Unmanic" || "$APP" == "Ollama" || "$APP" == "FileFlows" ]]; then if [[ -e "/dev/dri/renderD128" ]]; then if [[ -e "/dev/dri/card0" ]]; then cat <>"$LXC_CONFIG" diff --git a/misc/config-file.func b/misc/config-file.func index 01e8af66e..efaa2de82 100644 --- a/misc/config-file.func +++ b/misc/config-file.func @@ -618,6 +618,24 @@ config_file() { fi fi + if [[ -n "$ENABLE_FUSE" ]]; then + if [[ "$ENABLE_FUSE" == "yes" ]]; then + echo -e "${FUSE}${BOLD}${DGN}Enable FUSE: ${BGN}Yes${CL}" + elif [[ "$ENABLE_FUSE" == "no" ]]; then + echo -e "${FUSE}${BOLD}${DGN}Enable FUSE: ${BGN}No${CL}" + else + msg_error "Enable FUSE needs to be 'yes' or 'no', was ${ENABLE_FUSE}" + exit + fi + else + if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "FUSE" --yesno "Enable FUSE?" 10 58); then + ENABLE_FUSE="yes" + else + ENABLE_FUSE="no" + fi + echo -e "${FUSE}${BOLD}${DGN}Enable FUSE: ${BGN}$ENABLE_FUSE${CL}" + fi + if [[ -n "${VERBOSE-}" ]]; then if [[ "$VERBOSE" == "yes" ]]; then echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}" diff --git a/misc/core.func b/misc/core.func new file mode 100644 index 000000000..cbabf2f03 --- /dev/null +++ b/misc/core.func @@ -0,0 +1,544 @@ +# Copyright (c) 2021-2025 community-scripts ORG +# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE + +# if ! declare -f wait_for >/dev/null; then +# echo "[DEBUG] Undefined function 'wait_for' used from: ${BASH_SOURCE[*]}" >&2 +# wait_for() { +# echo "[DEBUG] Fallback: wait_for called with: $*" >&2 +# true +# } +# fi + +trap 'on_error $? $LINENO' ERR +trap 'on_exit' EXIT +trap 'on_interrupt' INT +trap 'on_terminate' TERM + +if ! declare -f wait_for >/dev/null; then + wait_for() { + true + } +fi + +declare -A MSG_INFO_SHOWN=() +SPINNER_PID="" +SPINNER_ACTIVE=0 +SPINNER_MSG="" + +# ------------------------------------------------------------------------------ +# Loads core utility groups once (colors, formatting, icons, defaults). +# ------------------------------------------------------------------------------ + +[[ -n "${_CORE_FUNC_LOADED:-}" ]] && return +_CORE_FUNC_LOADED=1 + +load_functions() { + [[ -n "${__FUNCTIONS_LOADED:-}" ]] && return + __FUNCTIONS_LOADED=1 + color + formatting + icons + default_vars + set_std_mode + # add more +} + +on_error() { + local exit_code="$1" + local lineno="$2" + msg_error "Script failed at line $lineno with exit code $exit_code" + # Optionally log to your API or file here + exit "$exit_code" +} + +on_exit() { + # Always called on script exit, success or failure + cleanup_temp_files || true + msg_info "Script exited" +} + +on_interrupt() { + msg_error "Interrupted by user (CTRL+C)" + exit 130 +} + +on_terminate() { + msg_error "Terminated by signal (TERM)" + exit 143 +} + +setup_trap_abort_handling() { + trap '__handle_signal_abort SIGINT' SIGINT + trap '__handle_signal_abort SIGTERM' SIGTERM + trap '__handle_unexpected_error $?' ERR +} + +__handle_signal_abort() { + local signal="$1" + echo + [ -n "${SPINNER_PID:-}" ] && kill "$SPINNER_PID" 2>/dev/null && wait "$SPINNER_PID" 2>/dev/null + + case "$signal" in + SIGINT) + msg_error "Script aborted by user (CTRL+C)" + exit 130 + ;; + SIGTERM) + msg_error "Script terminated (SIGTERM)" + exit 143 + ;; + *) + msg_error "Script interrupted (unknown signal: $signal)" + exit 1 + ;; + esac +} + +__handle_unexpected_error() { + local exit_code="$1" + echo + [ -n "${SPINNER_PID:-}" ] && kill "$SPINNER_PID" 2>/dev/null && wait "$SPINNER_PID" 2>/dev/null + + case "$exit_code" in + 1) + msg_error "Generic error occurred (exit code 1)" + ;; + 2) + msg_error "Misuse of shell builtins (exit code 2)" + ;; + 126) + msg_error "Command invoked cannot execute (exit code 126)" + ;; + 127) + msg_error "Command not found (exit code 127)" + ;; + 128) + msg_error "Invalid exit argument (exit code 128)" + ;; + 130) + msg_error "Script aborted by user (CTRL+C)" + ;; + 143) + msg_error "Script terminated by SIGTERM" + ;; + *) + msg_error "Unexpected error occurred (exit code $exit_code)" + ;; + esac + exit "$exit_code" +} + +# ------------------------------------------------------------------------------ +# Sets ANSI color codes used for styled terminal output. +# ------------------------------------------------------------------------------ +color() { + YW=$(echo "\033[33m") + YWB=$'\e[93m' + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + CL=$(echo "\033[m") +} + +# ------------------------------------------------------------------------------ +# Defines formatting helpers like tab, bold, and line reset sequences. +# ------------------------------------------------------------------------------ +formatting() { + BFR="\\r\\033[K" + BOLD=$(echo "\033[1m") + HOLD=" " + TAB=" " + TAB3=" " +} + +# ------------------------------------------------------------------------------ +# Sets symbolic icons used throughout user feedback and prompts. +# ------------------------------------------------------------------------------ +icons() { + CM="${TAB}βœ”οΈ${TAB}" + CROSS="${TAB}βœ–οΈ${TAB}" + DNSOK="βœ”οΈ " + DNSFAIL="${TAB}βœ–οΈ${TAB}" + INFO="${TAB}πŸ’‘${TAB}${CL}" + OS="${TAB}πŸ–₯️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + CONTAINERTYPE="${TAB}πŸ“¦${TAB}${CL}" + DISKSIZE="${TAB}πŸ’Ύ${TAB}${CL}" + CPUCORE="${TAB}🧠${TAB}${CL}" + RAMSIZE="${TAB}πŸ› οΈ${TAB}${CL}" + SEARCH="${TAB}πŸ”${TAB}${CL}" + VERBOSE_CROPPED="πŸ”${TAB}" + VERIFYPW="${TAB}πŸ”${TAB}${CL}" + CONTAINERID="${TAB}πŸ†”${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + BRIDGE="${TAB}πŸŒ‰${TAB}${CL}" + NETWORK="${TAB}πŸ“‘${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DISABLEIPV6="${TAB}🚫${TAB}${CL}" + DEFAULT="${TAB}βš™οΈ${TAB}${CL}" + MACADDRESS="${TAB}πŸ”—${TAB}${CL}" + VLANTAG="${TAB}🏷️${TAB}${CL}" + ROOTSSH="${TAB}πŸ”‘${TAB}${CL}" + CREATING="${TAB}πŸš€${TAB}${CL}" + ADVANCED="${TAB}🧩${TAB}${CL}" + FUSE="${TAB}πŸ—‚οΈ${TAB}${CL}" +} + +# ------------------------------------------------------------------------------ +# Sets default retry and wait variables used for system actions. +# ------------------------------------------------------------------------------ +default_vars() { + RETRY_NUM=10 + RETRY_EVERY=3 + i=$RETRY_NUM + #[[ "${VAR_OS:-}" == "unknown" ]] +} + +# ------------------------------------------------------------------------------ +# Sets default verbose mode for script and os execution. +# ------------------------------------------------------------------------------ +set_std_mode() { + if [ "${VERBOSE:-no}" = "yes" ]; then + STD="" + else + STD="silent" + fi +} + +# Silent execution function +silent() { + "$@" >/dev/null 2>&1 +} + +# Function to download & save header files +get_header() { + local app_name=$(echo "${APP,,}" | tr -d ' ') + local app_type=${APP_TYPE:-ct} # Default 'ct' + local header_url="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/${app_type}/headers/${app_name}" + local local_header_path="/usr/local/community-scripts/headers/${app_type}/${app_name}" + + mkdir -p "$(dirname "$local_header_path")" + + if [ ! -s "$local_header_path" ]; then + if ! curl -fsSL "$header_url" -o "$local_header_path"; then + return 1 + fi + fi + + cat "$local_header_path" 2>/dev/null || true +} + +header_info() { + local app_name=$(echo "${APP,,}" | tr -d ' ') + local header_content + + header_content=$(get_header "$app_name") || header_content="" + + clear + local term_width + term_width=$(tput cols 2>/dev/null || echo 120) + + if [ -n "$header_content" ]; then + echo "$header_content" + fi +} + +# ------------------------------------------------------------------------------ +# Performs a curl request with retry logic and inline feedback. +# ------------------------------------------------------------------------------ + +run_curl() { + if [ "$VERBOSE" = "no" ]; then + $STD curl "$@" + else + curl "$@" + fi +} + +curl_handler() { + set +e + trap 'set -e' RETURN + local args=() + local url="" + local max_retries=3 + local delay=2 + local attempt=1 + local exit_code + local has_output_file=false + local result="" + + # Parse arguments + for arg in "$@"; do + if [[ "$arg" != -* && -z "$url" ]]; then + url="$arg" + fi + [[ "$arg" == "-o" || "$arg" == --output ]] && has_output_file=true + args+=("$arg") + done + + if [[ -z "$url" ]]; then + msg_error "No valid URL or option entered for curl_handler" + return 1 + fi + + $STD msg_info "Fetching: $url" + + while [[ $attempt -le $max_retries ]]; do + if $has_output_file; then + $STD run_curl "${args[@]}" + exit_code=$? + else + result=$(run_curl "${args[@]}") + exit_code=$? + fi + + if [[ $exit_code -eq 0 ]]; then + $STD msg_ok "Fetched: $url" + $has_output_file || printf '%s' "$result" + return 0 + fi + + if ((attempt >= max_retries)); then + # Read error log if it exists + if [ -s /tmp/curl_error.log ]; then + local curl_stderr + curl_stderr=$(&2 + sleep "$delay" + ((attempt++)) + done + set -e +} + +# ------------------------------------------------------------------------------ +# Handles specific curl error codes and displays descriptive messages. +# ------------------------------------------------------------------------------ +__curl_err_handler() { + local exit_code="$1" + local target="$2" + local curl_msg="$3" + + case $exit_code in + 1) msg_error "Unsupported protocol: $target" ;; + 2) msg_error "Curl init failed: $target" ;; + 3) msg_error "Malformed URL: $target" ;; + 5) msg_error "Proxy resolution failed: $target" ;; + 6) msg_error "Host resolution failed: $target" ;; + 7) msg_error "Connection failed: $target" ;; + 9) msg_error "Access denied: $target" ;; + 18) msg_error "Partial file transfer: $target" ;; + 22) msg_error "HTTP error (e.g. 400/404): $target" ;; + 23) msg_error "Write error on local system: $target" ;; + 26) msg_error "Read error from local file: $target" ;; + 28) msg_error "Timeout: $target" ;; + 35) msg_error "SSL connect error: $target" ;; + 47) msg_error "Too many redirects: $target" ;; + 51) msg_error "SSL cert verify failed: $target" ;; + 52) msg_error "Empty server response: $target" ;; + 55) msg_error "Send error: $target" ;; + 56) msg_error "Receive error: $target" ;; + 60) msg_error "SSL CA not trusted: $target" ;; + 67) msg_error "Login denied by server: $target" ;; + 78) msg_error "Remote file not found (404): $target" ;; + *) msg_error "Curl failed with code $exit_code: $target" ;; + esac + + [[ -n "$curl_msg" ]] && printf "%s\n" "$curl_msg" >&2 + exit 1 +} + +fatal() { + msg_error "$1" + kill -INT $$ +} + +# Ensure POSIX compatibility across Alpine and Debian/Ubuntu +# === Spinner Start === +# Trap cleanup on various signals +trap 'cleanup_spinner' EXIT INT TERM HUP + +spinner_frames=('β ‹' 'β ™' 'β Ή' 'β Έ' 'β Ό' 'β ΄' 'β ¦' 'β §' 'β ‡' '⠏') + +# === Spinner Start === +start_spinner() { + local msg="$1" + local spin_i=0 + local interval=0.1 + + stop_spinner + SPINNER_MSG="$msg" + SPINNER_ACTIVE=1 + + { + while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do + if [[ -t 2 ]]; then + printf "\r\e[2K%s %b" "${TAB}${spinner_frames[spin_i]}${TAB}" "${YW}${SPINNER_MSG}${CL}" >&2 + else + printf "%s...\n" "$SPINNER_MSG" >&2 + break + fi + spin_i=$(((spin_i + 1) % ${#spinner_frames[@]})) + sleep "$interval" + done + } & + + local pid=$! + if ps -p "$pid" >/dev/null 2>&1; then + SPINNER_PID="$pid" + else + SPINNER_ACTIVE=0 + SPINNER_PID="" + fi +} + +# === Spinner Stop === +stop_spinner() { + if [[ "$SPINNER_ACTIVE" -eq 1 && -n "$SPINNER_PID" ]]; then + SPINNER_ACTIVE=0 + + if kill -0 "$SPINNER_PID" 2>/dev/null; then + kill "$SPINNER_PID" 2>/dev/null || true + for _ in $(seq 1 10); do + sleep 0.05 + kill -0 "$SPINNER_PID" 2>/dev/null || break + done + fi + + if [[ "$SPINNER_PID" =~ ^[0-9]+$ ]]; then + ps -p "$SPINNER_PID" -o pid= >/dev/null 2>&1 && wait "$SPINNER_PID" 2>/dev/null || true + fi + + printf "\r\e[2K" >&2 + SPINNER_PID="" + fi +} + +cleanup_spinner() { + stop_spinner +} + +msg_info() { + local msg="$1" + [[ -z "$msg" || -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return + MSG_INFO_SHOWN["$msg"]=1 + stop_spinner + start_spinner "$msg" +} + +msg_ok() { + local msg="$1" + [[ -z "$msg" ]] && return + stop_spinner + printf "\r\e[2K%s %b\n" "$CM" "${GN}${msg}${CL}" >&2 + unset MSG_INFO_SHOWN["$msg"] +} + +msg_error() { + local msg="$1" + [[ -z "$msg" ]] && return + stop_spinner + printf "\r\e[2K%s %b\n" "$CROSS" "${RD}${msg}${CL}" >&2 +} + +msg_warn() { + local msg="$1" + [[ -z "$msg" ]] && return + stop_spinner + printf "\r\e[2K%s %b\n" "$INFO" "${YWB}${msg}${CL}" >&2 + unset MSG_INFO_SHOWN["$msg"] +} + +msg_custom() { + local symbol="${1:-"[*]"}" + local color="${2:-"\e[36m"}" # Default: Cyan + local msg="${3:-}" + + [[ -z "$msg" ]] && return + stop_spinner 2>/dev/null || true + printf "\r\e[2K%s %b\n" "$symbol" "${color}${msg}${CL:-\e[0m}" >&2 +} + +msg_progress() { + local current="$1" + local total="$2" + local label="$3" + local width=40 + local filled percent bar empty + local fill_char="#" + local empty_char="-" + + if ! [[ "$current" =~ ^[0-9]+$ ]] || ! [[ "$total" =~ ^[0-9]+$ ]] || [[ "$total" -eq 0 ]]; then + printf "\r\e[2K%s %b\n" "$CROSS" "${RD}Invalid progress input${CL}" >&2 + return + fi + + percent=$(((current * 100) / total)) + filled=$(((current * width) / total)) + empty=$((width - filled)) + + bar=$(printf "%${filled}s" | tr ' ' "$fill_char") + bar+=$(printf "%${empty}s" | tr ' ' "$empty_char") + + printf "\r\e[2K%s [%s] %3d%% %s" "${TAB}" "$bar" "$percent" "$label" >&2 + + if [[ "$current" -eq "$total" ]]; then + printf "\n" >&2 + fi +} + +run_container_safe() { + local ct="$1" + shift + local cmd="$*" + + lxc-attach -n "$ct" -- bash -euo pipefail -c " + trap 'echo Aborted in container; exit 130' SIGINT SIGTERM + $cmd + " || __handle_general_error "lxc-attach to CT $ct" +} + +check_or_create_swap() { + msg_info "Checking for active swap" + + if swapon --noheadings --show | grep -q 'swap'; then + msg_ok "Swap is active" + return 0 + fi + + msg_error "No active swap detected" + + read -p "Do you want to create a swap file? [y/N]: " create_swap + create_swap="${create_swap,,}" # to lowercase + + if [[ "$create_swap" != "y" && "$create_swap" != "yes" ]]; then + msg_info "Skipping swap file creation" + return 1 + fi + + read -p "Enter swap size in MB (e.g., 2048 for 2GB): " swap_size_mb + if ! [[ "$swap_size_mb" =~ ^[0-9]+$ ]]; then + msg_error "Invalid size input. Aborting." + return 1 + fi + + local swap_file="/swapfile" + + msg_info "Creating ${swap_size_mb}MB swap file at $swap_file" + if dd if=/dev/zero of="$swap_file" bs=1M count="$swap_size_mb" status=progress && + chmod 600 "$swap_file" && + mkswap "$swap_file" && + swapon "$swap_file"; then + msg_ok "Swap file created and activated successfully" + else + msg_error "Failed to create or activate swap" + return 1 + fi +} diff --git a/misc/install.func b/misc/install.func index 63967265c..4b1ace5cb 100644 --- a/misc/install.func +++ b/misc/install.func @@ -76,7 +76,7 @@ error_handler() { local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message" - if [[ "$line_number" -eq 50 ]]; then + if [[ "$line_number" -eq 51 ]]; then echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" post_update_to_api "failed" "No error message, script ran in silent mode" else diff --git a/misc/tools.func b/misc/tools.func index b533ffc31..f636db10d 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -32,6 +32,15 @@ install_node_and_modules() { NEED_NODE_INSTALL=true fi + if ! command -v jq &>/dev/null; then + $STD msg_info "Installing jq..." + $STD apt-get update -qq &>/dev/null + $STD apt-get install -y jq &>/dev/null || { + msg_error "Failed to install jq" + return 1 + } + fi + # Install Node.js if required if [[ "$NEED_NODE_INSTALL" == true ]]; then $STD apt-get purge -y nodejs @@ -113,20 +122,22 @@ install_node_and_modules() { } # ------------------------------------------------------------------------------ -# Installs or upgrades PostgreSQL and performs data migration. +# Installs or upgrades PostgreSQL and optional extensions/modules. # # 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 @@ -136,10 +147,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" - return + else + msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION" + NEED_PG_INSTALL=true 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 @@ -170,20 +181,34 @@ install_postgresql() { $STD apt-get install -y "postgresql-${PG_VERSION}" "postgresql-client-${PG_VERSION}" if [[ -n "$CURRENT_PG_VERSION" ]]; then - $STD msg_info "Removing old PostgreSQL $CURRENT_PG_VERSION packages" + 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 - $STD msg_info "Starting PostgreSQL $PG_VERSION" + msg_info "Starting PostgreSQL $PG_VERSION" systemctl enable -q --now postgresql if [[ -n "$CURRENT_PG_VERSION" ]]; then - $STD msg_info "Restoring dumped data" + 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 } # ------------------------------------------------------------------------------ @@ -202,6 +227,7 @@ install_mariadb() { local MARIADB_VERSION="${MARIADB_VERSION:-latest}" local DISTRO_CODENAME DISTRO_CODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)" + CURRENT_OS="$(awk -F= '/^ID=/{print $2}' /etc/os-release)" # grab dynamic latest LTS version if [[ "$MARIADB_VERSION" == "latest" ]]; then @@ -221,7 +247,7 @@ install_mariadb() { local CURRENT_VERSION="" if command -v mariadb >/dev/null; then - CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')" + CURRENT_VERSION=$(mariadb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') fi if [[ "$CURRENT_VERSION" == "$MARIADB_VERSION" ]]; then @@ -245,7 +271,7 @@ install_mariadb() { curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg - echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/debian ${DISTRO_CODENAME} main" \ + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mirror.mariadb.org/repo/${MARIADB_VERSION}/${CURRENT_OS} ${DISTRO_CODENAME} main" \ >/etc/apt/sources.list.d/mariadb.list $STD apt-get update @@ -277,28 +303,34 @@ install_mysql() { msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION" NEED_INSTALL=true else - msg_ok "MySQL $MYSQL_VERSION already installed" + # Check for patch-level updates + if apt list --upgradable 2>/dev/null | grep -q '^mysql-server/'; then + msg_info "MySQL $CURRENT_VERSION available for upgrade" + $STD apt-get update + $STD apt-get install --only-upgrade -y mysql-server + msg_ok "MySQL upgraded" + fi + return fi else - msg_info "MySQL not found, installing version $MYSQL_VERSION" + msg_info "Installing MySQL $MYSQL_VERSION" NEED_INSTALL=true fi if [[ "$NEED_INSTALL" == true ]]; then - msg_info "Removing conflicting MySQL packages" $STD systemctl stop mysql >/dev/null 2>&1 || true - $STD apt-get purge -y 'mysql*' + $STD apt-get purge -y "^mysql-server.*" "^mysql-client.*" "^mysql-common.*" || true rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg - msg_info "Setting up MySQL APT Repository" + local DISTRO_CODENAME DISTRO_CODENAME="$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)" - curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg + curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /etc/apt/trusted.gpg.d/mysql.gpg echo "deb [signed-by=/etc/apt/trusted.gpg.d/mysql.gpg] https://repo.mysql.com/apt/debian/ ${DISTRO_CODENAME} mysql-${MYSQL_VERSION}" \ >/etc/apt/sources.list.d/mysql.list + export DEBIAN_FRONTEND=noninteractive $STD apt-get update $STD apt-get install -y mysql-server - msg_ok "Installed MySQL $MYSQL_VERSION" fi } @@ -355,8 +387,10 @@ install_php() { CURRENT_PHP="" fi - if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then - $STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION" + 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 [[ ! -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 @@ -373,6 +407,9 @@ 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 @@ -439,7 +476,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 + php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1 if [[ $? -ne 0 ]]; then msg_error "Failed to install Composer" @@ -447,7 +484,9 @@ install_composer() { fi chmod +x "$COMPOSER_BIN" - msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')" + composer diagnose >/dev/null 2>&1 + msg_ok "Setup Composer" + #msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')" } # ------------------------------------------------------------------------------ @@ -580,11 +619,21 @@ install_java() { install_mongodb() { local MONGO_VERSION="${MONGO_VERSION:-8.0}" - local DISTRO_CODENAME - DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release) + 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 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) @@ -598,7 +647,6 @@ 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 @@ -609,15 +657,17 @@ 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] https://repo.mongodb.org/apt/debian ${DISTRO_CODENAME}/mongodb-org/${MONGO_VERSION} main" \ + echo "deb [signed-by=/etc/apt/trusted.gpg.d/mongodb-${MONGO_VERSION}.gpg] ${MONGO_BASE_URL} ${DISTRO_CODENAME}/mongodb-org/${MONGO_VERSION} main" \ >"$REPO_LIST" - $STD apt-get update + $STD apt-get update || { + msg_error "APT update failed β€” invalid MongoDB repo for ${DISTRO_ID}-${DISTRO_CODENAME}?" + return 1 + } + $STD apt-get install -y mongodb-org - # Sicherstellen, dass Datenverzeichnis intakt bleibt mkdir -p /var/lib/mongodb chown -R mongodb:mongodb /var/lib/mongodb @@ -641,7 +691,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 @@ -1203,3 +1254,100 @@ 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 +} diff --git a/tools/headers/pve-privilege-converter b/tools/headers/pve-privilege-converter new file mode 100644 index 000000000..47d0c3657 --- /dev/null +++ b/tools/headers/pve-privilege-converter @@ -0,0 +1,6 @@ + ____ _ ________ ____ _ _ __ ______ __ + / __ \ | / / ____/ / __ \_____(_) __(_) /__ ____ ____ / ____/___ ____ _ _____ _____/ /____ _____ + / /_/ / | / / __/______/ /_/ / ___/ / | / / / / _ \/ __ `/ _ \______/ / / __ \/ __ \ | / / _ \/ ___/ __/ _ \/ ___/ + / ____/| |/ / /__/_____/ ____/ / / /| |/ / / / __/ /_/ / __/_____/ /___/ /_/ / / / / |/ / __/ / / /_/ __/ / +/_/ |___/_____/ /_/ /_/ /_/ |___/_/_/\___/\__, /\___/ \____/\____/_/ /_/|___/\___/_/ \__/\___/_/ + /____/ diff --git a/tools/pve/pve-privilege-converter.sh b/tools/pve/pve-privilege-converter.sh new file mode 100644 index 000000000..f26f02ab1 --- /dev/null +++ b/tools/pve/pve-privilege-converter.sh @@ -0,0 +1,196 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk +# Adapted from onethree7 (https://github.com/onethree7/proxmox-lxc-privilege-converter) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +if ! command -v curl >/dev/null 2>&1; then + printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2 + apt-get update >/dev/null 2>&1 + apt-get install -y curl >/dev/null 2>&1 +fi +source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func) +load_functions + +set -euo pipefail +shopt -s inherit_errexit nullglob + +APP="PVE-Privilege-Converter" +APP_TYPE="tools" +header_info "$APP" + +check_root() { + if [[ $EUID -ne 0 ]]; then + msg_error "Script must be run as root" + exit 1 + fi +} + +select_target_storage_and_container_id() { + echo -e "\nSelect target storage for restored container:\n" + mapfile -t target_storages < <(pvesm status --content images | awk 'NR > 1 {print $1}') + for i in "${!target_storages[@]}"; do + printf "%s) %s\n" "$((i + 1))" "${target_storages[$i]}" + done + + while true; do + read -rp "Enter number of target storage: " choice + if [[ "$choice" =~ ^[0-9]+$ ]] && ((choice >= 1 && choice <= ${#target_storages[@]})); then + TARGET_STORAGE="${target_storages[$((choice - 1))]}" + break + else + echo "Invalid selection. Try again." + fi + done + + next_free_id=$(pvesh get /cluster/nextid 2>/dev/null || echo 999) + [[ "$next_free_id" =~ ^[0-9]+$ ]] || next_free_id=999 + + echo "" + read -rp "Suggested next free container ID: $next_free_id. Enter new container ID [default: $next_free_id]: " NEW_CONTAINER_ID + NEW_CONTAINER_ID="${NEW_CONTAINER_ID:-$next_free_id}" +} + +select_container() { + mapfile -t lxc_list_raw < <(pct list | awk 'NR > 1 {print $1, $3}') + lxc_list=() + for entry in "${lxc_list_raw[@]}"; do + [[ -n "$entry" ]] && lxc_list+=("$entry") + done + + if [[ ${#lxc_list[@]} -eq 0 ]]; then + msg_error "No containers found" + exit 1 + fi + + PS3="Enter number of container to convert: " + select opt in "${lxc_list[@]}"; do + if [[ -n "$opt" ]]; then + read -r CONTAINER_ID CONTAINER_NAME <<<"$opt" + CONTAINER_NAME="${CONTAINER_NAME:-}" + break + else + echo "Invalid selection. Try again." + fi + done +} + +select_backup_storage() { + echo -e "Select backup storage (temporary vzdump location):" + mapfile -t backup_storages < <(pvesm status --content backup | awk 'NR > 1 {print $1}') + local PS3="Enter number of backup storage: " + + select opt in "${backup_storages[@]}"; do + if [[ -n "$opt" ]]; then + BACKUP_STORAGE="$opt" + break + else + echo "Invalid selection. Try again." + fi + done +} + +backup_container() { + msg_custom "πŸ“¦" "\e[36m" "Backing up container $CONTAINER_ID" + vzdump_output=$(mktemp) + vzdump "$CONTAINER_ID" --compress zstd --storage "$BACKUP_STORAGE" --mode snapshot | tee "$vzdump_output" + BACKUP_PATH=$(awk '/tar.zst/ {print $NF}' "$vzdump_output" | tr -d "'") + if [ -z "$BACKUP_PATH" ] || ! grep -q "Backup job finished successfully" "$vzdump_output"; then + rm "$vzdump_output" + msg_error "Backup failed" + exit 1 + fi + rm "$vzdump_output" + msg_ok "Backup complete: $BACKUP_PATH" +} + +perform_conversion() { + if pct config "$CONTAINER_ID" | grep -q 'unprivileged: 1'; then + UNPRIVILEGED=true + else + UNPRIVILEGED=false + fi + + msg_custom "πŸ› οΈ" "\e[36m" "Restoring as $(if $UNPRIVILEGED; then echo privileged; else echo unprivileged; fi) container" + restore_opts=("$NEW_CONTAINER_ID" "$BACKUP_PATH" --storage "$TARGET_STORAGE") + if $UNPRIVILEGED; then + restore_opts+=(--unprivileged false) + else + restore_opts+=(--unprivileged) + fi + + if pct restore "${restore_opts[@]}" -ignore-unpack-errors 1; then + msg_ok "Conversion successful" + else + msg_error "Conversion failed" + exit 1 + fi +} + +manage_states() { + read -rp "Shutdown source and start new container? [Y/n]: " answer + answer=${answer:-Y} + if [[ $answer =~ ^[Yy] ]]; then + pct shutdown "$CONTAINER_ID" + for i in {1..36}; do + sleep 5 + ! pct status "$CONTAINER_ID" | grep -q running && break + done + if pct status "$CONTAINER_ID" | grep -q running; then + read -rp "Timeout reached. Force shutdown? [Y/n]: " force + if [[ ${force:-Y} =~ ^[Yy] ]]; then + pkill -9 -f "lxc-start -F -n $CONTAINER_ID" + fi + fi + pct start "$NEW_CONTAINER_ID" + msg_ok "New container started" + else + msg_custom "ℹ️" "\e[36m" "Skipped container state change" + fi +} + +cleanup_files() { + read -rp "Delete backup archive? [$BACKUP_PATH] [Y/n]: " cleanup + if [[ ${cleanup:-Y} =~ ^[Yy] ]]; then + rm -f "$BACKUP_PATH" && msg_ok "Removed backup archive" + else + msg_custom "πŸ’Ύ" "\e[36m" "Retained backup archive" + fi +} + +summary() { + local conversion="Unknown" + if [[ -n "${UNPRIVILEGED:-}" ]]; then + if $UNPRIVILEGED; then + conversion="Unprivileged β†’ Privileged" + else + conversion="Privileged β†’ Unprivileged" + fi + fi + + echo + msg_custom "πŸ“„" "\e[36m" "Summary:" + msg_custom " " "\e[36m" "$(printf "%-22s %s" "Original Container:" "$CONTAINER_ID ($CONTAINER_NAME)")" + msg_custom " " "\e[36m" "$(printf "%-22s %s" "Backup Storage:" "$BACKUP_STORAGE")" + msg_custom " " "\e[36m" "$(printf "%-22s %s" "Target Storage:" "$TARGET_STORAGE")" + msg_custom " " "\e[36m" "$(printf "%-22s %s" "Backup Path:" "$BACKUP_PATH")" + msg_custom " " "\e[36m" "$(printf "%-22s %s" "New Container ID:" "$NEW_CONTAINER_ID")" + msg_custom " " "\e[36m" "$(printf "%-22s %s" "Privilege Conversion:" "$conversion")" + echo +} + +main() { + header_info + check_root + select_container + select_backup_storage + backup_container + select_target_storage_and_container_id + perform_conversion + manage_states + cleanup_files + summary +} + +main diff --git a/vm/docker-vm.sh b/vm/docker-vm.sh index 92194d17a..3eab0aac9 100644 --- a/vm/docker-vm.sh +++ b/vm/docker-vm.sh @@ -22,10 +22,10 @@ echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" METHOD="" -NSAPP="debian12vm" +NSAPP="docker-vm" var_os="debian" var_version="12" -DISK_SIZE="8G" +DISK_SIZE="10G" YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -107,7 +107,7 @@ function cleanup() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Debian 12 VM" --yesno "This will create a New Debian 12 VM. Proceed?" 10 58; then +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Docker VM" --yesno "This will create a New Docker VM. Proceed?" 10 58; then : else header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit @@ -206,7 +206,7 @@ function default_settings() { echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}Default${CL}" echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}" - echo -e "${CREATING}${BOLD}${DGN}Creating a Debian 12 VM using the above default settings${CL}" + echo -e "${CREATING}${BOLD}${DGN}Creating a Docker VM using the above default settings${CL}" } function advanced_settings() { @@ -276,9 +276,9 @@ function advanced_settings() { exit-script fi - if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 debian --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 docker --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z $VM_NAME ]; then - HN="debian" + HN="docker" echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" else HN=$(echo ${VM_NAME,,} | tr -d ' ') @@ -382,8 +382,8 @@ function advanced_settings() { START_VM="no" fi - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Debian 12 VM?" --no-button Do-Over 10 58); then - echo -e "${CREATING}${BOLD}${DGN}Creating a Debian 12 VM using the above advanced settings${CL}" + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Docker VM?" --no-button Do-Over 10 58); then + echo -e "${CREATING}${BOLD}${DGN}Creating a Docker VM using the above advanced settings${CL}" else header_info echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}" @@ -468,9 +468,12 @@ for i in {0,1}; do eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} done -msg_info "Installing Pre-Requisite libguestfs-tools onto Host" -apt-get -qq update && apt-get -qq install libguestfs-tools lsb-release -y >/dev/null -msg_ok "Installed libguestfs-tools successfully" +if ! command -v virt-customize &>/dev/null; then + msg_info "Installing Pre-Requisite libguestfs-tools onto Host" + apt-get -qq update >/dev/null + apt-get -qq install libguestfs-tools lsb-release -y >/dev/null + msg_ok "Installed libguestfs-tools successfully" +fi msg_info "Adding Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image" virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca-certificates,curl,gnupg,software-properties-common,lsb-release >/dev/null && @@ -478,9 +481,16 @@ virt-customize -q -a "${FILE}" --install qemu-guest-agent,apt-transport-https,ca virt-customize -q -a "${FILE}" --run-command "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable' > /etc/apt/sources.list.d/docker.list" >/dev/null && virt-customize -q -a "${FILE}" --run-command "apt-get update -qq && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin" >/dev/null && virt-customize -q -a "${FILE}" --run-command "systemctl enable docker" >/dev/null && + virt-customize -q -a "${FILE}" --hostname "${HN}" >/dev/null && virt-customize -q -a "${FILE}" --run-command "echo -n > /etc/machine-id" >/dev/null msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image successfully" +msg_info "Expanding root partition to use full disk space" +qemu-img create -f qcow2 expanded.qcow2 ${DISK_SIZE} >/dev/null 2>&1 +virt-resize --expand /dev/sda1 ${FILE} expanded.qcow2 >/dev/null 2>&1 +mv expanded.qcow2 ${FILE} >/dev/null 2>&1 +msg_ok "Expanded image to full size" + msg_info "Creating a Docker VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci @@ -526,14 +536,6 @@ EOF ) qm set "$VMID" -description "$DESCRIPTION" >/dev/null -if [ -n "$DISK_SIZE" ]; then - msg_info "Resizing disk to $DISK_SIZE GB" - qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null -else - msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" - qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null -fi - msg_ok "Created a Docker VM ${CL}${BL}(${HN})" if [ "$START_VM" == "yes" ]; then msg_info "Starting Docker VM" diff --git a/vm/openwrt.sh b/vm/openwrt.sh index 9d91c1d19..6d832e5a9 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -252,7 +252,7 @@ function default_settings() { echo -e "${DGN}Using LAN NETMASK: ${BGN}${LAN_NETMASK}${CL}" echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" - echo -e "${BL}Creating a OpenWRT VM using the above default settings${CL}" + echo -e "${BL}Creating a OpenWrt VM using the above default settings${CL}" } function advanced_settings() { @@ -510,7 +510,7 @@ qm set $VMID \ -tags community-script \ -description "
- # OpenWRT + # OpenWrt
" >/dev/null diff --git a/vm/umbrel-os-vm.sh b/vm/umbrel-os-vm.sh new file mode 100644 index 000000000..38abfba57 --- /dev/null +++ b/vm/umbrel-os-vm.sh @@ -0,0 +1,540 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + +function header_info { + clear + cat <<"EOF" + __ __ __ __ ____ _____ _ ____ ___ + / / / /___ ___ / /_ ________ / / / __ \/ ___/ | | / / |/ / + / / / / __ `__ \/ __ \/ ___/ _ \/ / / / / /\__ \ | | / / /|_/ / +/ /_/ / / / / / / /_/ / / / __/ / / /_/ /___/ / | |/ / / / / +\____/_/ /_/ /_/_.___/_/ \___/_/ \____//____/ |___/_/ /_/ + +EOF +} +header_info +echo -e "\n Loading..." +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="umbrel-os-vm" +var_os="umbrel-os" +var_version="n.d." + +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") + +CL=$(echo "\033[m") +BOLD=$(echo "\033[1m") +BFR="\\r\\033[K" +HOLD=" " +TAB=" " + +CM="${TAB}βœ”οΈ${TAB}${CL}" +CROSS="${TAB}βœ–οΈ${TAB}${CL}" +INFO="${TAB}πŸ’‘${TAB}${CL}" +OS="${TAB}πŸ–₯️${TAB}${CL}" +CONTAINERTYPE="${TAB}πŸ“¦${TAB}${CL}" +DISKSIZE="${TAB}πŸ’Ύ${TAB}${CL}" +CPUCORE="${TAB}🧠${TAB}${CL}" +RAMSIZE="${TAB}πŸ› οΈ${TAB}${CL}" +CONTAINERID="${TAB}πŸ†”${TAB}${CL}" +HOSTNAME="${TAB}🏠${TAB}${CL}" +BRIDGE="${TAB}πŸŒ‰${TAB}${CL}" +GATEWAY="${TAB}🌐${TAB}${CL}" +DEFAULT="${TAB}βš™οΈ${TAB}${CL}" +MACADDRESS="${TAB}πŸ”—${TAB}${CL}" +VLANTAG="${TAB}🏷️${TAB}${CL}" +CREATING="${TAB}πŸš€${TAB}${CL}" +ADVANCED="${TAB}🧩${TAB}${CL}" + +THIN="discard=on,ssd=1," +set -e +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + post_update_to_api "failed" "${command}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function get_valid_nextid() { + local try_id + try_id=$(pvesh get /cluster/nextid) + while true; do + if [ -f "/etc/pve/qemu-server/${try_id}.conf" ] || [ -f "/etc/pve/lxc/${try_id}.conf" ]; then + try_id=$((try_id + 1)) + continue + fi + if lvs --noheadings -o lv_name | grep -qE "(^|[-_])${try_id}($|[-_])"; then + try_id=$((try_id + 1)) + continue + fi + break + done + echo "$try_id" +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + post_update_to_api "done" "none" + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Umbrel OS VM" --yesno "This will create a New Umbrel OS VM. Proceed?" 10 58; then + : +else + header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR}${CM}${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR}${CROSS}${RD}${msg}${CL}" +} + +function check_root() { + if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then + clear + msg_error "Please run this script as root." + echo -e "\nExiting..." + sleep 2 + exit + fi +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then + msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n" + echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "\n${CROSS}${RD}User exited script${CL}\n" + exit +} + +function default_settings() { + VMID=$(get_valid_nextid) + FORMAT=",efitype=4m" + MACHINE="" + DISK_SIZE="32G" + DISK_CACHE="" + HN="umbrelos" + CPU_TYPE="" + CORE_COUNT="2" + RAM_SIZE="4096" + BRG="vmbr0" + MAC="$GEN_MAC" + VLAN="" + MTU="" + START_VM="yes" + METHOD="default" + echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}" + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}${HN}${CL}" + echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}${CL}" + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}${BRG}${CL}" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}${MAC}${CL}" + echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}Default${CL}" + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}" + echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}" + echo -e "${CREATING}${BOLD}${DGN}Creating a Umbrel OS VM using the above default settings${CL}" +} + +function advanced_settings() { + METHOD="advanced" + [ -z "${VMID:-}" ] && VMID=$(get_valid_nextid) + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $VMID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID=$(get_valid_nextid) + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GiB (e.g., 10, 20)" 8 58 "$DISK_SIZE" --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ') + if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then + DISK_SIZE="${DISK_SIZE}G" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}" + elif [[ "$DISK_SIZE" =~ ^[0-9]+G$ ]]; then + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}" + else + echo -e "${DISKSIZE}${BOLD}${RD}Invalid Disk Size. Please use a number (e.g., 10 or 10G).${CL}" + exit-script + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 umbrelos --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="umbrelos" + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + else + echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}" + fi + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="2048" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}" + else + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}" + fi + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + else + echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}" + fi + else + exit-script + fi + + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}" + else + MAC="$MAC1" + echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}" + fi + else + exit-script + fi + + if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VLAN1 ]; then + VLAN1="Default" + VLAN="" + echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}" + else + VLAN=",tag=$VLAN1" + echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}" + fi + else + exit-script + fi + + if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MTU1 ]; then + MTU1="Default" + MTU="" + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + else + MTU=",mtu=$MTU1" + echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}" + fi + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then + echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}" + START_VM="yes" + else + echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}no${CL}" + START_VM="no" + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Umbrel OS VM?" --no-button Do-Over 10 58); then + echo -e "${CREATING}${BOLD}${DGN}Creating a Umbrel OS VM using the above advanced settings${CL}" + else + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +check_root +arch_check +pve_check +ssh_check +start_script + +post_to_api_vm +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool would you like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for $APP" +URL="https://download.umbrel.com/release/latest/umbrelos-amd64.img.xz" +FILE="$(basename "$URL")" +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +curl -f#SL -o "$FILE" "$URL" +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +if ! command -v pv &>/dev/null; then + apt-get update &>/dev/null && apt-get install -y pv &>/dev/null +fi + +msg_info "Decompressing $FILE with progress${CL}\n" +FILE_IMG="${FILE%.xz}" +SIZE=$(xz --robot -l "$FILE" | awk -F '\t' '/^totals/ { print $5 }') &>/dev/null +xz -dc "$FILE" | pv -s "$SIZE" -N "Extracting" >"$FILE_IMG" +msg_ok "Decompressed to ${CL}${BL}${FILE%.xz}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1,2}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a Umbrel OS VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci >/dev/null +pvesm alloc $STORAGE $VMID $DISK0 4M >/dev/null +qm importdisk $VMID ${FILE_IMG} $STORAGE ${DISK_IMPORT:-} >/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=${DISK_SIZE} \ + -boot order=scsi0 \ + -serial0 socket >/dev/null +qm set $VMID --agent enabled=1 >/dev/null + +DESCRIPTION=$( + cat < + + Logo + + +

Umbrel OS VM

+ +

+ + spend Coffee + +

+ + + + GitHub + + + + Discussions + + + + Issues + + +EOF +) +qm set "$VMID" -description "$DESCRIPTION" >/dev/null + +if [ -n "$DISK_SIZE" ]; then + msg_info "Resizing disk to $DISK_SIZE GB" + qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null +else + msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB" + qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null +fi + +msg_ok "Created a Umbrel OS VM ${CL}${BL}(${HN})" +if [ "$START_VM" == "yes" ]; then + msg_info "Starting Umbrel OS VM" + qm start $VMID + msg_ok "Started Umbrel OS VM" +fi +post_update_to_api "done" "none" +msg_ok "Completed Successfully!\n"