mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-04 20:33:24 +01:00
Compare commits
1 Commits
CrazyWolf1
...
remove_php
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6439d40b8 |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -391,22 +391,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 2026-01-31
|
|
||||||
|
|
||||||
## 2026-01-30
|
## 2026-01-30
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- languagetool ([#11370](https://github.com/community-scripts/ProxmoxVE/pull/11370))
|
|
||||||
- Ampache ([#11369](https://github.com/community-scripts/ProxmoxVE/pull/11369))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🔧 Refactor
|
|
||||||
|
|
||||||
- Refactor: remove redundant PHP_MODULE entries in several scripts [@MickLesk](https://github.com/MickLesk) ([#11362](https://github.com/community-scripts/ProxmoxVE/pull/11362))
|
|
||||||
- Refactor: Koillection [@MickLesk](https://github.com/MickLesk) ([#11361](https://github.com/community-scripts/ProxmoxVE/pull/11361))
|
|
||||||
|
|
||||||
### 💾 Core
|
### 💾 Core
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
- #### 🐞 Bug Fixes
|
||||||
@@ -415,7 +401,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
- #### ✨ New Features
|
- #### ✨ New Features
|
||||||
|
|
||||||
- [tools] Add `fetch_and_deploy_from_url()` [@tremor021](https://github.com/tremor021) ([#11376](https://github.com/community-scripts/ProxmoxVE/pull/11376))
|
|
||||||
- core: php - improve module handling and prevent installation failures [@MickLesk](https://github.com/MickLesk) ([#11358](https://github.com/community-scripts/ProxmoxVE/pull/11358))
|
- core: php - improve module handling and prevent installation failures [@MickLesk](https://github.com/MickLesk) ([#11358](https://github.com/community-scripts/ProxmoxVE/pull/11358))
|
||||||
|
|
||||||
## 2026-01-29
|
## 2026-01-29
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (Canbiz)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/ampache/ampache
|
|
||||||
|
|
||||||
APP="Ampache"
|
|
||||||
var_tags="${var_tags:-music}"
|
|
||||||
var_disk="${var_disk:-5}"
|
|
||||||
var_cpu="${var_cpu:-4}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
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/ampache ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if check_for_gh_release "Ampache" "ampache/ampache"; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl stop apache2
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Creating Backup"
|
|
||||||
cp /opt/ampache/config/ampache.cfg.php /tmp/ampache.cfg.php.backup
|
|
||||||
cp /opt/ampache/public/rest/.htaccess /tmp/ampache_rest.htaccess.backup
|
|
||||||
cp /opt/ampache/public/play/.htaccess /tmp/ampache_play.htaccess.backup
|
|
||||||
rm -rf /opt/ampache_backup
|
|
||||||
mv /opt/ampache /opt/ampache_backup
|
|
||||||
msg_ok "Created Backup"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "Ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
|
|
||||||
|
|
||||||
msg_info "Restoring Backup"
|
|
||||||
cp /tmp/ampache.cfg.php.backup /opt/ampache/config/ampache.cfg.php
|
|
||||||
cp /tmp/ampache_rest.htaccess.backup /opt/ampache/public/rest/.htaccess
|
|
||||||
cp /tmp/ampache_play.htaccess.backup /opt/ampache/public/play/.htaccess
|
|
||||||
chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess
|
|
||||||
chown -R www-data:www-data /opt/ampache
|
|
||||||
rm -f /tmp/ampache*.backup
|
|
||||||
msg_ok "Restored Configuration"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
systemctl start apache2
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
msg_custom "⚠️" "${YW}" "Complete database update by visiting: http://${LOCAL_IP}/update.php"
|
|
||||||
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}/install.php${CL}"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
___ __
|
|
||||||
/ | ____ ___ ____ ____ ______/ /_ ___
|
|
||||||
/ /| | / __ `__ \/ __ \/ __ `/ ___/ __ \/ _ \
|
|
||||||
/ ___ |/ / / / / / /_/ / /_/ / /__/ / / / __/
|
|
||||||
/_/ |_/_/ /_/ /_/ .___/\__,_/\___/_/ /_/\___/
|
|
||||||
/_/
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
__ ______ __
|
|
||||||
/ / ____ _____ ____ ___ ______ _____ ____/_ __/___ ____ / /
|
|
||||||
/ / / __ `/ __ \/ __ `/ / / / __ `/ __ `/ _ \/ / / __ \/ __ \/ /
|
|
||||||
/ /___/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / __/ / / /_/ / /_/ / /
|
|
||||||
/_____/\__,_/_/ /_/\__, /\__,_/\__,_/\__, /\___/_/ \____/\____/_/
|
|
||||||
/____/ /____/
|
|
||||||
@@ -31,8 +31,8 @@ function update_script() {
|
|||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop apache2
|
systemctl stop apache2
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
|
PHP_VERSION="8.5" PHP_APACHE="YES" PHP_MODULE="apcu,ctype,dom,fileinfo,iconv,pgsql" setup_php
|
||||||
|
|
||||||
msg_info "Creating a backup"
|
msg_info "Creating a backup"
|
||||||
mv /opt/koillection/ /opt/koillection-backup
|
mv /opt/koillection/ /opt/koillection-backup
|
||||||
@@ -44,28 +44,15 @@ function update_script() {
|
|||||||
cd /opt/koillection
|
cd /opt/koillection
|
||||||
cp -r /opt/koillection-backup/.env.local /opt/koillection
|
cp -r /opt/koillection-backup/.env.local /opt/koillection
|
||||||
cp -r /opt/koillection-backup/public/uploads/. /opt/koillection/public/uploads/
|
cp -r /opt/koillection-backup/public/uploads/. /opt/koillection/public/uploads/
|
||||||
|
|
||||||
# Ensure APP_RUNTIME is in .env.local for CLI commands (upgrades from older versions)
|
|
||||||
if ! grep -q "APP_RUNTIME" /opt/koillection/.env.local 2>/dev/null; then
|
|
||||||
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >> /opt/koillection/.env.local
|
|
||||||
fi
|
|
||||||
|
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
export APP_RUNTIME='Symfony\Component\Runtime\SymfonyRuntime'
|
|
||||||
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
|
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
|
||||||
$STD php bin/console doctrine:migrations:migrate --no-interaction
|
$STD php bin/console doctrine:migrations:migrate --no-interaction
|
||||||
$STD php bin/console app:translations:dump
|
$STD php bin/console app:translations:dump
|
||||||
cd assets/
|
cd assets/
|
||||||
$STD yarn install
|
$STD yarn install
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
mkdir -p /opt/koillection/public/uploads
|
|
||||||
chown -R www-data:www-data /opt/koillection/public/uploads
|
chown -R www-data:www-data /opt/koillection/public/uploads
|
||||||
rm -r /opt/koillection-backup
|
rm -r /opt/koillection-backup
|
||||||
|
|
||||||
# Ensure APP_RUNTIME is set in Apache config (for upgrades from older versions)
|
|
||||||
if ! grep -q "APP_RUNTIME" /etc/apache2/sites-available/koillection.conf 2>/dev/null; then
|
|
||||||
sed -i '/<VirtualHost/a\ SetEnv APP_RUNTIME "Symfony\\Component\\Runtime\\SymfonyRuntime"' /etc/apache2/sites-available/koillection.conf
|
|
||||||
fi
|
|
||||||
msg_ok "Updated Koillection"
|
msg_ok "Updated Koillection"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://languagetool.org/
|
|
||||||
|
|
||||||
APP="LanguageTool"
|
|
||||||
var_tags="${var_tags:-spellcheck}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-4096}"
|
|
||||||
var_disk="${var_disk:-16}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
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/LanguageTool ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://languagetool.org/download/ | grep -oP 'LanguageTool-\K[0-9]+\.[0-9]+(\.[0-9]+)?(?=\.zip)' | sort -V | tail -n1)
|
|
||||||
if [[ "${RELEASE}" != "$(cat ~/.languagetool 2>/dev/null)" ]] || [[ ! -f ~/.languagetool ]]; then
|
|
||||||
msg_info "Stopping Service"
|
|
||||||
systemctl stop language-tool
|
|
||||||
msg_ok "Stopped Service"
|
|
||||||
|
|
||||||
msg_info "Creating Backup"
|
|
||||||
cp /opt/LanguageTool/server.properties /opt/server.properties
|
|
||||||
msg_ok "Created Backup"
|
|
||||||
|
|
||||||
msg_info "Updating LanguageTool"
|
|
||||||
rm -rf /opt/LanguageTool
|
|
||||||
download_file "https://languagetool.org/download/LanguageTool-stable.zip" /tmp/LanguageTool-stable.zip
|
|
||||||
unzip -q /tmp/LanguageTool-stable.zip -d /opt
|
|
||||||
mv /opt/LanguageTool-*/ /opt/LanguageTool/
|
|
||||||
mv /opt/server.properties /opt/LanguageTool/server.properties
|
|
||||||
rm -f /tmp/LanguageTool-stable.zip
|
|
||||||
echo "${RELEASE}" >~/.languagetool
|
|
||||||
msg_ok "Updated LanguageTool"
|
|
||||||
|
|
||||||
msg_info "Starting Service"
|
|
||||||
systemctl start language-tool
|
|
||||||
msg_ok "Started Service"
|
|
||||||
msg_ok "Updated successfuly!"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!"
|
|
||||||
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}:8081/v2${CL}"
|
|
||||||
@@ -29,8 +29,6 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ensure_dependencies git
|
|
||||||
|
|
||||||
if check_for_gh_release "yubal" "guillevc/yubal"; then
|
if check_for_gh_release "yubal" "guillevc/yubal"; then
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop yubal
|
systemctl stop yubal
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Ampache",
|
|
||||||
"slug": "ampache",
|
|
||||||
"categories": [
|
|
||||||
13
|
|
||||||
],
|
|
||||||
"date_created": "2026-01-30",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 80,
|
|
||||||
"documentation": "https://github.com/ampache/ampache/wiki",
|
|
||||||
"website": "https://ampache.org/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/ampache.webp",
|
|
||||||
"config_path": "/opt/ampache/config/ampache.cfg.php",
|
|
||||||
"description": "Ampache is a web-based audio streaming application and file manager that allows you to access your music & videos from anywhere. It features a powerful music catalog, multiple user support, transcoding, streaming, and more.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/ampache.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 4,
|
|
||||||
"ram": 2048,
|
|
||||||
"hdd": 5,
|
|
||||||
"os": "debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "Complete the web-based setup at http://IP/install.php",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Database credentials are stored in `~/ampache.creds` - use only the MySQL username and password from this file",
|
|
||||||
"type": "info"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "During installation, only check 'Create Tables' - leave 'Create Database' and 'Create Database User' unchecked",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"generated": "2026-01-31T18:07:59Z",
|
"generated": "2026-01-30T06:16:23Z",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"slug": "2fauth",
|
"slug": "2fauth",
|
||||||
@@ -29,13 +29,6 @@
|
|||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2025-03-20T03:06:11Z"
|
"date": "2025-03-20T03:06:11Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"slug": "ampache",
|
|
||||||
"repo": "ampache/ampache",
|
|
||||||
"version": "7.8.0",
|
|
||||||
"pinned": false,
|
|
||||||
"date": "2025-12-22T04:23:45Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"slug": "argus",
|
"slug": "argus",
|
||||||
"repo": "release-argus/Argus",
|
"repo": "release-argus/Argus",
|
||||||
@@ -60,9 +53,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "autobrr",
|
"slug": "autobrr",
|
||||||
"repo": "autobrr/autobrr",
|
"repo": "autobrr/autobrr",
|
||||||
"version": "v1.72.1",
|
"version": "v1.72.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T12:57:58Z"
|
"date": "2026-01-27T20:53:54Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "autocaliweb",
|
"slug": "autocaliweb",
|
||||||
@@ -109,9 +102,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "bentopdf",
|
"slug": "bentopdf",
|
||||||
"repo": "alam00000/bentopdf",
|
"repo": "alam00000/bentopdf",
|
||||||
"version": "v2.0.0",
|
"version": "v1.16.1",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T10:13:47Z"
|
"date": "2026-01-26T08:27:11Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "beszel",
|
"slug": "beszel",
|
||||||
@@ -242,9 +235,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "discopanel",
|
"slug": "discopanel",
|
||||||
"repo": "nickheyer/discopanel",
|
"repo": "nickheyer/discopanel",
|
||||||
"version": "v1.0.31",
|
"version": "v1.0.29",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T18:30:38Z"
|
"date": "2026-01-30T04:58:19Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "dispatcharr",
|
"slug": "dispatcharr",
|
||||||
@@ -375,9 +368,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "ghostfolio",
|
"slug": "ghostfolio",
|
||||||
"repo": "ghostfolio/ghostfolio",
|
"repo": "ghostfolio/ghostfolio",
|
||||||
"version": "2.234.0",
|
"version": "2.233.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T19:00:22Z"
|
"date": "2026-01-23T18:41:45Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "gitea",
|
"slug": "gitea",
|
||||||
@@ -410,9 +403,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "gokapi",
|
"slug": "gokapi",
|
||||||
"repo": "Forceu/Gokapi",
|
"repo": "Forceu/Gokapi",
|
||||||
"version": "v2.2.1",
|
"version": "v2.2.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T10:26:26Z"
|
"date": "2026-01-28T23:59:22Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "gotify",
|
"slug": "gotify",
|
||||||
@@ -480,16 +473,16 @@
|
|||||||
{
|
{
|
||||||
"slug": "homarr",
|
"slug": "homarr",
|
||||||
"repo": "homarr-labs/homarr",
|
"repo": "homarr-labs/homarr",
|
||||||
"version": "v1.52.0",
|
"version": "v1.51.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T19:41:22Z"
|
"date": "2026-01-23T19:29:49Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "homebox",
|
"slug": "homebox",
|
||||||
"repo": "sysadminsmedia/homebox",
|
"repo": "sysadminsmedia/homebox",
|
||||||
"version": "v0.23.0",
|
"version": "v0.22.3",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T17:41:01Z"
|
"date": "2025-12-26T22:31:20Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "homepage",
|
"slug": "homepage",
|
||||||
@@ -515,9 +508,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "huntarr",
|
"slug": "huntarr",
|
||||||
"repo": "plexguide/Huntarr.io",
|
"repo": "plexguide/Huntarr.io",
|
||||||
"version": "9.1.3",
|
"version": "9.0.5",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T21:38:18Z"
|
"date": "2026-01-26T03:34:21Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "immich",
|
"slug": "immich",
|
||||||
@@ -543,16 +536,16 @@
|
|||||||
{
|
{
|
||||||
"slug": "invoiceninja",
|
"slug": "invoiceninja",
|
||||||
"repo": "invoiceninja/invoiceninja",
|
"repo": "invoiceninja/invoiceninja",
|
||||||
"version": "v5.12.51",
|
"version": "v5.12.50",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T03:58:30Z"
|
"date": "2026-01-26T05:28:47Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "jackett",
|
"slug": "jackett",
|
||||||
"repo": "Jackett/Jackett",
|
"repo": "Jackett/Jackett",
|
||||||
"version": "v0.24.993",
|
"version": "v0.24.988",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T05:55:28Z"
|
"date": "2026-01-30T05:55:43Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "joplin-server",
|
"slug": "joplin-server",
|
||||||
@@ -760,9 +753,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "mediamtx",
|
"slug": "mediamtx",
|
||||||
"repo": "bluenviron/mediamtx",
|
"repo": "bluenviron/mediamtx",
|
||||||
"version": "v1.16.0",
|
"version": "v1.15.6",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T15:38:51Z"
|
"date": "2025-12-28T16:38:35Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "meilisearch",
|
"slug": "meilisearch",
|
||||||
@@ -774,9 +767,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "memos",
|
"slug": "memos",
|
||||||
"repo": "usememos/memos",
|
"repo": "usememos/memos",
|
||||||
"version": "v0.26.0",
|
"version": "v0.25.3",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T15:28:09Z"
|
"date": "2025-11-25T15:40:41Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "metube",
|
"slug": "metube",
|
||||||
@@ -949,9 +942,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "paperless-ngx",
|
"slug": "paperless-ngx",
|
||||||
"repo": "paperless-ngx/paperless-ngx",
|
"repo": "paperless-ngx/paperless-ngx",
|
||||||
"version": "v2.20.6",
|
"version": "v2.20.5",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T07:30:27Z"
|
"date": "2026-01-21T00:12:33Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "patchmon",
|
"slug": "patchmon",
|
||||||
@@ -1138,9 +1131,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "rclone",
|
"slug": "rclone",
|
||||||
"repo": "rclone/rclone",
|
"repo": "rclone/rclone",
|
||||||
"version": "v1.73.0",
|
"version": "v1.72.1",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T22:12:03Z"
|
"date": "2025-12-10T14:55:44Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "rdtclient",
|
"slug": "rdtclient",
|
||||||
@@ -1243,9 +1236,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "snowshare",
|
"slug": "snowshare",
|
||||||
"repo": "TuroYT/snowshare",
|
"repo": "TuroYT/snowshare",
|
||||||
"version": "v1.2.12",
|
"version": "v1.2.11",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T13:35:56Z"
|
"date": "2026-01-22T13:26:11Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "sonarr",
|
"slug": "sonarr",
|
||||||
@@ -1299,9 +1292,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "tandoor",
|
"slug": "tandoor",
|
||||||
"repo": "TandoorRecipes/recipes",
|
"repo": "TandoorRecipes/recipes",
|
||||||
"version": "2.4.1",
|
"version": "2.4.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T06:52:26Z"
|
"date": "2026-01-28T17:07:16Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "tasmoadmin",
|
"slug": "tasmoadmin",
|
||||||
@@ -1397,9 +1390,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "trip",
|
"slug": "trip",
|
||||||
"repo": "itskovacs/TRIP",
|
"repo": "itskovacs/TRIP",
|
||||||
"version": "1.38.0",
|
"version": "1.37.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-31T15:56:30Z"
|
"date": "2026-01-28T22:19:14Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "tududi",
|
"slug": "tududi",
|
||||||
@@ -1411,9 +1404,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "tunarr",
|
"slug": "tunarr",
|
||||||
"repo": "chrisbenincasa/tunarr",
|
"repo": "chrisbenincasa/tunarr",
|
||||||
"version": "v1.1.11",
|
"version": "v1.1.10",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T22:34:30Z"
|
"date": "2026-01-30T02:10:02Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "uhf",
|
"slug": "uhf",
|
||||||
@@ -1572,9 +1565,9 @@
|
|||||||
{
|
{
|
||||||
"slug": "zitadel",
|
"slug": "zitadel",
|
||||||
"repo": "zitadel/zitadel",
|
"repo": "zitadel/zitadel",
|
||||||
"version": "v4.10.1",
|
"version": "v4.10.0",
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
"date": "2026-01-30T06:52:53Z"
|
"date": "2026-01-23T13:17:07Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"slug": "zoraxy",
|
"slug": "zoraxy",
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "LanguageTool",
|
|
||||||
"slug": "languagetool",
|
|
||||||
"categories": [
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"date_created": "2026-01-30",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 8081,
|
|
||||||
"documentation": "https://dev.languagetool.org/",
|
|
||||||
"config_path": "/opt/LanguageTool/server.properties",
|
|
||||||
"website": "https://languagetool.org/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/languagetool.webp",
|
|
||||||
"description": "LanguageTool is an Open Source proofreading software for English, Spanish, French, German, Portuguese, Polish, Dutch, and more than 20 other languages. It finds many errors that a simple spell checker cannot detect.",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/languagetool.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 4096,
|
|
||||||
"hdd": 16,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "13"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": null,
|
|
||||||
"password": null
|
|
||||||
},
|
|
||||||
"notes": [
|
|
||||||
{
|
|
||||||
"text": "API is available at `http://<LXC_IP>:8081/v2`.",
|
|
||||||
"type": "info"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (Canbiz)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/ampache/ampache
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
flac \
|
|
||||||
vorbis-tools \
|
|
||||||
lame \
|
|
||||||
ffmpeg \
|
|
||||||
inotify-tools \
|
|
||||||
libavcodec-extra \
|
|
||||||
libmp3lame-dev \
|
|
||||||
libtheora-dev \
|
|
||||||
libvorbis-dev \
|
|
||||||
libvpx-dev
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
|
|
||||||
setup_mariadb
|
|
||||||
MARIADB_DB_USER="ampache" MARIADB_DB_NAME="ampache" setup_mariadb_db
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "ampache" "ampache/ampache" "prebuild" "latest" "/opt/ampache" "ampache-*_all_php8.4.zip"
|
|
||||||
|
|
||||||
msg_info "Setting up Ampache"
|
|
||||||
rm -rf /var/www/html
|
|
||||||
ln -s /opt/ampache/public /var/www/html
|
|
||||||
mv /opt/ampache/public/rest/.htaccess.dist /opt/ampache/public/rest/.htaccess
|
|
||||||
mv /opt/ampache/public/play/.htaccess.dist /opt/ampache/public/play/.htaccess
|
|
||||||
cp /opt/ampache/config/ampache.cfg.php.dist /opt/ampache/config/ampache.cfg.php
|
|
||||||
chmod 664 /opt/ampache/public/rest/.htaccess /opt/ampache/public/play/.htaccess
|
|
||||||
msg_ok "Set up Ampache"
|
|
||||||
|
|
||||||
msg_info "Configuring Database Connection"
|
|
||||||
sed -i -e 's|^database_hostname = .*|database_hostname = "localhost"|' \
|
|
||||||
-e 's|^database_name = .*|database_name = "ampache"|' \
|
|
||||||
-e 's|^database_username = .*|database_username = "ampache"|' \
|
|
||||||
-e "s|^database_password = .*|database_password = \"${MARIADB_DB_PASS}\"|" /opt/ampache/config/ampache.cfg.php
|
|
||||||
chown -R www-data:www-data /opt/ampache
|
|
||||||
msg_ok "Configured Database Connection"
|
|
||||||
|
|
||||||
msg_info "Importing Database Schema"
|
|
||||||
mariadb -u ampache -p"${MARIADB_DB_PASS}" ampache </opt/ampache/resources/sql/ampache.sql
|
|
||||||
msg_ok "Imported Database Schema"
|
|
||||||
|
|
||||||
msg_info "Configuring PHP"
|
|
||||||
sed -i -e 's/upload_max_filesize = .*/upload_max_filesize = 100M/' \
|
|
||||||
-e 's/post_max_size = .*/post_max_size = 100M/' \
|
|
||||||
-e 's/max_execution_time = .*/max_execution_time = 600/' \
|
|
||||||
-e 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.4/apache2/php.ini
|
|
||||||
$STD a2enmod rewrite
|
|
||||||
$STD systemctl restart apache2
|
|
||||||
msg_ok "Configured PHP"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -13,11 +13,24 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
|
PHP_VERSION="8.5" PHP_APACHE="YES" PHP_MODULE="apcu,ctype,dom,fileinfo,iconv,pgsql" setup_php
|
||||||
setup_composer
|
setup_composer
|
||||||
PG_DB_NAME="koillection" PG_DB_USER="koillection" setup_postgresql_db
|
|
||||||
|
msg_info "Setting up PostgreSQL"
|
||||||
|
DB_NAME=koillection
|
||||||
|
DB_USER=koillection
|
||||||
|
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 "Koillection Credentials"
|
||||||
|
echo "Koillection Database User: $DB_USER"
|
||||||
|
echo "Koillection Database Password: $DB_PASS"
|
||||||
|
echo "Koillection Database Name: $DB_NAME"
|
||||||
|
} >>~/koillection.creds
|
||||||
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "koillection" "benjaminjonard/koillection" "tarball"
|
fetch_and_deploy_gh_release "koillection" "benjaminjonard/koillection" "tarball"
|
||||||
|
|
||||||
@@ -28,20 +41,17 @@ APP_SECRET=$(openssl rand -base64 32)
|
|||||||
sed -i -e "s|^APP_ENV=.*|APP_ENV=prod|" \
|
sed -i -e "s|^APP_ENV=.*|APP_ENV=prod|" \
|
||||||
-e "s|^APP_DEBUG=.*|APP_DEBUG=0|" \
|
-e "s|^APP_DEBUG=.*|APP_DEBUG=0|" \
|
||||||
-e "s|^APP_SECRET=.*|APP_SECRET=${APP_SECRET}|" \
|
-e "s|^APP_SECRET=.*|APP_SECRET=${APP_SECRET}|" \
|
||||||
-e "s|^DB_NAME=.*|DB_NAME=${PG_DB_NAME}|" \
|
-e "s|^DB_NAME=.*|DB_NAME=${DB_NAME}|" \
|
||||||
-e "s|^DB_USER=.*|DB_USER=${PG_DB_USER}|" \
|
-e "s|^DB_USER=.*|DB_USER=${DB_USER}|" \
|
||||||
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" \
|
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASS}|" \
|
||||||
/opt/koillection/.env.local
|
/opt/koillection/.env.local
|
||||||
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >> /opt/koillection/.env.local
|
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
export APP_RUNTIME='Symfony\Component\Runtime\SymfonyRuntime'
|
|
||||||
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
|
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
|
||||||
$STD php bin/console doctrine:migrations:migrate --no-interaction
|
$STD php bin/console doctrine:migrations:migrate --no-interaction
|
||||||
$STD php bin/console app:translations:dump
|
$STD php bin/console app:translations:dump
|
||||||
cd assets/
|
cd assets/
|
||||||
$STD yarn install
|
$STD yarn install
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
mkdir -p /opt/koillection/public/uploads
|
|
||||||
chown -R www-data:www-data /opt/koillection/public/uploads
|
chown -R www-data:www-data /opt/koillection/public/uploads
|
||||||
msg_ok "Configured Koillection"
|
msg_ok "Configured Koillection"
|
||||||
|
|
||||||
@@ -50,7 +60,6 @@ cat <<EOF >/etc/apache2/sites-available/koillection.conf
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName koillection
|
ServerName koillection
|
||||||
DocumentRoot /opt/koillection/public
|
DocumentRoot /opt/koillection/public
|
||||||
SetEnv APP_RUNTIME "Symfony\\Component\\Runtime\\SymfonyRuntime"
|
|
||||||
<Directory /opt/koillection/public>
|
<Directory /opt/koillection/public>
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: Slaviša Arežina (tremor021)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://languagetool.org/
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
$STD apt install -y fasttext
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
|
|
||||||
JAVA_VERSION="21" setup_java
|
|
||||||
|
|
||||||
msg_info "Setting up LanguageTool"
|
|
||||||
RELEASE=$(curl -fsSL https://languagetool.org/download/ | grep -oP 'LanguageTool-\K[0-9]+\.[0-9]+(\.[0-9]+)?(?=\.zip)' | sort -V | tail -n1)
|
|
||||||
download_file "https://languagetool.org/download/LanguageTool-stable.zip" /tmp/LanguageTool-stable.zip
|
|
||||||
unzip -q /tmp/LanguageTool-stable.zip -d /opt
|
|
||||||
mv /opt/LanguageTool-*/ /opt/LanguageTool/
|
|
||||||
download_file "https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin" /opt/lid.176.bin
|
|
||||||
rm -f /tmp/LanguageTool-stable.zip
|
|
||||||
msg_ok "Setup LanguageTool"
|
|
||||||
|
|
||||||
ngram_dir=""
|
|
||||||
lang_code=""
|
|
||||||
max_attempts=3
|
|
||||||
attempt=0
|
|
||||||
|
|
||||||
while [[ $attempt -lt $max_attempts ]]; do
|
|
||||||
read -r -p "${TAB3}Enter language code (en, de, es, fr, nl) to download ngrams or press ENTER to skip: " lang_code
|
|
||||||
|
|
||||||
if [[ -z "$lang_code" ]]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$lang_code" =~ [[:space:]] ]]; then
|
|
||||||
((attempt++))
|
|
||||||
remaining=$((max_attempts - attempt))
|
|
||||||
if [[ $remaining -gt 0 ]]; then
|
|
||||||
msg_error "Please enter only ONE language code. You have $remaining attempt(s) remaining."
|
|
||||||
else
|
|
||||||
msg_error "Maximum attempts reached. Continuing without ngrams."
|
|
||||||
lang_code=""
|
|
||||||
fi
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
break
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -n "$lang_code" ]]; then
|
|
||||||
if [[ "$lang_code" =~ ^(en|de|es|fr|nl)$ ]]; then
|
|
||||||
msg_info "Searching for $lang_code ngrams..."
|
|
||||||
filename=$(curl -fsSL https://languagetool.org/download/ngram-data/ | grep -oP "ngrams-${lang_code}-[0-9]+\.zip" | sort -uV | tail -n1)
|
|
||||||
|
|
||||||
if [[ -n "$filename" ]]; then
|
|
||||||
msg_info "Downloading $filename"
|
|
||||||
download_file "https://languagetool.org/download/ngram-data/${filename}" "/tmp/${filename}"
|
|
||||||
|
|
||||||
mkdir -p /opt/ngrams
|
|
||||||
msg_info "Extracting $lang_code ngrams to /opt/ngrams"
|
|
||||||
unzip -q "/tmp/${filename}" -d /opt/ngrams
|
|
||||||
rm "/tmp/${filename}"
|
|
||||||
|
|
||||||
ngram_dir="/opt/ngrams"
|
|
||||||
msg_ok "Installed $lang_code ngrams"
|
|
||||||
else
|
|
||||||
msg_info "No ngram file found for ${lang_code}"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
msg_error "Invalid language code: $lang_code"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<EOF >/opt/LanguageTool/server.properties
|
|
||||||
fasttextModel=/opt/lid.176.bin
|
|
||||||
fasttextBinary=/usr/bin/fasttext
|
|
||||||
EOF
|
|
||||||
if [[ -n "$ngram_dir" ]]; then
|
|
||||||
echo "languageModel=/opt/ngrams" >> /opt/LanguageTool/server.properties
|
|
||||||
fi
|
|
||||||
echo "${RELEASE}" >~/.languagetool
|
|
||||||
msg_ok "Setup LanguageTool"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<'EOF' >/etc/systemd/system/language-tool.service
|
|
||||||
[Unit]
|
|
||||||
Description=LanguageTool Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
WorkingDirectory=/opt/LanguageTool
|
|
||||||
ExecStart=java -cp languagetool-server.jar org.languagetool.server.HTTPServer --config server.properties --public --allow-origin "*"
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now language-tool
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -19,8 +19,7 @@ $STD apt install -y \
|
|||||||
libssl-dev \
|
libssl-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
ffmpeg \
|
ffmpeg
|
||||||
git
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Bun"
|
msg_info "Installing Bun"
|
||||||
|
|||||||
135
misc/tools.func
135
misc/tools.func
@@ -6246,138 +6246,3 @@ EOF
|
|||||||
|
|
||||||
msg_ok "Docker setup completed"
|
msg_ok "Docker setup completed"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
# Fetch and deploy from URL
|
|
||||||
# Downloads an archive (zip, tar.gz, or .deb) from a URL and extracts/installs it
|
|
||||||
#
|
|
||||||
# Usage: fetch_and_deploy_from_url "url" "directory"
|
|
||||||
# url - URL to the archive (zip, tar.gz, or .deb)
|
|
||||||
# directory - Destination path where the archive will be extracted
|
|
||||||
# (not used for .deb packages)
|
|
||||||
#
|
|
||||||
# Examples:
|
|
||||||
# fetch_and_deploy_from_url "https://example.com/app.tar.gz" "/opt/myapp"
|
|
||||||
# fetch_and_deploy_from_url "https://example.com/app.zip" "/opt/myapp"
|
|
||||||
# fetch_and_deploy_from_url "https://example.com/package.deb" ""
|
|
||||||
# ------------------------------------------------------------------------------
|
|
||||||
function fetch_and_deploy_from_url() {
|
|
||||||
local url="$1"
|
|
||||||
local directory="$2"
|
|
||||||
|
|
||||||
if [[ -z "$url" ]]; then
|
|
||||||
msg_error "URL parameter is required"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
local filename="${url##*/}"
|
|
||||||
|
|
||||||
local archive_type="zip"
|
|
||||||
if [[ "$filename" == *.tar.gz || "$filename" == *.tgz ]]; then
|
|
||||||
archive_type="tar"
|
|
||||||
elif [[ "$filename" == *.deb ]]; then
|
|
||||||
archive_type="deb"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Downloading from $url"
|
|
||||||
|
|
||||||
local tmpdir
|
|
||||||
tmpdir=$(mktemp -d) || {
|
|
||||||
msg_error "Failed to create temporary directory"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
curl -fsSL -o "$tmpdir/$filename" "$url" || {
|
|
||||||
msg_error "Download failed: $url"
|
|
||||||
rm -rf "$tmpdir"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ "$archive_type" == "deb" ]]; then
|
|
||||||
msg_info "Installing .deb package"
|
|
||||||
|
|
||||||
chmod 644 "$tmpdir/$filename"
|
|
||||||
$STD apt install -y "$tmpdir/$filename" || {
|
|
||||||
$STD dpkg -i "$tmpdir/$filename" || {
|
|
||||||
msg_error "Both apt and dpkg installation failed"
|
|
||||||
rm -rf "$tmpdir"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rm -rf "$tmpdir"
|
|
||||||
msg_ok "Successfully installed .deb package"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$directory" ]]; then
|
|
||||||
msg_error "Directory parameter is required for archive extraction"
|
|
||||||
rm -rf "$tmpdir"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Extracting archive to $directory"
|
|
||||||
|
|
||||||
mkdir -p "$directory"
|
|
||||||
|
|
||||||
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
|
|
||||||
rm -rf "${directory:?}/"*
|
|
||||||
fi
|
|
||||||
|
|
||||||
local unpack_tmp
|
|
||||||
unpack_tmp=$(mktemp -d)
|
|
||||||
|
|
||||||
if [[ "$archive_type" == "zip" ]]; then
|
|
||||||
ensure_dependencies unzip
|
|
||||||
unzip -q "$tmpdir/$filename" -d "$unpack_tmp" || {
|
|
||||||
msg_error "Failed to extract ZIP archive"
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
elif [[ "$archive_type" == "tar" ]]; then
|
|
||||||
tar --no-same-owner -xf "$tmpdir/$filename" -C "$unpack_tmp" || {
|
|
||||||
msg_error "Failed to extract TAR archive"
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
local top_entries
|
|
||||||
top_entries=$(find "$unpack_tmp" -mindepth 1 -maxdepth 1)
|
|
||||||
|
|
||||||
if [[ "$(echo "$top_entries" | wc -l)" -eq 1 && -d "$top_entries" ]]; then
|
|
||||||
local inner_dir="$top_entries"
|
|
||||||
shopt -s dotglob nullglob
|
|
||||||
if compgen -G "$inner_dir/*" >/dev/null; then
|
|
||||||
cp -r "$inner_dir"/* "$directory/" || {
|
|
||||||
msg_error "Failed to copy contents from $inner_dir to $directory"
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
else
|
|
||||||
msg_error "Inner directory is empty: $inner_dir"
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
shopt -u dotglob nullglob
|
|
||||||
else
|
|
||||||
shopt -s dotglob nullglob
|
|
||||||
if compgen -G "$unpack_tmp/*" >/dev/null; then
|
|
||||||
cp -r "$unpack_tmp"/* "$directory/" || {
|
|
||||||
msg_error "Failed to copy contents to $directory"
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
else
|
|
||||||
msg_error "Unpacked archive is empty"
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
shopt -u dotglob nullglob
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf "$tmpdir" "$unpack_tmp"
|
|
||||||
msg_ok "Successfully deployed archive to $directory"
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user