mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-01 11:37:38 +00:00
Compare commits
23 Commits
2025-04-25
...
2025-04-28
Author | SHA1 | Date | |
---|---|---|---|
b5fdb94246 | |||
129698dd3d | |||
77997d558c | |||
d65d4edea5 | |||
60c480042c | |||
956c13fa89 | |||
3aee31007a | |||
b82e988837 | |||
5cf162a3c9 | |||
ce76ebc68f | |||
cbe8e2f1b7 | |||
50c9a0e8f1 | |||
246c6e950d | |||
04d6171cba | |||
9556d63890 | |||
b26fbd0d70 | |||
50aa00109a | |||
c0398ef3b8 | |||
2676a48985 | |||
e8ff2fed45 | |||
65c674b4c1 | |||
6bb97836b6 | |||
89bef0fb41 |
58
CHANGELOG.md
58
CHANGELOG.md
@ -14,6 +14,64 @@ 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-04-28
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- umlautadaptarr ([#4093](https://github.com/community-scripts/ProxmoxVE/pull/4093))
|
||||
- documenso ([#4080](https://github.com/community-scripts/ProxmoxVE/pull/4080))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fstrim: cancel/no whiptail support [@PonyXplosion](https://github.com/PonyXplosion) ([#4101](https://github.com/community-scripts/ProxmoxVE/pull/4101))
|
||||
- clean-lxc.sh: cancel/no whiptail support [@PonyXplosion](https://github.com/PonyXplosion) ([#4102](https://github.com/community-scripts/ProxmoxVE/pull/4102))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Make apt-cacher-ng a client of its own server [@pgcudahy](https://github.com/pgcudahy) ([#4092](https://github.com/community-scripts/ProxmoxVE/pull/4092))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Add: tools.func [@MickLesk](https://github.com/MickLesk) ([#4100](https://github.com/community-scripts/ProxmoxVE/pull/4100))
|
||||
|
||||
- #### 💾 Core
|
||||
|
||||
- core: remove unneeded logging [@MickLesk](https://github.com/MickLesk) ([#4103](https://github.com/community-scripts/ProxmoxVE/pull/4103))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Website: Fix frontend path in footer [@tremor021](https://github.com/tremor021) ([#4108](https://github.com/community-scripts/ProxmoxVE/pull/4108))
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- GoMFT: Move configuration info into config_path [@tremor021](https://github.com/tremor021) ([#4106](https://github.com/community-scripts/ProxmoxVE/pull/4106))
|
||||
|
||||
## 2025-04-27
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Re-Add DeamonSync Package [@MickLesk](https://github.com/MickLesk) ([#4079](https://github.com/community-scripts/ProxmoxVE/pull/4079))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- add default configuration file location for Caddy LXC [@aly-yvette](https://github.com/aly-yvette) ([#4074](https://github.com/community-scripts/ProxmoxVE/pull/4074))
|
||||
|
||||
## 2025-04-26
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Element Synapse: Fix install script cd command error [@thegeorgeliu](https://github.com/thegeorgeliu) ([#4066](https://github.com/community-scripts/ProxmoxVE/pull/4066))
|
||||
|
||||
## 2025-04-25
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
@ -33,6 +33,13 @@ function update_script() {
|
||||
systemctl stop commafeed
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
if ! [[ $(dpkg -s rsync 2>/dev/null) ]]; then
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y rsync
|
||||
msg_ok "Installed Dependencies"
|
||||
fi
|
||||
|
||||
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
|
||||
|
72
ct/documenso.sh
Normal file
72
ct/documenso.sh
Normal file
@ -0,0 +1,72 @@
|
||||
#!/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://github.com/documenso/documenso
|
||||
|
||||
APP="Documenso"
|
||||
var_tags="${var_tags:-document}"
|
||||
var_disk="${var_disk:-12}"
|
||||
var_cpu="${var_cpu:-6}"
|
||||
var_ram="${var_ram:-6144}"
|
||||
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/documenso ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/documenso/documenso/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 documenso
|
||||
msg_ok "${APP} Stopped"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cp /opt/documenso/.env /opt/
|
||||
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
|
||||
mv documenso-${RELEASE} /opt/documenso
|
||||
cd /opt/documenso
|
||||
mv /opt/.env /opt/documenso/.env
|
||||
$STD npm install
|
||||
$STD npm run build:web
|
||||
$STD npm run prisma:migrate-deploy
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start documenso
|
||||
msg_ok "Started ${APP}"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
msg_ok "Cleaned"
|
||||
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}:3000${CL}"
|
6
ct/headers/documenso
Normal file
6
ct/headers/documenso
Normal file
@ -0,0 +1,6 @@
|
||||
____
|
||||
/ __ \____ _______ ______ ___ ___ ____ _________
|
||||
/ / / / __ \/ ___/ / / / __ `__ \/ _ \/ __ \/ ___/ __ \
|
||||
/ /_/ / /_/ / /__/ /_/ / / / / / / __/ / / (__ ) /_/ /
|
||||
/_____/\____/\___/\__,_/_/ /_/ /_/\___/_/ /_/____/\____/
|
||||
|
6
ct/headers/umlautadaptarr
Normal file
6
ct/headers/umlautadaptarr
Normal file
@ -0,0 +1,6 @@
|
||||
__ __ __ __ ___ __ __
|
||||
/ / / /___ ___ / /___ ___ __/ /_/ | ____/ /___ _____ / /_____ ___________
|
||||
/ / / / __ `__ \/ / __ `/ / / / __/ /| |/ __ / __ `/ __ \/ __/ __ `/ ___/ ___/
|
||||
/ /_/ / / / / / / / /_/ / /_/ / /_/ ___ / /_/ / /_/ / /_/ / /_/ /_/ / / / /
|
||||
\____/_/ /_/ /_/_/\__,_/\__,_/\__/_/ |_\__,_/\__,_/ .___/\__/\__,_/_/ /_/
|
||||
/_/
|
@ -54,10 +54,15 @@ function update_script() {
|
||||
mv karakeep-"${RELEASE}" /opt/karakeep
|
||||
cd /opt/karakeep/apps/web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||
$STD pnpm build
|
||||
cd /opt/karakeep/apps/workers
|
||||
$STD pnpm install --frozen-lockfile
|
||||
cd /opt/karakeep/apps/cli
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm build
|
||||
cd /opt/karakeep/apps/mcp
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm build
|
||||
export DATA_DIR=/opt/karakeep_data
|
||||
cd /opt/karakeep/packages/db
|
||||
$STD pnpm migrate
|
||||
|
58
ct/umlautadaptarr.sh
Normal file
58
ct/umlautadaptarr.sh
Normal file
@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/refs/heads/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: elvito
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/PCJones/UmlautAdaptarr
|
||||
|
||||
APP="UmlautAdaptarr"
|
||||
var_tags="arr"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/UmlautAdaptarr ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/PCJones/Umlautadaptarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||
if [[ ! -f /opt/UmlautAdaptarr_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/UmlautAdaptarr_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop umlautadaptarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "https://github.com/PCJones/Umlautadaptarr/releases/download/${RELEASE}/linux-x64.zip" -o $temp_file
|
||||
$STD unzip -u $temp_file '*/**' -d /opt/UmlautAdaptarr
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start umlautadaptarr
|
||||
msg_ok "Started Service"
|
||||
msg_ok "$APP has been updated to ${RELEASE}."
|
||||
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}:5005${CL}"
|
@ -12,7 +12,7 @@
|
||||
"documentation": "https://caddyserver.com/docs/",
|
||||
"website": "https://caddyserver.com/",
|
||||
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/caddy.svg",
|
||||
"config_path": "",
|
||||
"config_path": "/etc/caddy/Caddyfile",
|
||||
"description": "Caddy is a powerful, extensible platform to serve your sites, services, and apps, written in Go.",
|
||||
"install_methods": [
|
||||
{
|
||||
|
35
frontend/public/json/documenso.json
Normal file
35
frontend/public/json/documenso.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "Documenso",
|
||||
"slug": "documenso",
|
||||
"categories": [
|
||||
12
|
||||
],
|
||||
"date_created": "2025-04-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://documenso.com/",
|
||||
"website": "https://documenso.com/",
|
||||
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/documenso.svg",
|
||||
"config_path": "/opt/documenso/.env",
|
||||
"description": "Signing documents digitally should be fast and easy and should be the best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: The signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world's most trusted document-signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/documenso.sh",
|
||||
"resources": {
|
||||
"cpu": 4,
|
||||
"ram": 6144,
|
||||
"hdd": 10,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "helper-scripts@local.com",
|
||||
"password": "helper-scripts"
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -12,7 +12,7 @@
|
||||
"documentation": "https://github.com/StarFleetCPTN/GoMFT#configuration",
|
||||
"website": "https://github.com/StarFleetCPTN/GoMFT",
|
||||
"logo": "https://raw.githubusercontent.com/StarFleetCPTN/GoMFT/83be259754689acc49a4b0dba25ba8384088a0fc/static/img/logo.svg",
|
||||
"config_path": "",
|
||||
"config_path": "/opt/gomft/.env",
|
||||
"description": "GoMFT is a web-based managed file transfer application built with Go, leveraging rclone for robust file transfer capabilities. It provides a user-friendly interface for configuring, scheduling, and monitoring file transfers across various storage providers.",
|
||||
"install_methods": [
|
||||
{
|
||||
@ -33,9 +33,8 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "For additional configuration options, edit .env file here: `/opt/gomft/.env`. Check the documentation for more details.",
|
||||
"text": "For additional configuration options check the documentation.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
35
frontend/public/json/umlautadaptarr.json
Normal file
35
frontend/public/json/umlautadaptarr.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "UmlautAdaptarr",
|
||||
"slug": "umlautadaptarr",
|
||||
"categories": [
|
||||
14
|
||||
],
|
||||
"date_created": "2025-04-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 5005,
|
||||
"documentation": null,
|
||||
"website": "https://github.com/PCJones/UmlautAdaptarr",
|
||||
"logo": null,
|
||||
"config_path": "/opt/UmlautAdaptarr/appsettings.json",
|
||||
"description": "UmlautAdaptarr is a tool that fixes issues with how Sonarr, Radarr, Lidarr, and Readarr handle foreign languages. It sits between these apps and the indexers, changing searches and results, and renaming releases so the apps recognize them correctly.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/umlautadaptarr.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 2,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -1,18 +1,188 @@
|
||||
[
|
||||
{
|
||||
"name": "zitadel/zitadel",
|
||||
"version": "v2.71.8",
|
||||
"date": "2025-04-25T11:50:04Z"
|
||||
"name": "semaphoreui/semaphore",
|
||||
"version": "v2.14.1",
|
||||
"date": "2025-04-28T11:30:32Z"
|
||||
},
|
||||
{
|
||||
"name": "photoprism/photoprism",
|
||||
"version": "250425-21ddba459",
|
||||
"date": "2025-04-25T11:18:53Z"
|
||||
"name": "VictoriaMetrics/VictoriaMetrics",
|
||||
"version": "pmm-6401-v1.116.0",
|
||||
"date": "2025-04-28T11:30:10Z"
|
||||
},
|
||||
{
|
||||
"name": "fhem/fhem-mirror",
|
||||
"version": "6.2",
|
||||
"date": "2025-04-25T10:34:09Z"
|
||||
"date": "2025-04-28T11:16:47Z"
|
||||
},
|
||||
{
|
||||
"name": "pocket-id/pocket-id",
|
||||
"version": "v0.51.0",
|
||||
"date": "2025-04-28T09:15:56Z"
|
||||
},
|
||||
{
|
||||
"name": "FlowiseAI/Flowise",
|
||||
"version": "flowise@2.2.8",
|
||||
"date": "2025-04-28T08:27:00Z"
|
||||
},
|
||||
{
|
||||
"name": "karakeep-app/karakeep",
|
||||
"version": "v0.24.1",
|
||||
"date": "2025-04-28T08:21:37Z"
|
||||
},
|
||||
{
|
||||
"name": "Graylog2/graylog2-server",
|
||||
"version": "6.2.0",
|
||||
"date": "2025-04-28T08:12:45Z"
|
||||
},
|
||||
{
|
||||
"name": "nzbgetcom/nzbget",
|
||||
"version": "v24.8",
|
||||
"date": "2025-03-18T07:33:51Z"
|
||||
},
|
||||
{
|
||||
"name": "morpheus65535/bazarr",
|
||||
"version": "v1.5.1",
|
||||
"date": "2025-01-01T16:15:52Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.1830",
|
||||
"date": "2025-04-28T05:51:29Z"
|
||||
},
|
||||
{
|
||||
"name": "firefly-iii/firefly-iii",
|
||||
"version": "v6.2.12",
|
||||
"date": "2025-04-20T19:22:17Z"
|
||||
},
|
||||
{
|
||||
"name": "henrygd/beszel",
|
||||
"version": "v0.11.0",
|
||||
"date": "2025-04-27T23:46:23Z"
|
||||
},
|
||||
{
|
||||
"name": "moghtech/komodo",
|
||||
"version": "v1.17.4",
|
||||
"date": "2025-04-27T23:19:33Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.1",
|
||||
"date": "2025-04-27T18:43:52Z"
|
||||
},
|
||||
{
|
||||
"name": "advplyr/audiobookshelf",
|
||||
"version": "v2.21.0",
|
||||
"date": "2025-04-27T16:31:14Z"
|
||||
},
|
||||
{
|
||||
"name": "ellite/Wallos",
|
||||
"version": "v3.0.0",
|
||||
"date": "2025-04-27T15:31:26Z"
|
||||
},
|
||||
{
|
||||
"name": "homarr-labs/homarr",
|
||||
"version": "v1.18.1",
|
||||
"date": "2025-04-27T15:17:35Z"
|
||||
},
|
||||
{
|
||||
"name": "evcc-io/evcc",
|
||||
"version": "0.203.4",
|
||||
"date": "2025-04-27T14:32:09Z"
|
||||
},
|
||||
{
|
||||
"name": "gotify/server",
|
||||
"version": "v2.6.3",
|
||||
"date": "2025-04-27T09:05:42Z"
|
||||
},
|
||||
{
|
||||
"name": "qbittorrent/qBittorrent",
|
||||
"version": "release-5.1.0",
|
||||
"date": "2025-04-27T08:53:48Z"
|
||||
},
|
||||
{
|
||||
"name": "Prowlarr/Prowlarr",
|
||||
"version": "v1.34.1.5021",
|
||||
"date": "2025-04-20T19:29:50Z"
|
||||
},
|
||||
{
|
||||
"name": "Radarr/Radarr",
|
||||
"version": "v5.22.4.9896",
|
||||
"date": "2025-04-23T18:51:12Z"
|
||||
},
|
||||
{
|
||||
"name": "tobychui/zoraxy",
|
||||
"version": "v3.1.9",
|
||||
"date": "2025-03-01T02:24:33Z"
|
||||
},
|
||||
{
|
||||
"name": "zwave-js/zwave-js-ui",
|
||||
"version": "v10.3.3",
|
||||
"date": "2025-04-26T21:44:00Z"
|
||||
},
|
||||
{
|
||||
"name": "TandoorRecipes/recipes",
|
||||
"version": "1.5.34",
|
||||
"date": "2025-03-27T16:17:38Z"
|
||||
},
|
||||
{
|
||||
"name": "leiweibau/Pi.Alert",
|
||||
"version": "v2025-04-26",
|
||||
"date": "2025-04-26T14:16:12Z"
|
||||
},
|
||||
{
|
||||
"name": "openhab/openhab-core",
|
||||
"version": "4.3.5",
|
||||
"date": "2025-04-26T13:52:07Z"
|
||||
},
|
||||
{
|
||||
"name": "photoprism/photoprism",
|
||||
"version": "250426-27ec7a128",
|
||||
"date": "2025-04-26T11:51:39Z"
|
||||
},
|
||||
{
|
||||
"name": "TechnitiumSoftware/DnsServer",
|
||||
"version": "v13.6.0",
|
||||
"date": "2025-04-26T10:21:12Z"
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.6.6",
|
||||
"date": "2025-04-17T04:34:58Z"
|
||||
},
|
||||
{
|
||||
"name": "immich-app/immich",
|
||||
"version": "v1.132.3",
|
||||
"date": "2025-04-25T19:44:05Z"
|
||||
},
|
||||
{
|
||||
"name": "duplicati/duplicati",
|
||||
"version": "v2.1.0.117-2.1.0.117_canary_2025-04-25",
|
||||
"date": "2025-04-25T17:22:12Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.2.1",
|
||||
"date": "2025-04-23T12:17:17Z"
|
||||
},
|
||||
{
|
||||
"name": "icereed/paperless-gpt",
|
||||
"version": "v0.16.0",
|
||||
"date": "2025-04-25T12:44:34Z"
|
||||
},
|
||||
{
|
||||
"name": "n8n-io/n8n",
|
||||
"version": "n8n@1.90.0",
|
||||
"date": "2025-04-22T08:58:15Z"
|
||||
},
|
||||
{
|
||||
"name": "goauthentik/authentik",
|
||||
"version": "version/2025.4.0-rc1",
|
||||
"date": "2025-04-25T04:53:56Z"
|
||||
},
|
||||
{
|
||||
"name": "zitadel/zitadel",
|
||||
"version": "v2.71.8",
|
||||
"date": "2025-04-25T11:50:04Z"
|
||||
},
|
||||
{
|
||||
"name": "home-assistant/core",
|
||||
@ -24,36 +194,11 @@
|
||||
"version": "v4.2.2",
|
||||
"date": "2025-04-25T07:42:03Z"
|
||||
},
|
||||
{
|
||||
"name": "evcc-io/evcc",
|
||||
"version": "0.203.3",
|
||||
"date": "2025-04-25T06:29:28Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "v10.6.2",
|
||||
"date": "2025-04-15T08:14:23Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.1823",
|
||||
"date": "2025-04-25T05:52:52Z"
|
||||
},
|
||||
{
|
||||
"name": "goauthentik/authentik",
|
||||
"version": "version/2025.4.0-rc1",
|
||||
"date": "2025-04-25T04:53:56Z"
|
||||
},
|
||||
{
|
||||
"name": "immich-app/immich",
|
||||
"version": "v1.132.2",
|
||||
"date": "2025-04-25T03:07:06Z"
|
||||
},
|
||||
{
|
||||
"name": "moghtech/komodo",
|
||||
"version": "v1.17.3",
|
||||
"date": "2025-04-25T02:33:19Z"
|
||||
},
|
||||
{
|
||||
"name": "docmost/docmost",
|
||||
"version": "v0.20.3",
|
||||
@ -64,21 +209,11 @@
|
||||
"version": "r7.0.19",
|
||||
"date": "2025-04-24T20:59:43Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.2.1",
|
||||
"date": "2025-04-23T12:17:17Z"
|
||||
},
|
||||
{
|
||||
"name": "rogerfar/rdt-client",
|
||||
"version": "v2.0.110",
|
||||
"date": "2025-04-24T19:11:06Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.11.2",
|
||||
"date": "2025-02-26T14:54:49Z"
|
||||
},
|
||||
{
|
||||
"name": "dotnetfactory/fluid-calendar",
|
||||
"version": "v1.4.0",
|
||||
@ -104,11 +239,6 @@
|
||||
"version": "10.0.18",
|
||||
"date": "2025-02-12T11:07:02Z"
|
||||
},
|
||||
{
|
||||
"name": "zwave-js/zwave-js-ui",
|
||||
"version": "v10.3.1",
|
||||
"date": "2025-04-24T08:47:43Z"
|
||||
},
|
||||
{
|
||||
"name": "NLnetLabs/unbound",
|
||||
"version": "release-1.23.0",
|
||||
@ -124,11 +254,6 @@
|
||||
"version": "v2.0.0-beta.9",
|
||||
"date": "2025-04-12T13:58:29Z"
|
||||
},
|
||||
{
|
||||
"name": "Radarr/Radarr",
|
||||
"version": "v5.22.4.9896",
|
||||
"date": "2025-04-23T18:51:12Z"
|
||||
},
|
||||
{
|
||||
"name": "netbox-community/netbox",
|
||||
"version": "v4.2.8",
|
||||
@ -154,21 +279,11 @@
|
||||
"version": "v11.6.1",
|
||||
"date": "2025-04-23T17:04:02Z"
|
||||
},
|
||||
{
|
||||
"name": "nzbgetcom/nzbget",
|
||||
"version": "v24.8",
|
||||
"date": "2025-03-18T07:33:51Z"
|
||||
},
|
||||
{
|
||||
"name": "redis/redis",
|
||||
"version": "7.4.3",
|
||||
"date": "2025-04-23T12:00:04Z"
|
||||
},
|
||||
{
|
||||
"name": "Graylog2/graylog2-server",
|
||||
"version": "6.3.0-alpha.1",
|
||||
"date": "2025-04-23T11:25:55Z"
|
||||
},
|
||||
{
|
||||
"name": "cockpit-project/cockpit",
|
||||
"version": "337",
|
||||
@ -194,11 +309,6 @@
|
||||
"version": "v0.7.13",
|
||||
"date": "2025-04-22T22:19:16Z"
|
||||
},
|
||||
{
|
||||
"name": "n8n-io/n8n",
|
||||
"version": "n8n@1.90.0",
|
||||
"date": "2025-04-22T08:58:15Z"
|
||||
},
|
||||
{
|
||||
"name": "jenkinsci/jenkins",
|
||||
"version": "jenkins-2.507",
|
||||
@ -214,26 +324,11 @@
|
||||
"version": "v0.107.61",
|
||||
"date": "2025-04-22T12:42:26Z"
|
||||
},
|
||||
{
|
||||
"name": "VictoriaMetrics/VictoriaMetrics",
|
||||
"version": "v1.20.0-victorialogs",
|
||||
"date": "2025-04-22T12:00:23Z"
|
||||
},
|
||||
{
|
||||
"name": "OctoPrint/OctoPrint",
|
||||
"version": "1.11.0",
|
||||
"date": "2025-04-22T09:33:46Z"
|
||||
},
|
||||
{
|
||||
"name": "morpheus65535/bazarr",
|
||||
"version": "v1.5.1",
|
||||
"date": "2025-01-01T16:15:52Z"
|
||||
},
|
||||
{
|
||||
"name": "firefly-iii/firefly-iii",
|
||||
"version": "v6.2.12",
|
||||
"date": "2025-04-20T19:22:17Z"
|
||||
},
|
||||
{
|
||||
"name": "monicahq/monica",
|
||||
"version": "v4.1.2",
|
||||
@ -254,21 +349,6 @@
|
||||
"version": "e5.9.0-beta.4",
|
||||
"date": "2025-04-21T17:08:59Z"
|
||||
},
|
||||
{
|
||||
"name": "Prowlarr/Prowlarr",
|
||||
"version": "v1.34.1.5021",
|
||||
"date": "2025-04-20T19:29:50Z"
|
||||
},
|
||||
{
|
||||
"name": "semaphoreui/semaphore",
|
||||
"version": "v2.13.14",
|
||||
"date": "2025-04-19T20:39:23Z"
|
||||
},
|
||||
{
|
||||
"name": "pocket-id/pocket-id",
|
||||
"version": "v0.49.0",
|
||||
"date": "2025-04-20T18:03:03Z"
|
||||
},
|
||||
{
|
||||
"name": "YunoHost/yunohost",
|
||||
"version": "debian/12.0.14",
|
||||
@ -279,21 +359,11 @@
|
||||
"version": "v0.8.6.2",
|
||||
"date": "2025-04-20T16:55:38Z"
|
||||
},
|
||||
{
|
||||
"name": "openhab/openhab-core",
|
||||
"version": "5.0.0.M2",
|
||||
"date": "2025-04-20T13:16:29Z"
|
||||
},
|
||||
{
|
||||
"name": "pocketbase/pocketbase",
|
||||
"version": "v0.27.1",
|
||||
"date": "2025-04-20T11:26:50Z"
|
||||
},
|
||||
{
|
||||
"name": "karakeep-app/karakeep",
|
||||
"version": "extension/v1.2.5",
|
||||
"date": "2025-04-20T10:19:06Z"
|
||||
},
|
||||
{
|
||||
"name": "MediaBrowser/Emby.Releases",
|
||||
"version": "4.8.11.0",
|
||||
@ -309,11 +379,6 @@
|
||||
"version": "v2.15.3",
|
||||
"date": "2025-04-19T23:02:17Z"
|
||||
},
|
||||
{
|
||||
"name": "ellite/Wallos",
|
||||
"version": "v2.52.0",
|
||||
"date": "2025-04-19T20:36:50Z"
|
||||
},
|
||||
{
|
||||
"name": "msgbyte/tianji",
|
||||
"version": "v1.20.7",
|
||||
@ -324,21 +389,11 @@
|
||||
"version": "v11.8.7",
|
||||
"date": "2025-04-19T11:19:29Z"
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.6.6",
|
||||
"date": "2025-04-17T04:34:58Z"
|
||||
},
|
||||
{
|
||||
"name": "caddyserver/caddy",
|
||||
"version": "v2.10.0",
|
||||
"date": "2025-04-18T20:46:28Z"
|
||||
},
|
||||
{
|
||||
"name": "homarr-labs/homarr",
|
||||
"version": "v1.17.0",
|
||||
"date": "2025-04-18T19:14:57Z"
|
||||
},
|
||||
{
|
||||
"name": "Paymenter/Paymenter",
|
||||
"version": "v1.0.4",
|
||||
@ -359,11 +414,6 @@
|
||||
"version": "v3.3.6",
|
||||
"date": "2025-04-18T09:28:22Z"
|
||||
},
|
||||
{
|
||||
"name": "TandoorRecipes/recipes",
|
||||
"version": "1.5.34",
|
||||
"date": "2025-03-27T16:17:38Z"
|
||||
},
|
||||
{
|
||||
"name": "Luligu/matterbridge",
|
||||
"version": "2.2.9",
|
||||
@ -389,11 +439,6 @@
|
||||
"version": "v4.99.3",
|
||||
"date": "2025-04-17T18:33:11Z"
|
||||
},
|
||||
{
|
||||
"name": "duplicati/duplicati",
|
||||
"version": "v2.1.0.116-2.1.0.116_canary_2025-04-17",
|
||||
"date": "2025-04-17T17:52:31Z"
|
||||
},
|
||||
{
|
||||
"name": "benzino77/tasmocompiler",
|
||||
"version": "v12.6.1",
|
||||
@ -444,11 +489,6 @@
|
||||
"version": "coverity-w17-4.12.0",
|
||||
"date": "2025-04-16T11:20:57Z"
|
||||
},
|
||||
{
|
||||
"name": "icereed/paperless-gpt",
|
||||
"version": "v0.15.0",
|
||||
"date": "2025-04-16T03:58:02Z"
|
||||
},
|
||||
{
|
||||
"name": "rabbitmq/rabbitmq-server",
|
||||
"version": "v4.1.0",
|
||||
@ -509,11 +549,6 @@
|
||||
"version": "v4.47.1",
|
||||
"date": "2025-01-05T21:14:23Z"
|
||||
},
|
||||
{
|
||||
"name": "qbittorrent/qBittorrent",
|
||||
"version": "release-5.0.5",
|
||||
"date": "2025-04-13T07:55:55Z"
|
||||
},
|
||||
{
|
||||
"name": "Lidarr/Lidarr",
|
||||
"version": "v2.10.3.4602",
|
||||
@ -609,11 +644,6 @@
|
||||
"version": "2.0.3",
|
||||
"date": "2025-04-06T17:35:41Z"
|
||||
},
|
||||
{
|
||||
"name": "TechnitiumSoftware/DnsServer",
|
||||
"version": "v13.5.0",
|
||||
"date": "2025-04-06T11:24:50Z"
|
||||
},
|
||||
{
|
||||
"name": "kimai/kimai",
|
||||
"version": "2.32.0",
|
||||
@ -724,11 +754,6 @@
|
||||
"version": "2.1.2-alpine",
|
||||
"date": "2025-03-30T06:25:22Z"
|
||||
},
|
||||
{
|
||||
"name": "tobychui/zoraxy",
|
||||
"version": "v3.1.9",
|
||||
"date": "2025-03-01T02:24:33Z"
|
||||
},
|
||||
{
|
||||
"name": "inspircd/inspircd",
|
||||
"version": "v4.7.0",
|
||||
@ -809,11 +834,6 @@
|
||||
"version": "v0.24.2",
|
||||
"date": "2025-03-23T04:01:50Z"
|
||||
},
|
||||
{
|
||||
"name": "leiweibau/Pi.Alert",
|
||||
"version": "v2025-03-21",
|
||||
"date": "2025-03-21T19:50:46Z"
|
||||
},
|
||||
{
|
||||
"name": "clusterzx/paperless-ai",
|
||||
"version": "v2.7.6",
|
||||
@ -839,11 +859,6 @@
|
||||
"version": "v4.39.1",
|
||||
"date": "2025-03-18T03:57:41Z"
|
||||
},
|
||||
{
|
||||
"name": "advplyr/audiobookshelf",
|
||||
"version": "v2.20.0",
|
||||
"date": "2025-03-17T22:44:56Z"
|
||||
},
|
||||
{
|
||||
"name": "Sonarr/Sonarr",
|
||||
"version": "v4.0.14.2939",
|
||||
@ -854,16 +869,6 @@
|
||||
"version": "2.303",
|
||||
"date": "2025-03-17T04:54:50Z"
|
||||
},
|
||||
{
|
||||
"name": "henrygd/beszel",
|
||||
"version": "v0.10.2",
|
||||
"date": "2025-03-15T07:14:54Z"
|
||||
},
|
||||
{
|
||||
"name": "FlowiseAI/Flowise",
|
||||
"version": "flowise@2.2.7-patch.1",
|
||||
"date": "2025-03-14T14:53:53Z"
|
||||
},
|
||||
{
|
||||
"name": "FreshRSS/FreshRSS",
|
||||
"version": "1.26.1",
|
||||
@ -1124,11 +1129,6 @@
|
||||
"version": "v0.6.1",
|
||||
"date": "2024-11-22T21:48:41Z"
|
||||
},
|
||||
{
|
||||
"name": "gotify/server",
|
||||
"version": "v2.6.1",
|
||||
"date": "2024-11-16T08:44:53Z"
|
||||
},
|
||||
{
|
||||
"name": "janeczku/calibre-web",
|
||||
"version": "0.6.24",
|
||||
|
@ -12,7 +12,7 @@ export default function Footer() {
|
||||
<p>
|
||||
Website built by the community. The source code is available on{" "}
|
||||
<Link
|
||||
href={`https://github.com/community-scripts/${basePath}/frontend`}
|
||||
href={`https://github.com/community-scripts/${basePath}/tree/main/frontend`}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="font-semibold underline-offset-2 duration-300 hover:underline"
|
||||
|
@ -16,6 +16,9 @@ update_os
|
||||
msg_info "Installing Apt-Cacher NG"
|
||||
DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng
|
||||
sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .*/' /etc/apt-cacher-ng/acng.conf
|
||||
cat << EOF >/etc/apt/apt.conf.d/00aptproxy.conf
|
||||
Acquire::http::Proxy "http://localhost:3142";
|
||||
EOF
|
||||
systemctl enable -q --now apt-cacher-ng
|
||||
msg_ok "Installed Apt-Cacher NG"
|
||||
|
||||
|
123
install/documenso-install.sh
Normal file
123
install/documenso-install.sh
Normal file
@ -0,0 +1,123 @@
|
||||
#!/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://github.com/documenso/documenso
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setup Functions"
|
||||
setup_local_ip_helper
|
||||
import_local_ip
|
||||
msg_ok "Setup Functions"
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
gpg \
|
||||
libc6 \
|
||||
make \
|
||||
cmake \
|
||||
jq \
|
||||
postgresql \
|
||||
python3 \
|
||||
python3-bcrypt
|
||||
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 turbo@1.9.3
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME="documenso_db"
|
||||
DB_USER="documenso_user"
|
||||
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 ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$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 "Documenso-Credentials"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
} >>~/documenso.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
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
|
||||
mv documenso-${RELEASE} /opt/documenso
|
||||
cd /opt/documenso
|
||||
mv .env.example /opt/documenso/.env
|
||||
sed -i \
|
||||
-e "s|^NEXTAUTH_SECRET=.*|NEXTAUTH_SECRET='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \
|
||||
-e "s|^NEXT_PRIVATE_ENCRYPTION_KEY=.*|NEXT_PRIVATE_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \
|
||||
-e "s|^NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=.*|NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \
|
||||
-e "s|^DOCUMENSO_ENCRYPTION_KEY=.*|DOCUMENSO_ENCRYPTION_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \
|
||||
-e "s|^DOCUMENSO_ENCRYPTION_SECONDARY_KEY=.*|DOCUMENSO_ENCRYPTION_SECONDARY_KEY='$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)'|" \
|
||||
-e "s|^NEXTAUTH_URL=.*|NEXTAUTH_URL=\"http://${LOCAL_IP}:3000\"|" \
|
||||
-e "s|^NEXT_PUBLIC_WEBAPP_URL=.*|NEXT_PUBLIC_WEBAPP_URL='http://${LOCAL_IP}:9000'|" \
|
||||
-e "s|^NEXT_PUBLIC_MARKETING_URL=.*|NEXT_PUBLIC_MARKETING_URL=\"http://${LOCAL_IP}:3001\"|" \
|
||||
-e "s|^NEXT_PRIVATE_INTERNAL_WEBAPP_URL=.*|NEXT_PRIVATE_INTERNAL_WEBAPP_URL=\"http://${LOCAL_IP}:3000\"|" \
|
||||
-e "s|^NEXT_PRIVATE_DATABASE_URL=.*|NEXT_PRIVATE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" \
|
||||
-e "s|^NEXT_PRIVATE_DIRECT_DATABASE_URL=.*|NEXT_PRIVATE_DIRECT_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" \
|
||||
/opt/documenso/.env
|
||||
export TURBO_CACHE=1
|
||||
export NEXT_TELEMETRY_DISABLED=1
|
||||
export CYPRESS_INSTALL_BINARY=0
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
$STD npm ci
|
||||
$STD npm run build:web
|
||||
$STD npm run prisma:migrate-deploy
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed Documenso"
|
||||
|
||||
msg_info "Create User"
|
||||
PASSWORD_HASH=$(python3 -c "import bcrypt; print(bcrypt.hashpw(b'helper-scripts', bcrypt.gensalt(rounds=12)).decode())")
|
||||
sudo -u postgres psql -d documenso_db -c "INSERT INTO \"User\" (name, email, \"emailVerified\", password, \"identityProvider\", roles, \"createdAt\", \"lastSignedIn\", \"updatedAt\", \"customerId\") VALUES ('helper-scripts', 'helper-scripts@local.com', '2025-01-20 17:14:45.058', '$PASSWORD_HASH', 'DOCUMENSO', ARRAY['USER', 'ADMIN']::\"Role\"[], '2025-01-20 16:04:05.543', '2025-01-20 16:14:55.249', '2025-01-20 16:14:55.25', NULL) RETURNING id;"
|
||||
$STD npm run prisma:migrate-deploy
|
||||
msg_ok "User created"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/documenso.service
|
||||
[Unit]
|
||||
Description=Documenso Service
|
||||
After=network.target postgresql.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/documenso/apps/web
|
||||
ExecStart=/usr/bin/npm start
|
||||
Restart=always
|
||||
EnvironmentFile=/opt/documenso/.env
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now documenso
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -64,7 +64,7 @@ mkdir -p /opt/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) }')
|
||||
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-adminsys
|
||||
cd /opt/synapse-admin
|
||||
$STD yarn install --ignore-engines
|
||||
msg_ok "Installed Element Synapse"
|
||||
|
||||
|
@ -71,10 +71,15 @@ export NEXT_TELEMETRY_DISABLED=1
|
||||
export CI="true"
|
||||
cd /opt/karakeep/apps/web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm exec next build --experimental-build-mode compile
|
||||
cp -r /opt/karakeep/apps/web/.next/standalone/apps/web/server.js /opt/karakeep/apps/web
|
||||
$STD pnpm build
|
||||
cd /opt/karakeep/apps/workers
|
||||
$STD pnpm install --frozen-lockfile
|
||||
cd /opt/karakeep/apps/cli
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm build
|
||||
cd /opt/karakeep/apps/mcp
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm build
|
||||
|
||||
export DATA_DIR=/opt/karakeep_data
|
||||
karakeep_SECRET=$(openssl rand -base64 36 | cut -c1-24)
|
||||
|
122
install/umlautadaptarr-install.sh
Normal file
122
install/umlautadaptarr-install.sh
Normal file
@ -0,0 +1,122 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: elvito
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/PCJones/UmlautAdaptarr
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb
|
||||
$STD dpkg -i packages-microsoft-prod.deb
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y \
|
||||
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
|
||||
echo "${RELEASE}" >"/opt/UmlautAdaptarr_version.txt"
|
||||
msg_ok "Installation completed"
|
||||
|
||||
msg_info "Creating appsettings.json"
|
||||
cat <<EOF >/opt/UmlautAdaptarr/appsettings.json
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
},
|
||||
"Console": {
|
||||
"TimestampFormat": "yyyy-MM-dd HH:mm:ss::"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"Kestrel": {
|
||||
"Endpoints": {
|
||||
"Http": {
|
||||
"Url": "http://[::]:5005"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Settings": {
|
||||
"UserAgent": "UmlautAdaptarr/1.0",
|
||||
"UmlautAdaptarrApiHost": "https://umlautadaptarr.pcjones.de/api/v1",
|
||||
"IndexerRequestsCacheDurationInMinutes": 12
|
||||
},
|
||||
"Sonarr": [
|
||||
{
|
||||
"Enabled": false,
|
||||
"Name": "Sonarr",
|
||||
"Host": "http://192.168.1.100:8989",
|
||||
"ApiKey": "dein_sonarr_api_key"
|
||||
}
|
||||
],
|
||||
"Radarr": [
|
||||
{
|
||||
"Enabled": false,
|
||||
"Name": "Radarr",
|
||||
"Host": "http://192.168.1.101:7878",
|
||||
"ApiKey": "dein_radarr_api_key"
|
||||
}
|
||||
],
|
||||
"Lidarr": [
|
||||
{
|
||||
"Enabled": false,
|
||||
"Host": "http://192.168.1.102:8686",
|
||||
"ApiKey": "dein_lidarr_api_key"
|
||||
},
|
||||
],
|
||||
"Readarr": [
|
||||
{
|
||||
"Enabled": false,
|
||||
"Host": "http://192.168.1.103:8787",
|
||||
"ApiKey": "dein_readarr_api_key"
|
||||
},
|
||||
],
|
||||
"IpLeakTest": {
|
||||
"Enabled": false
|
||||
}
|
||||
}
|
||||
EOF
|
||||
msg_ok "appsettings.json created"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/umlautadaptarr.service
|
||||
[Unit]
|
||||
Description=UmlautAdaptarr Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/UmlautAdaptarr
|
||||
ExecStart=/usr/bin/dotnet /opt/UmlautAdaptarr/bin/Release/net8.0/UmlautAdaptarr.dll --urls=http://0.0.0.0:5005
|
||||
Restart=always
|
||||
User=root
|
||||
Group=root
|
||||
Environment=ASPNETCORE_ENVIRONMENT=Production
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl -q --now enable umlautadaptarr
|
||||
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"
|
@ -149,22 +149,6 @@ msg_error() {
|
||||
stop_spinner
|
||||
local msg="$1"
|
||||
printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2
|
||||
log_message "ERROR" "$msg"
|
||||
}
|
||||
|
||||
log_message() {
|
||||
local level="$1"
|
||||
local message="$2"
|
||||
local timestamp
|
||||
local logdate
|
||||
timestamp=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
logdate=$(date '+%Y-%m-%d')
|
||||
|
||||
LOGDIR="/usr/local/community-scripts/logs"
|
||||
mkdir -p "$LOGDIR"
|
||||
|
||||
LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log"
|
||||
echo "$timestamp - $level: $message" >>"$LOGFILE"
|
||||
}
|
||||
|
||||
# Check if the shell is using bash
|
||||
@ -1120,7 +1104,7 @@ install_script() {
|
||||
while true; do
|
||||
|
||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \
|
||||
14 50 5 \
|
||||
18 60 6 \
|
||||
"1" "Default Settings" \
|
||||
"2" "Default Settings (with verbose)" \
|
||||
"3" "Advanced Settings" \
|
||||
@ -1237,9 +1221,7 @@ check_container_storage() {
|
||||
}
|
||||
|
||||
start() {
|
||||
LOGDIR="/usr/local/community-scripts/logs"
|
||||
mkdir -p "$LOGDIR"
|
||||
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||
if command -v pveversion >/dev/null 2>&1; then
|
||||
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
||||
clear
|
||||
@ -1262,16 +1244,13 @@ start() {
|
||||
1)
|
||||
VERB="no"
|
||||
set_std_mode
|
||||
log_message "INFO" "Update started (Silent Mode)"
|
||||
;;
|
||||
2)
|
||||
VERB="yes"
|
||||
set_std_mode
|
||||
log_message "INFO" "Update started (Verbose Mode)"
|
||||
;;
|
||||
3)
|
||||
clear
|
||||
log_message "INFO" "Update aborted."
|
||||
exit_script
|
||||
exit
|
||||
;;
|
||||
@ -1456,9 +1435,9 @@ set_std_mode() {
|
||||
# Silent execution function
|
||||
silent() {
|
||||
if [ "$VERB" = "no" ]; then
|
||||
"$@" >>"$LOGFILE" 2>&1
|
||||
"$@" >/dev/null 2>&1 || return 1
|
||||
else
|
||||
"$@" 2>&1 | tee -a "$LOGFILE"
|
||||
"$@" || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,8 @@ EOF
|
||||
|
||||
msg_info "Installing core dependencies"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y sudo curl mc
|
||||
$STD apt-get install -y sudo curl mc gnupg2
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||
msg_ok "Core dependencies installed"
|
||||
}
|
||||
|
||||
|
758
misc/tools.func
Normal file
758
misc/tools.func
Normal file
@ -0,0 +1,758 @@
|
||||
install_node_and_modules() {
|
||||
local NODE_VERSION="${NODE_VERSION:-22}"
|
||||
local NODE_MODULE="${NODE_MODULE:-}"
|
||||
local CURRENT_NODE_VERSION=""
|
||||
local NEED_NODE_INSTALL=false
|
||||
|
||||
# Check if Node.js is already installed
|
||||
if command -v node >/dev/null; then
|
||||
CURRENT_NODE_VERSION="$(node -v | grep -oP '^v\K[0-9]+')"
|
||||
if [[ "$CURRENT_NODE_VERSION" != "$NODE_VERSION" ]]; then
|
||||
msg_info "Node.js version $CURRENT_NODE_VERSION found, replacing with $NODE_VERSION"
|
||||
NEED_NODE_INSTALL=true
|
||||
else
|
||||
msg_ok "Node.js $NODE_VERSION already installed"
|
||||
fi
|
||||
else
|
||||
msg_info "Node.js not found, installing version $NODE_VERSION"
|
||||
NEED_NODE_INSTALL=true
|
||||
fi
|
||||
|
||||
# Install Node.js if required
|
||||
if [[ "$NEED_NODE_INSTALL" == true ]]; then
|
||||
$STD apt-get purge -y nodejs
|
||||
rm -f /etc/apt/sources.list.d/nodesource.list /etc/apt/keyrings/nodesource.gpg
|
||||
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
||||
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key |
|
||||
gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; then
|
||||
msg_error "Failed to download or import NodeSource GPG key"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \
|
||||
>/etc/apt/sources.list.d/nodesource.list
|
||||
|
||||
if ! apt-get update >/dev/null 2>&1; then
|
||||
msg_error "Failed to update APT repositories after adding NodeSource"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! apt-get install -y nodejs >/dev/null 2>&1; then
|
||||
msg_error "Failed to install Node.js ${NODE_VERSION} from NodeSource"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_ok "Installed Node.js ${NODE_VERSION}"
|
||||
fi
|
||||
|
||||
export NODE_OPTIONS="--max_old_space_size=4096"
|
||||
|
||||
# Install global Node modules
|
||||
if [[ -n "$NODE_MODULE" ]]; then
|
||||
IFS=',' read -ra MODULES <<<"$NODE_MODULE"
|
||||
for mod in "${MODULES[@]}"; do
|
||||
local MODULE_NAME MODULE_REQ_VERSION MODULE_INSTALLED_VERSION
|
||||
if [[ "$mod" == *"@"* ]]; then
|
||||
MODULE_NAME="${mod%@*}"
|
||||
MODULE_REQ_VERSION="${mod#*@}"
|
||||
else
|
||||
MODULE_NAME="$mod"
|
||||
MODULE_REQ_VERSION="latest"
|
||||
fi
|
||||
|
||||
# Check if the module is already installed
|
||||
if npm list -g --depth=0 "$MODULE_NAME" >/dev/null 2>&1; then
|
||||
MODULE_INSTALLED_VERSION="$(npm list -g --depth=0 "$MODULE_NAME" | grep "$MODULE_NAME@" | awk -F@ '{print $2}' | tr -d '[:space:]')"
|
||||
if [[ "$MODULE_REQ_VERSION" != "latest" && "$MODULE_REQ_VERSION" != "$MODULE_INSTALLED_VERSION" ]]; then
|
||||
msg_info "Updating $MODULE_NAME from v$MODULE_INSTALLED_VERSION to v$MODULE_REQ_VERSION"
|
||||
if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then
|
||||
msg_error "Failed to update $MODULE_NAME to version $MODULE_REQ_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "$MODULE_REQ_VERSION" == "latest" ]]; then
|
||||
msg_info "Updating $MODULE_NAME to latest version"
|
||||
if ! $STD npm install -g "${MODULE_NAME}@latest"; then
|
||||
msg_error "Failed to update $MODULE_NAME to latest version"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
msg_ok "$MODULE_NAME@$MODULE_INSTALLED_VERSION already installed"
|
||||
fi
|
||||
else
|
||||
msg_info "Installing $MODULE_NAME@$MODULE_REQ_VERSION"
|
||||
if ! $STD npm install -g "${MODULE_NAME}@${MODULE_REQ_VERSION}"; then
|
||||
msg_error "Failed to install $MODULE_NAME@$MODULE_REQ_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
msg_ok "All requested Node modules have been processed"
|
||||
fi
|
||||
}
|
||||
|
||||
install_postgresql() {
|
||||
local PG_VERSION="${PG_VERSION:-16}"
|
||||
local CURRENT_PG_VERSION=""
|
||||
local DISTRO
|
||||
local NEED_PG_INSTALL=false
|
||||
DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
|
||||
|
||||
if command -v psql >/dev/null; then
|
||||
CURRENT_PG_VERSION="$(psql -V | grep -oP '\s\K[0-9]+(?=\.)')"
|
||||
if [[ "$CURRENT_PG_VERSION" != "$PG_VERSION" ]]; then
|
||||
msg_info "PostgreSQL Version $CURRENT_PG_VERSION found, replacing with $PG_VERSION"
|
||||
NEED_PG_INSTALL=true
|
||||
fi
|
||||
else
|
||||
msg_info "PostgreSQL not found, installing version $PG_VERSION"
|
||||
NEED_PG_INSTALL=true
|
||||
fi
|
||||
|
||||
if [[ "$NEED_PG_INSTALL" == true ]]; then
|
||||
msg_info "Stopping PostgreSQL if running"
|
||||
systemctl stop postgresql >/dev/null 2>&1 || true
|
||||
|
||||
msg_info "Removing conflicting PostgreSQL packages"
|
||||
$STD apt-get purge -y "postgresql*"
|
||||
rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg
|
||||
|
||||
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 ${DISTRO}-pgdg main" \
|
||||
>/etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y "postgresql-${PG_VERSION}"
|
||||
|
||||
msg_ok "Installed PostgreSQL ${PG_VERSION}"
|
||||
fi
|
||||
}
|
||||
|
||||
install_mariadb() {
|
||||
local MARIADB_VERSION="${MARIADB_VERSION:-latest}"
|
||||
local DISTRO_CODENAME
|
||||
DISTRO_CODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)"
|
||||
|
||||
# grab dynamic latest LTS version
|
||||
if [[ "$MARIADB_VERSION" == "latest" ]]; then
|
||||
msg_info "Resolving latest MariaDB version"
|
||||
MARIADB_VERSION=$(curl -fsSL https://mariadb.org | grep -oP 'MariaDB \K10\.[0-9]+' | head -n1)
|
||||
if [[ -z "$MARIADB_VERSION" ]]; then
|
||||
msg_error "Could not determine latest MariaDB version"
|
||||
return 1
|
||||
fi
|
||||
msg_ok "Latest MariaDB version is $MARIADB_VERSION"
|
||||
fi
|
||||
|
||||
local CURRENT_VERSION=""
|
||||
if command -v mariadb >/dev/null; then
|
||||
CURRENT_VERSION="$(mariadb --version | grep -oP 'Ver\s+\K[0-9]+\.[0-9]+')"
|
||||
fi
|
||||
|
||||
if [[ "$CURRENT_VERSION" == "$MARIADB_VERSION" ]]; then
|
||||
msg_info "MariaDB $MARIADB_VERSION already installed, checking for upgrade"
|
||||
$STD apt-get update
|
||||
$STD apt-get install --only-upgrade -y mariadb-server mariadb-client
|
||||
msg_ok "MariaDB $MARIADB_VERSION upgraded if applicable"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -n "$CURRENT_VERSION" ]]; then
|
||||
msg_info "Replacing MariaDB $CURRENT_VERSION with $MARIADB_VERSION (data will be preserved)"
|
||||
$STD systemctl stop mariadb >/dev/null 2>&1 || true
|
||||
$STD apt-get purge -y 'mariadb*' || true
|
||||
rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg
|
||||
else
|
||||
msg_info "Installing MariaDB $MARIADB_VERSION"
|
||||
fi
|
||||
|
||||
msg_info "Setting up MariaDB Repository"
|
||||
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" \
|
||||
>/etc/apt/sources.list.d/mariadb.list
|
||||
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mariadb-server mariadb-client
|
||||
|
||||
msg_ok "Installed MariaDB $MARIADB_VERSION"
|
||||
}
|
||||
|
||||
install_mysql() {
|
||||
local MYSQL_VERSION="${MYSQL_VERSION:-8.0}"
|
||||
local CURRENT_VERSION=""
|
||||
local NEED_INSTALL=false
|
||||
|
||||
if command -v mysql >/dev/null; then
|
||||
CURRENT_VERSION="$(mysql --version | grep -oP 'Distrib\s+\K[0-9]+\.[0-9]+')"
|
||||
if [[ "$CURRENT_VERSION" != "$MYSQL_VERSION" ]]; then
|
||||
msg_info "MySQL $CURRENT_VERSION found, replacing with $MYSQL_VERSION"
|
||||
NEED_INSTALL=true
|
||||
else
|
||||
msg_ok "MySQL $MYSQL_VERSION already installed"
|
||||
fi
|
||||
else
|
||||
msg_info "MySQL not found, installing version $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*'
|
||||
rm -f /etc/apt/sources.list.d/mysql.list /etc/apt/trusted.gpg.d/mysql.gpg
|
||||
|
||||
msg_info "Setting up MySQL APT Repository"
|
||||
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
|
||||
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
|
||||
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mysql-server
|
||||
|
||||
msg_ok "Installed MySQL $MYSQL_VERSION"
|
||||
fi
|
||||
}
|
||||
|
||||
install_php() {
|
||||
local PHP_VERSION="${PHP_VERSION:-8.4}"
|
||||
local PHP_MODULE="${PHP_MODULE:-}"
|
||||
local PHP_APACHE="${PHP_APACHE:-NO}"
|
||||
local PHP_FPM="${PHP_FPM:-NO}"
|
||||
local DEFAULT_MODULES="bcmath,cli,curl,gd,intl,mbstring,opcache,readline,xml,zip"
|
||||
local COMBINED_MODULES
|
||||
|
||||
local PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-512M}"
|
||||
local PHP_UPLOAD_MAX_FILESIZE="${PHP_UPLOAD_MAX_FILESIZE:-128M}"
|
||||
local PHP_POST_MAX_SIZE="${PHP_POST_MAX_SIZE:-128M}"
|
||||
local PHP_MAX_EXECUTION_TIME="${PHP_MAX_EXECUTION_TIME:-300}"
|
||||
|
||||
# Merge default + user-defined modules
|
||||
if [[ -n "$PHP_MODULE" ]]; then
|
||||
COMBINED_MODULES="${DEFAULT_MODULES},${PHP_MODULE}"
|
||||
else
|
||||
COMBINED_MODULES="${DEFAULT_MODULES}"
|
||||
fi
|
||||
|
||||
# Deduplicate modules
|
||||
COMBINED_MODULES=$(echo "$COMBINED_MODULES" | tr ',' '\n' | awk '!seen[$0]++' | paste -sd, -)
|
||||
|
||||
local CURRENT_PHP
|
||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||
|
||||
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
|
||||
$STD echo "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
|
||||
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
|
||||
fi
|
||||
|
||||
$STD apt-get purge -y "php${CURRENT_PHP//./}"* || true
|
||||
fi
|
||||
|
||||
local MODULE_LIST="php${PHP_VERSION}"
|
||||
IFS=',' read -ra MODULES <<<"$COMBINED_MODULES"
|
||||
for mod in "${MODULES[@]}"; do
|
||||
MODULE_LIST+=" php${PHP_VERSION}-${mod}"
|
||||
done
|
||||
|
||||
if [[ "$PHP_APACHE" == "YES" ]]; then
|
||||
# Optionally disable old Apache PHP module
|
||||
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
|
||||
$STD a2dismod php${CURRENT_PHP} || true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$PHP_FPM" == "YES" ]]; then
|
||||
$STD systemctl stop php${CURRENT_PHP}-fpm || true
|
||||
$STD systemctl disable php${CURRENT_PHP}-fpm || true
|
||||
fi
|
||||
|
||||
$STD apt-get install -y $MODULE_LIST
|
||||
msg_ok "Installed PHP $PHP_VERSION with selected modules"
|
||||
|
||||
if [[ "$PHP_APACHE" == "YES" ]]; then
|
||||
$STD systemctl restart apache2 || true
|
||||
fi
|
||||
|
||||
if [[ "$PHP_FPM" == "YES" ]]; then
|
||||
$STD systemctl enable php${PHP_VERSION}-fpm
|
||||
$STD systemctl restart php${PHP_VERSION}-fpm
|
||||
fi
|
||||
|
||||
# Patch all relevant php.ini files
|
||||
local PHP_INI_PATHS=()
|
||||
PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/cli/php.ini")
|
||||
[[ "$PHP_FPM" == "YES" ]] && PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/fpm/php.ini")
|
||||
[[ "$PHP_APACHE" == "YES" ]] && PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/apache2/php.ini")
|
||||
|
||||
for ini in "${PHP_INI_PATHS[@]}"; do
|
||||
if [[ -f "$ini" ]]; then
|
||||
msg_info "Patching $ini"
|
||||
sed -i "s|^memory_limit = .*|memory_limit = ${PHP_MEMORY_LIMIT}|" "$ini"
|
||||
sed -i "s|^upload_max_filesize = .*|upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}|" "$ini"
|
||||
sed -i "s|^post_max_size = .*|post_max_size = ${PHP_POST_MAX_SIZE}|" "$ini"
|
||||
sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini"
|
||||
msg_ok "Patched $ini"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
install_composer() {
|
||||
local COMPOSER_BIN="/usr/local/bin/composer"
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
|
||||
# Check if composer is already installed
|
||||
if [[ -x "$COMPOSER_BIN" ]]; then
|
||||
local CURRENT_VERSION
|
||||
CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
|
||||
msg_info "Composer $CURRENT_VERSION found, updating to latest"
|
||||
else
|
||||
msg_info "Composer not found, installing latest version"
|
||||
fi
|
||||
|
||||
# Download and install latest composer
|
||||
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
|
||||
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
msg_error "Failed to install Composer"
|
||||
return 1
|
||||
fi
|
||||
|
||||
chmod +x "$COMPOSER_BIN"
|
||||
msg_ok "Installed Composer $($COMPOSER_BIN --version | awk '{print $3}')"
|
||||
}
|
||||
|
||||
install_go() {
|
||||
local ARCH
|
||||
case "$(uname -m)" in
|
||||
x86_64) ARCH="amd64" ;;
|
||||
aarch64) ARCH="arm64" ;;
|
||||
*)
|
||||
msg_error "Unsupported architecture: $(uname -m)"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Determine version
|
||||
if [[ -z "$GO_VERSION" || "$GO_VERSION" == "latest" ]]; then
|
||||
GO_VERSION=$(curl -fsSL https://go.dev/VERSION?m=text | head -n1 | sed 's/^go//')
|
||||
if [[ -z "$GO_VERSION" ]]; then
|
||||
msg_error "Could not determine latest Go version"
|
||||
return 1
|
||||
fi
|
||||
msg_info "Detected latest Go version: $GO_VERSION"
|
||||
fi
|
||||
|
||||
local GO_BIN="/usr/local/bin/go"
|
||||
local GO_INSTALL_DIR="/usr/local/go"
|
||||
|
||||
if [[ -x "$GO_BIN" ]]; then
|
||||
local CURRENT_VERSION
|
||||
CURRENT_VERSION=$("$GO_BIN" version | awk '{print $3}' | sed 's/go//')
|
||||
if [[ "$CURRENT_VERSION" == "$GO_VERSION" ]]; then
|
||||
msg_ok "Go $GO_VERSION already installed"
|
||||
return 0
|
||||
else
|
||||
msg_info "Go $CURRENT_VERSION found, upgrading to $GO_VERSION"
|
||||
rm -rf "$GO_INSTALL_DIR"
|
||||
fi
|
||||
else
|
||||
msg_info "Installing Go $GO_VERSION"
|
||||
fi
|
||||
|
||||
local TARBALL="go${GO_VERSION}.linux-${ARCH}.tar.gz"
|
||||
local URL="https://go.dev/dl/${TARBALL}"
|
||||
local TMP_TAR=$(mktemp)
|
||||
|
||||
curl -fsSL "$URL" -o "$TMP_TAR" || {
|
||||
msg_error "Failed to download $TARBALL"
|
||||
return 1
|
||||
}
|
||||
|
||||
tar -C /usr/local -xzf "$TMP_TAR"
|
||||
ln -sf /usr/local/go/bin/go /usr/local/bin/go
|
||||
ln -sf /usr/local/go/bin/gofmt /usr/local/bin/gofmt
|
||||
rm -f "$TMP_TAR"
|
||||
|
||||
msg_ok "Installed Go $GO_VERSION"
|
||||
}
|
||||
|
||||
install_java() {
|
||||
local JAVA_VERSION="${JAVA_VERSION:-17}"
|
||||
local DISTRO_CODENAME
|
||||
DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)
|
||||
local DESIRED_PACKAGE="temurin-${JAVA_VERSION}-jdk"
|
||||
|
||||
# Add Adoptium repo if missing
|
||||
if [[ ! -f /etc/apt/sources.list.d/adoptium.list ]]; then
|
||||
msg_info "Setting up Adoptium Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL "https://packages.adoptium.net/artifactory/api/gpg/key/public" | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg
|
||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${DISTRO_CODENAME} main" \
|
||||
>/etc/apt/sources.list.d/adoptium.list
|
||||
$STD apt-get update
|
||||
msg_ok "Set up Adoptium Repository"
|
||||
fi
|
||||
|
||||
# Detect currently installed temurin version
|
||||
local INSTALLED_VERSION=""
|
||||
if dpkg -l | grep -q "temurin-.*-jdk"; then
|
||||
INSTALLED_VERSION=$(dpkg -l | awk '/temurin-.*-jdk/{print $2}' | grep -oP 'temurin-\K[0-9]+')
|
||||
fi
|
||||
|
||||
if [[ "$INSTALLED_VERSION" == "$JAVA_VERSION" ]]; then
|
||||
msg_info "Temurin JDK $JAVA_VERSION already installed, updating if needed"
|
||||
$STD apt-get update
|
||||
$STD apt-get install --only-upgrade -y "$DESIRED_PACKAGE"
|
||||
msg_ok "Updated Temurin JDK $JAVA_VERSION (if applicable)"
|
||||
else
|
||||
if [[ -n "$INSTALLED_VERSION" ]]; then
|
||||
msg_info "Removing Temurin JDK $INSTALLED_VERSION"
|
||||
$STD apt-get purge -y "temurin-${INSTALLED_VERSION}-jdk"
|
||||
fi
|
||||
|
||||
msg_info "Installing Temurin JDK $JAVA_VERSION"
|
||||
$STD apt-get install -y "$DESIRED_PACKAGE"
|
||||
msg_ok "Installed Temurin JDK $JAVA_VERSION"
|
||||
fi
|
||||
}
|
||||
|
||||
install_mongodb() {
|
||||
local MONGO_VERSION="${MONGO_VERSION:-8.0}"
|
||||
local DISTRO_CODENAME
|
||||
DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)
|
||||
local REPO_LIST="/etc/apt/sources.list.d/mongodb-org-${MONGO_VERSION}.list"
|
||||
|
||||
# Aktuell installierte Major-Version ermitteln
|
||||
local INSTALLED_VERSION=""
|
||||
if command -v mongod >/dev/null; then
|
||||
INSTALLED_VERSION=$(mongod --version | awk '/db version/{print $3}' | cut -d. -f1,2)
|
||||
fi
|
||||
|
||||
if [[ "$INSTALLED_VERSION" == "$MONGO_VERSION" ]]; then
|
||||
msg_info "MongoDB $MONGO_VERSION already installed, checking for upgrade"
|
||||
$STD apt-get update
|
||||
$STD apt-get install --only-upgrade -y mongodb-org
|
||||
msg_ok "MongoDB $MONGO_VERSION upgraded if needed"
|
||||
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
|
||||
$STD apt-get purge -y mongodb-org || true
|
||||
rm -f /etc/apt/sources.list.d/mongodb-org-*.list
|
||||
rm -f /etc/apt/trusted.gpg.d/mongodb-*.gpg
|
||||
else
|
||||
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" \
|
||||
>"$REPO_LIST"
|
||||
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mongodb-org
|
||||
|
||||
# Sicherstellen, dass Datenverzeichnis intakt bleibt
|
||||
mkdir -p /var/lib/mongodb
|
||||
chown -R mongodb:mongodb /var/lib/mongodb
|
||||
|
||||
$STD systemctl enable mongod
|
||||
$STD systemctl start mongod
|
||||
msg_ok "MongoDB $MONGO_VERSION installed and started"
|
||||
}
|
||||
|
||||
fetch_and_deploy_gh_release() {
|
||||
local repo="$1"
|
||||
local app=$(echo ${APPLICATION,,} | tr -d ' ')
|
||||
local api_url="https://api.github.com/repos/$repo/releases/latest"
|
||||
local header=()
|
||||
local attempt=0
|
||||
local max_attempts=3
|
||||
local api_response tag http_code
|
||||
local current_version=""
|
||||
local curl_timeout="--connect-timeout 10 --max-time 30"
|
||||
|
||||
# Check if the app directory exists and if there's a version file
|
||||
if [[ -f "/opt/${app}_version.txt" ]]; then
|
||||
current_version=$(cat "/opt/${app}_version.txt")
|
||||
$STD msg_info "Current version: $current_version"
|
||||
fi
|
||||
|
||||
# ensure that jq is installed
|
||||
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
|
||||
|
||||
[[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN")
|
||||
|
||||
until [[ $attempt -ge $max_attempts ]]; do
|
||||
((attempt++)) || true
|
||||
$STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n"
|
||||
|
||||
api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url")
|
||||
http_code="${api_response:(-3)}"
|
||||
|
||||
if [[ "$http_code" == "404" ]]; then
|
||||
msg_error "Repository $repo has no Release candidate (404)"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ "$http_code" != "200" ]]; then
|
||||
$STD msg_info "Request failed with HTTP $http_code, retrying...\n"
|
||||
sleep $((attempt * 2))
|
||||
continue
|
||||
fi
|
||||
|
||||
api_response=$(</tmp/gh_resp.json)
|
||||
|
||||
if echo "$api_response" | grep -q "API rate limit exceeded"; then
|
||||
msg_error "GitHub API rate limit exceeded."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if echo "$api_response" | jq -e '.message == "Not Found"' &>/dev/null; then
|
||||
msg_error "Repository not found: $repo"
|
||||
return 1
|
||||
fi
|
||||
|
||||
tag=$(echo "$api_response" | jq -r '.tag_name // .name // empty')
|
||||
[[ "$tag" =~ ^v[0-9] ]] && tag="${tag:1}"
|
||||
|
||||
if [[ -z "$tag" ]]; then
|
||||
$STD msg_info "Empty tag received, retrying...\n"
|
||||
sleep $((attempt * 2))
|
||||
continue
|
||||
fi
|
||||
|
||||
$STD msg_ok "Found release: $tag for $repo"
|
||||
break
|
||||
done
|
||||
|
||||
if [[ -z "$tag" ]]; then
|
||||
msg_error "Failed to fetch release for $repo after $max_attempts attempts."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Version comparison (if we already have this version, skip)
|
||||
if [[ "$current_version" == "$tag" ]]; then
|
||||
$STD msg_info "Already running the latest version ($tag). Skipping update."
|
||||
return 0
|
||||
fi
|
||||
|
||||
local version="$tag"
|
||||
local base_url="https://github.com/$repo/releases/download/v$tag"
|
||||
local tmpdir
|
||||
tmpdir=$(mktemp -d) || return 1
|
||||
|
||||
# Extract list of assets from the Release API
|
||||
local assets urls
|
||||
assets=$(echo "$api_response" | jq -r '.assets[].browser_download_url') || true
|
||||
|
||||
# Detect current architecture
|
||||
local arch
|
||||
if command -v dpkg &>/dev/null; then
|
||||
arch=$(dpkg --print-architecture)
|
||||
elif command -v uname &>/dev/null; then
|
||||
case "$(uname -m)" in
|
||||
x86_64) arch="amd64" ;;
|
||||
aarch64) arch="arm64" ;;
|
||||
armv7l) arch="armv7" ;;
|
||||
armv6l) arch="armv6" ;;
|
||||
*) arch="unknown" ;;
|
||||
esac
|
||||
else
|
||||
arch="unknown"
|
||||
fi
|
||||
$STD msg_info "Detected system architecture: $arch"
|
||||
|
||||
# Try to find a matching asset for our architecture
|
||||
local url=""
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ $arch.*\.tar\.gz$ ]]; then
|
||||
url="$u"
|
||||
$STD msg_info "Found matching architecture asset: $url"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Fallback to other architectures if our specific one isn't found
|
||||
if [[ -z "$url" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ (x86_64|amd64|arm64|armv7|armv6).*\.tar\.gz$ ]]; then
|
||||
url="$u"
|
||||
$STD msg_info "Architecture-specific asset not found, using: $url"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Fallback to any tar.gz
|
||||
if [[ -z "$url" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ \.tar\.gz$ ]]; then
|
||||
url="$u"
|
||||
$STD msg_info "Using generic tarball: $url"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Final fallback to GitHub source tarball
|
||||
if [[ -z "$url" ]]; then
|
||||
url="https://github.com/$repo/archive/refs/tags/$version.tar.gz"
|
||||
$STD msg_info "Trying GitHub source tarball fallback: $url"
|
||||
fi
|
||||
|
||||
local filename="${url##*/}"
|
||||
$STD msg_info "Downloading $url"
|
||||
|
||||
if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then
|
||||
msg_error "Failed to download release asset from $url"
|
||||
rm -rf "$tmpdir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
mkdir -p "/opt/$app"
|
||||
|
||||
tar -xzf "$tmpdir/$filename" -C "$tmpdir"
|
||||
local content_root
|
||||
content_root=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d)
|
||||
if [[ $(echo "$content_root" | wc -l) -eq 1 ]]; then
|
||||
cp -r "$content_root"/* "/opt/$app/"
|
||||
else
|
||||
cp -r "$tmpdir"/* "/opt/$app/"
|
||||
fi
|
||||
|
||||
echo "$version" >"/opt/${app}_version.txt"
|
||||
$STD msg_ok "Deployed $app v$version to /opt/$app"
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
setup_local_ip_helper() {
|
||||
local BASE_DIR="/usr/local/community-scripts/ip-management"
|
||||
local SCRIPT_PATH="$BASE_DIR/update_local_ip.sh"
|
||||
local IP_FILE="/run/local-ip.env"
|
||||
local DISPATCHER_SCRIPT="/etc/networkd-dispatcher/routable.d/10-update-local-ip.sh"
|
||||
|
||||
mkdir -p "$BASE_DIR"
|
||||
|
||||
# Install networkd-dispatcher if not present
|
||||
if ! dpkg -s networkd-dispatcher >/dev/null 2>&1; then
|
||||
$STD apt-get update -qq
|
||||
$STD apt-get install -yq networkd-dispatcher
|
||||
fi
|
||||
|
||||
# Write update_local_ip.sh
|
||||
cat <<'EOF' >"$SCRIPT_PATH"
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
IP_FILE="/run/local-ip.env"
|
||||
mkdir -p "$(dirname "$IP_FILE")"
|
||||
|
||||
get_current_ip() {
|
||||
local targets=("8.8.8.8" "1.1.1.1" "192.168.1.1" "10.0.0.1" "172.16.0.1" "default")
|
||||
local ip
|
||||
|
||||
for target in "${targets[@]}"; do
|
||||
if [[ "$target" == "default" ]]; then
|
||||
ip=$(ip route get 1 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')
|
||||
else
|
||||
ip=$(ip route get "$target" 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')
|
||||
fi
|
||||
if [[ -n "$ip" ]]; then
|
||||
echo "$ip"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
current_ip="$(get_current_ip)"
|
||||
|
||||
if [[ -z "$current_ip" ]]; then
|
||||
echo "[ERROR] Could not detect local IP" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "$IP_FILE" ]]; then
|
||||
source "$IP_FILE"
|
||||
[[ "$LOCAL_IP" == "$current_ip" ]] && exit 0
|
||||
fi
|
||||
|
||||
echo "LOCAL_IP=$current_ip" > "$IP_FILE"
|
||||
echo "[INFO] LOCAL_IP updated to $current_ip"
|
||||
EOF
|
||||
|
||||
chmod +x "$SCRIPT_PATH"
|
||||
|
||||
# Install dispatcher hook
|
||||
mkdir -p "$(dirname "$DISPATCHER_SCRIPT")"
|
||||
cat <<EOF >"$DISPATCHER_SCRIPT"
|
||||
#!/bin/bash
|
||||
$SCRIPT_PATH
|
||||
EOF
|
||||
|
||||
chmod +x "$DISPATCHER_SCRIPT"
|
||||
systemctl enable --now networkd-dispatcher.service
|
||||
|
||||
$STD msg_ok "LOCAL_IP helper installed using networkd-dispatcher"
|
||||
}
|
||||
|
||||
import_local_ip() {
|
||||
local IP_FILE="/run/local-ip.env"
|
||||
if [[ -f "$IP_FILE" ]]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "$IP_FILE"
|
||||
fi
|
||||
|
||||
if [[ -z "${LOCAL_IP:-}" ]]; then
|
||||
get_current_ip() {
|
||||
local targets=("8.8.8.8" "1.1.1.1" "192.168.1.1" "10.0.0.1" "172.16.0.1" "default")
|
||||
local ip
|
||||
|
||||
for target in "${targets[@]}"; do
|
||||
if [[ "$target" == "default" ]]; then
|
||||
ip=$(ip route get 1 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')
|
||||
else
|
||||
ip=$(ip route get "$target" 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')
|
||||
fi
|
||||
if [[ -n "$ip" ]]; then
|
||||
echo "$ip"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
LOCAL_IP="$(get_current_ip || true)"
|
||||
if [[ -z "$LOCAL_IP" ]]; then
|
||||
msg_error "Could not determine LOCAL_IP"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export LOCAL_IP
|
||||
}
|
BIN
tools/addon/daemonsync_2.2.0.0059_amd64.deb
Normal file
BIN
tools/addon/daemonsync_2.2.0.0059_amd64.deb
Normal file
Binary file not shown.
@ -16,6 +16,7 @@ function header_info() {
|
||||
|
||||
EOF
|
||||
}
|
||||
set -eEuo pipefail
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
@ -35,6 +36,10 @@ done < <(pct list | awk 'NR>1')
|
||||
excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from cleaning:\n" \
|
||||
16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"')
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
function clean_container() {
|
||||
container=$1
|
||||
header_info
|
||||
|
@ -17,7 +17,7 @@ function header_info() {
|
||||
/____/
|
||||
EOF
|
||||
}
|
||||
|
||||
set -eEuo pipefail
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
CM='\xE2\x9C\x94\033'
|
||||
|
Reference in New Issue
Block a user