mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-23 18:02:58 +01:00
Compare commits
15
Commits
No files matched your search
+115
-25
@@ -207,8 +207,59 @@ jobs:
|
||||
NVMRC_NODE_MAJOR="$ver"
|
||||
}
|
||||
|
||||
# Same name in the core sense (_forge_is_script_app): case and punctuation
|
||||
# ignored, equal, or one containing the other with the shorter at least 4 long.
|
||||
name_matches() {
|
||||
local a="${1,,}" b="${2,,}" short
|
||||
a="${a//[^a-z0-9]/}"
|
||||
b="${b//[^a-z0-9]/}"
|
||||
[[ -n "$a" && -n "$b" ]] || return 1
|
||||
[[ "$a" == "$b" ]] && return 0
|
||||
short="$a"
|
||||
((${#b} < ${#a})) && short="$b"
|
||||
((${#short} >= 4)) || return 1
|
||||
[[ "$a" == *"$b"* || "$b" == *"$a"* ]]
|
||||
}
|
||||
|
||||
# The app's own repo from the GitHub calls in its scripts, for a Source line
|
||||
# that names a website. Only a repo or app argument matching the script's
|
||||
# name counts: discourse also deploys libvips, storyteller pulls readium/cli.
|
||||
# Usage: repo_from_calls "slug" file... => sets REPLY to owner/repo or empty
|
||||
repo_from_calls() {
|
||||
local slug="$1" text app repo
|
||||
shift
|
||||
REPLY=""
|
||||
text=$(cat "$@" 2>/dev/null | grep -v '^[[:space:]]*#' || true)
|
||||
while read -r app repo; do
|
||||
[[ -z "$repo" || "${repo,,}" == community-scripts/* ]] && continue
|
||||
if name_matches "$slug" "${repo#*/}" || { [[ "$app" != "-" ]] && name_matches "$slug" "$app"; }; then
|
||||
REPLY="$repo"
|
||||
return
|
||||
fi
|
||||
done < <(
|
||||
grep -oP '\b(?:fetch_and_deploy|check_for)_gh_(?:release|tag)\s+"?[^"\s]+"?\s+"?[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+' <<<"$text" |
|
||||
sed -E 's/^[a-z_]+[[:space:]]+"?([^"[:space:]]+)"?[[:space:]]+"?/\1 /' || true
|
||||
grep -oP '(?:get_latest_github_release\s+"?|(?<![\w.])github\.com/|api\.github\.com/repos/|codeload\.github\.com/)\K[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+' <<<"$text" |
|
||||
sed -E 's/\.git$//; s/^/- /' || true
|
||||
)
|
||||
}
|
||||
|
||||
# NODE_VERSION a script sets: a major, "dynamic", or "unset" (core's default)
|
||||
node_version_of() {
|
||||
local v
|
||||
v=$(grep -oP 'NODE_VERSION=\K"?\d+' "$1" | head -1 | grep -oP '\d+' || echo "")
|
||||
if [[ -n "$v" ]]; then
|
||||
echo "$v"
|
||||
elif grep -q 'NODE_VERSION=\$(' "$1"; then
|
||||
echo "dynamic"
|
||||
else
|
||||
echo "unset"
|
||||
fi
|
||||
}
|
||||
|
||||
# Collect results
|
||||
declare -a issue_scripts=()
|
||||
declare -a sync_scripts=()
|
||||
declare -a report_lines=()
|
||||
total=0
|
||||
checked=0
|
||||
@@ -222,6 +273,27 @@ jobs:
|
||||
|
||||
total=$((total + 1))
|
||||
slug=$(basename "$script" | sed 's/-install\.sh$//')
|
||||
our_version=$(node_version_of "$script")
|
||||
|
||||
# The update has to run the same setup_nodejs, or a bump in install/
|
||||
# reaches new containers only. An update with neither a release
|
||||
# check, a deploy nor a package manager call (a built-in updater,
|
||||
# "create a new container") has nothing to keep in step.
|
||||
ct_file="ct/${slug}.sh"
|
||||
ct_display="—"
|
||||
if [[ -f "$ct_file" ]] &&
|
||||
grep -qE '^[^#]*(\b(check_for|fetch_and_deploy)_|(^|[[:space:];&|(])(npm|npx|pnpm|yarn|corepack)[[:space:]])' "$ct_file"; then
|
||||
if grep -qE '^[^#]*\bsetup_nodejs\b' "$ct_file"; then
|
||||
ct_version=$(node_version_of "$ct_file")
|
||||
else
|
||||
ct_version="none"
|
||||
fi
|
||||
ct_display="$ct_version"
|
||||
if [[ "$ct_version" != "$our_version" ]]; then
|
||||
ct_display="⚠️ $ct_version"
|
||||
sync_scripts+=("$slug|$our_version|$ct_version")
|
||||
fi
|
||||
fi
|
||||
|
||||
# Extract Source URL (GitHub only) from the "# Source:" line
|
||||
# Supports both:
|
||||
@@ -229,29 +301,20 @@ jobs:
|
||||
# # Source: https://example.com | Github: https://github.com/owner/repo
|
||||
# NOTE: Must filter for "# Source:" line first to avoid matching the License URL
|
||||
source_url=$(head -20 "$script" | grep -i '# Source:' | grep -oP 'https://github\.com/[^\s|]+' | head -1 || echo "")
|
||||
if [[ -z "$source_url" ]]; then
|
||||
report_lines+=("| \`$slug\` | — | — | — | — | ⏭️ No GitHub source |")
|
||||
continue
|
||||
repo=$(sed -E 's|https://github\.com/||; s|\.git$||' <<<"$source_url" | cut -d/ -f1,2)
|
||||
repo_note=""
|
||||
if [[ ! "$repo" =~ ^[^/]+/[^/]+$ ]]; then
|
||||
repo_from_calls "$slug" "$script" "$ct_file"
|
||||
repo="$REPLY"
|
||||
repo_note=" (from calls)"
|
||||
fi
|
||||
|
||||
repo=$(echo "$source_url" | sed -E 's|https://github\.com/||; s|/$||; s|\.git$||')
|
||||
if [[ -z "$repo" || "$repo" != */* ]]; then
|
||||
report_lines+=("| \`$slug\` | — | — | — | — | ⏭️ Invalid repo |")
|
||||
if [[ -z "$repo" ]]; then
|
||||
report_lines+=("| \`$slug\` | $our_version | $ct_display | — | — | — | ⏭️ No GitHub source |")
|
||||
continue
|
||||
fi
|
||||
|
||||
checked=$((checked + 1))
|
||||
|
||||
# Extract our NODE_VERSION
|
||||
our_version=$(grep -oP 'NODE_VERSION=\K"?\d+' "$script" | head -1 | grep -oP '\d+' || echo "")
|
||||
if [[ -z "$our_version" ]]; then
|
||||
if grep -q 'NODE_VERSION=\$(' "$script"; then
|
||||
our_version="dynamic"
|
||||
else
|
||||
our_version="unset"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Determine default branch via GitHub API (fast, single call)
|
||||
detected_branch=""
|
||||
api_default=$(curl -sf -H "Authorization: token $GH_TOKEN" \
|
||||
@@ -352,40 +415,45 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
|
||||
report_lines+=("| \`$slug\` | $our_version | $engines_display | $dockerfile_display | [$repo](https://github.com/$repo) | $status |")
|
||||
report_lines+=("| \`$slug\` | $our_version | $ct_display | $engines_display | $dockerfile_display | [$repo](https://github.com/$repo)$repo_note | $status |")
|
||||
|
||||
# Rate-limit to avoid GitHub secondary rate limits
|
||||
sleep 0.3
|
||||
|
||||
done
|
||||
|
||||
sync_count=${#sync_scripts[@]}
|
||||
|
||||
# Print summary
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo " Total scripts with setup_nodejs: $total"
|
||||
echo " Checked (with GitHub source): $checked"
|
||||
echo " Version drift detected: $drift_count"
|
||||
echo " ct/ update out of step: $sync_count"
|
||||
echo "========================================="
|
||||
|
||||
# Export
|
||||
{
|
||||
echo "drift_count=$drift_count"
|
||||
echo "sync_count=$sync_count"
|
||||
echo "total=$total"
|
||||
echo "checked=$checked"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Save issue details for next step
|
||||
printf '%s\n' "${issue_scripts[@]}" > /tmp/drift_scripts.txt 2>/dev/null || touch /tmp/drift_scripts.txt
|
||||
printf '%s\n' "${sync_scripts[@]}" > /tmp/sync_scripts.txt 2>/dev/null || touch /tmp/sync_scripts.txt
|
||||
|
||||
# Save full report
|
||||
{
|
||||
echo "## Node.js Version Drift Report"
|
||||
echo ""
|
||||
echo "**Generated:** $(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
echo "**Scripts checked:** $total | **With GitHub source:** $checked | **Drift detected:** $drift_count"
|
||||
echo "**Scripts checked:** $total | **With GitHub source:** $checked | **Drift detected:** $drift_count | **ct/ out of step:** $sync_count"
|
||||
echo ""
|
||||
echo "| Script | Our Version | engines.node | Dockerfile | Upstream Repo | Status |"
|
||||
echo "|--------|-------------|-------------|------------|---------------|--------|"
|
||||
echo "| Script | Our Version | ct/ update | engines.node | Dockerfile | Upstream Repo | Status |"
|
||||
echo "|--------|-------------|------------|-------------|------------|---------------|--------|"
|
||||
printf '%s\n' "${report_lines[@]}" | sort
|
||||
} > /tmp/drift_report.md
|
||||
|
||||
@@ -478,12 +546,21 @@ jobs:
|
||||
continue
|
||||
fi
|
||||
|
||||
# Without the ct/ line the bump reaches new containers only.
|
||||
ct_note=""
|
||||
if [[ -f "ct/${slug}.sh" && " ${changed[*]} " != *" ct/${slug}.sh "* ]]; then
|
||||
ct_note="> [!WARNING]
|
||||
> \`ct/${slug}.sh\` sets no Node ${our} in its update, so existing containers stay on it. Add \`NODE_VERSION=\"${upstream}\" setup_nodejs\` to the update before merging."
|
||||
fi
|
||||
|
||||
# The test command is written here rather than left to
|
||||
# pr-test-command.yml: a PR opened with GITHUB_TOKEN does not start
|
||||
# another workflow, so that comment would never arrive.
|
||||
body=$(cat <<PR_EOF
|
||||
\`${slug}\` pins Node **${our}**, upstream indicates **${upstream}** (${hint}) — [upstream repo](https://github.com/${repo}).
|
||||
|
||||
${ct_note}
|
||||
|
||||
Opened automatically by the weekly Node.js version drift check. **Nothing here has been tested.** Run it against a host before merging:
|
||||
|
||||
\`\`\`bash
|
||||
@@ -528,7 +605,7 @@ jobs:
|
||||
cat /tmp/drift_prs.txt
|
||||
|
||||
- name: Create or update summary issue
|
||||
if: steps.check.outputs.drift_count != '0'
|
||||
if: steps.check.outputs.drift_count != '0' || steps.check.outputs.sync_count != '0'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
@@ -537,6 +614,7 @@ jobs:
|
||||
TITLE="[Automated] Node.js Version Drift Report"
|
||||
DATE=$(date -u +%Y-%m-%d)
|
||||
DRIFT_COUNT="${{ steps.check.outputs.drift_count }}"
|
||||
SYNC_COUNT="${{ steps.check.outputs.sync_count }}"
|
||||
TOTAL="${{ steps.check.outputs.total }}"
|
||||
CHECKED="${{ steps.check.outputs.checked }}"
|
||||
|
||||
@@ -567,17 +645,29 @@ jobs:
|
||||
CHECKLIST+="${mark} **\`${slug}\`** — ours: \`${our_version}\` → upstream: \`${upstream_major}\` (${upstream_hint}) — [repo](https://github.com/${repo}) ${note}"$'\n'
|
||||
done < /tmp/drift_scripts.txt
|
||||
|
||||
SYNC_SECTION=""
|
||||
if [[ "$SYNC_COUNT" != "0" ]]; then
|
||||
SYNC_SECTION="### ct/ update out of step with install/"$'\n\n'
|
||||
SYNC_SECTION+="The update does not run the install's \`setup_nodejs\`, so a Node bump reaches new containers only. Put the install's call at the top of the update's release block."$'\n\n'
|
||||
while IFS='|' read -r slug our_version ct_version; do
|
||||
[[ -z "$slug" ]] && continue
|
||||
SYNC_SECTION+="- [ ] **\`${slug}\`** — install/: \`${our_version}\`, ct/ update: \`${ct_version}\`"$'\n'
|
||||
done < /tmp/sync_scripts.txt
|
||||
fi
|
||||
|
||||
# Build full report table
|
||||
REPORT=$(cat /tmp/drift_report.md)
|
||||
|
||||
BODY=$(cat <<ISSUE_EOF
|
||||
## Node.js Version Drift Report — ${DATE}
|
||||
|
||||
**${DRIFT_COUNT}** script(s) with version drift detected (out of ${CHECKED} checked / ${TOTAL} total).
|
||||
**${DRIFT_COUNT}** script(s) with version drift detected (out of ${CHECKED} checked / ${TOTAL} total), **${SYNC_COUNT}** ct/ update(s) out of step.
|
||||
|
||||
### Scripts requiring investigation
|
||||
|
||||
${CHECKLIST}
|
||||
${CHECKLIST:-None.}
|
||||
|
||||
${SYNC_SECTION}
|
||||
|
||||
### How to resolve
|
||||
|
||||
@@ -616,7 +706,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Close issue if no drift
|
||||
if: steps.check.outputs.drift_count == '0'
|
||||
if: steps.check.outputs.drift_count == '0' && steps.check.outputs.sync_count == '0'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
|
||||
+13
-1
@@ -591,7 +591,9 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Anubis [@opastorello](https://github.com/opastorello) ([#18926](https://github.com/community-scripts/ProxmoxVE/pull/18926))
|
||||
- FreeScout [@MickLesk](https://github.com/MickLesk) ([#18930](https://github.com/community-scripts/ProxmoxVE/pull/18930))
|
||||
- Anubis [@opastorello](https://github.com/opastorello) ([#18926](https://github.com/community-scripts/ProxmoxVE/pull/18926))
|
||||
- OpenViking [@mfelipe](https://github.com/mfelipe) ([#18979](https://github.com/community-scripts/ProxmoxVE/pull/18979))
|
||||
- Oracle Linux [@MickLesk](https://github.com/MickLesk) ([#18945](https://github.com/community-scripts/ProxmoxVE/pull/18945))
|
||||
- Kali Linux [@MickLesk](https://github.com/MickLesk) ([#18946](https://github.com/community-scripts/ProxmoxVE/pull/18946))
|
||||
- Linux Mint [@MickLesk](https://github.com/MickLesk) ([#18948](https://github.com/community-scripts/ProxmoxVE/pull/18948))
|
||||
@@ -600,9 +602,19 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- portabase: bump Node.js from 22 to 24 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18988](https://github.com/community-scripts/ProxmoxVE/pull/18988))
|
||||
- t3code: bump Node.js from 24 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18959](https://github.com/community-scripts/ProxmoxVE/pull/18959))
|
||||
- airconnect: fix disabled service restart, static binary cleanup, and flag overrides [@cwmoriarty](https://github.com/cwmoriarty) ([#18955](https://github.com/community-scripts/ProxmoxVE/pull/18955))
|
||||
- bulwark: bump Node.js from 24 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18957](https://github.com/community-scripts/ProxmoxVE/pull/18957))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- wg-easy ([#18972](https://github.com/community-scripts/ProxmoxVE/pull/18972))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- github node drift: find the repo from the script's calls, check ct/ and install/ [@MickLesk](https://github.com/MickLesk) ([#18984](https://github.com/community-scripts/ProxmoxVE/pull/18984))
|
||||
|
||||
## 2026-11-22
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/activepieces/activepieces
|
||||
|
||||
APP="Activepieces"
|
||||
var_tags="${var_tags:-automation;workflow;ai}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-6144}"
|
||||
var_disk="${var_disk:-12}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/activepieces ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "activepieces" "activepieces/activepieces"; then
|
||||
msg_info "Stopping Activepieces"
|
||||
systemctl stop activepieces activepieces-worker
|
||||
msg_ok "Stopped Activepieces"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "activepieces" "activepieces/activepieces" "tarball"
|
||||
NODE_VERSION="24" NODE_MODULE="$(jq -r '.packageManager' /opt/activepieces/package.json)" setup_nodejs
|
||||
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "v$(jq -r '.devDependencies.deno' /opt/activepieces/packages/server/engine/package.json)" "/usr/local/bin" "deno-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
|
||||
|
||||
msg_info "Building Activepieces"
|
||||
cd /opt/activepieces
|
||||
REDISMS_DISABLE_POSTINSTALL=1 $STD bun install --frozen-lockfile
|
||||
$STD npx turbo run build --filter=web --filter=@activepieces/engine --filter=api --filter=worker
|
||||
find dist/packages/web -name '*.map' -delete
|
||||
rm -rf node_modules bun.lock packages/pieces/core packages/pieces/custom packages/web packages/cli packages/tests-e2e packages/ee
|
||||
find packages/pieces/community -mindepth 1 -maxdepth 1 -type d ! -name slack ! -name square ! -name facebook-leads ! -name intercom ! -name microsoft-teams-bot -exec rm -rf {} +
|
||||
node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.workspaces=p.workspaces.filter(w=>fs.existsSync(w.replace('/*','')));fs.writeFileSync('package.json',JSON.stringify(p,null,2))"
|
||||
REDISMS_DISABLE_POSTINSTALL=1 $STD bun install --production
|
||||
rm -rf ~/.bun/install/cache
|
||||
msg_ok "Built Activepieces"
|
||||
|
||||
msg_info "Starting Activepieces"
|
||||
systemctl start activepieces activepieces-worker
|
||||
msg_ok "Started Activepieces"
|
||||
msg_ok "Updated successfully!"
|
||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
fi
|
||||
ensure_dependencies memcached libmemcached-tools
|
||||
if check_for_gh_release "adventurelog" "seanmorley15/adventurelog"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop adventurelog-backend
|
||||
systemctl stop adventurelog-frontend
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
|
||||
RELEASE="v0.27.3"
|
||||
if check_for_gh_release "affine_app" "toeverything/AFFiNE" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop affine-web affine-worker
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "airtrail" "johanohly/AirTrail"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop airtrail
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -36,6 +36,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "anythingllm" "Mintplex-Labs/anything-llm"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop anythingllm anythingllm-collector
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -34,6 +34,8 @@ function update_script() {
|
||||
ensure_dependencies ffmpeg
|
||||
|
||||
if check_for_gh_release "bambuddy" "maziggy/bambuddy"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop bambuddy
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "baserow" "baserow/baserow"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop baserow-backend baserow-celery baserow-celery-beat baserow-celery-export baserow-frontend
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
|
||||
local changed=0
|
||||
if check_for_gh_release "borg-ui" "karanhudia/borg-ui"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
changed=1
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop borg-ui
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "budget-board" "teelur/budget-board"; then
|
||||
NODE_VERSION=25 setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop budget-board
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "bytestash" "jordan-dalby/ByteStash"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop bytestash-backend bytestash-frontend
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "checkmate" "bluewave-labs/Checkmate"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop checkmate-server checkmate-client nginx
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "colanode" "colanode/colanode"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop colanode-server
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "ConvertX" "C4illin/ConvertX"; then
|
||||
NODE_VERSION="22" NODE_MODULE="bun" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop convertx
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "convex" "get-convex/convex-backend"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Convex"
|
||||
systemctl stop convex
|
||||
msg_ok "Stopped Convex"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
# Updates to 2026.10.0 finished without infra.js; run them again so it gets written
|
||||
[[ -f /opt/cryptpad/config/infra.example.js && ! -f /opt/cryptpad/config/infra.js ]] && rm -f ~/.cryptpad
|
||||
if check_for_gh_release "cryptpad" "cryptpad/cryptpad"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop cryptpad
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "cyberchef" "gchq/CyberChef"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop caddy
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -48,6 +48,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "dawarich" "Freika/dawarich"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop dawarich-web dawarich-worker
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,7 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "directus" "directus/directus"; then
|
||||
NODE_VERSION="26" setup_nodejs
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop directus
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -69,6 +69,8 @@ function update_script() {
|
||||
msg_ok "Built libvips"
|
||||
fi
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Updating Dependencies"
|
||||
RUBY_TARGET=$(grep -A1 '^RUBY VERSION' /opt/discourse/Gemfile.lock | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -n1)
|
||||
RUBY_VERSION="${RUBY_TARGET:-4.0.7}" RUBY_INSTALL_RAILS="false" setup_ruby
|
||||
|
||||
@@ -44,6 +44,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "docuseal" "docusealco/docuseal"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop docuseal docuseal-sidekiq
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_tag "drawdb" "drawdb-io/drawdb"; then
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "drawdb" "drawdb-io/drawdb" "latest" "/opt/drawdb"
|
||||
|
||||
msg_info "Rebuilding Frontend"
|
||||
|
||||
@@ -35,6 +35,8 @@ function update_script() {
|
||||
SITE="$(ls /opt/frappe-bench/sites/*/site_config.json 2>/dev/null | head -1 | cut -d/ -f5)"
|
||||
[[ -z "$SITE" ]] && SITE="site1.local"
|
||||
|
||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping ERPNext service"
|
||||
$STD supervisorctl stop all
|
||||
msg_ok "Stopped ERPNext service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "etherpad-lite" "ether/etherpad"; then
|
||||
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop etherpad
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -34,6 +34,8 @@ function update_script() {
|
||||
ensure_dependencies build-essential ccache
|
||||
|
||||
if check_for_gh_release "firecrawl" "firecrawl/firecrawl"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@11.4.0" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop firecrawl firecrawl-playwright
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "fireshare" "ShaneIsrael/fireshare"; then
|
||||
NODE_VERSION=24 setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop fireshare
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "flame" "pawelmalak/flame"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop flame
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "foldergram" "foldergram/foldergram"; then
|
||||
NODE_VERSION=25 NODE_MODULE="corepack" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop foldergram
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/freescout-help-desk/freescout
|
||||
|
||||
APP="FreeScout"
|
||||
var_tags="${var_tags:-helpdesk;ticketing}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_email="${var_admin_email:-}"
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/freescout ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "freescout" "freescout-help-desk/freescout"; then
|
||||
msg_info "Stopping FreeScout"
|
||||
systemctl stop cron nginx php8.4-fpm
|
||||
pkill -u www-data -f artisan || true
|
||||
msg_ok "Stopped FreeScout"
|
||||
|
||||
create_backup /opt/freescout/.env
|
||||
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="storage Modules public/modules" fetch_and_deploy_gh_release "freescout" "freescout-help-desk/freescout" "tarball"
|
||||
restore_backup
|
||||
|
||||
msg_info "Updating FreeScout"
|
||||
cd /opt/freescout
|
||||
$STD php artisan freescout:after-app-update
|
||||
$STD php artisan storage:link
|
||||
chown -R www-data:www-data /opt/freescout
|
||||
msg_ok "Updated FreeScout"
|
||||
|
||||
msg_info "Starting FreeScout"
|
||||
systemctl start php8.4-fpm nginx cron
|
||||
msg_ok "Started FreeScout"
|
||||
msg_ok "Updated successfully!"
|
||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
echo -e "${INFO}${YW}Admin credentials: ~/freescout.creds (inside the container)${CL}"
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "ghostfolio" "ghostfolio/ghostfolio"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop ghostfolio
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -35,6 +35,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "actions-runner" "actions/runner"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop actions-runner
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -34,6 +34,8 @@ function update_script() {
|
||||
ensure_dependencies git
|
||||
|
||||
if check_for_gh_release "grist" "gristlabs/grist-core"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop grist
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -78,6 +78,8 @@ EOF
|
||||
fi
|
||||
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable hermes-dashboard'
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Updating Hermes Agent"
|
||||
$STD setsid --wait runuser -l hermes -c '
|
||||
set -a; source /etc/default/hermes; set +a
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "homelable" "Pouzor/homelable"; then
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop homelable
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "ignis" "Nystik-gh/ignis"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop ignis
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -51,6 +51,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "immichframe" "immichFrame/ImmichFrame"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop immichframe
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -40,6 +40,8 @@ EOF
|
||||
fi
|
||||
|
||||
if check_for_gh_release "invoiceshelf" "InvoiceShelf/InvoiceShelf"; then
|
||||
NODE_VERSION="24" NODE_MODULE="corepack,pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop caddy
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "koel" "koel/koel"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop nginx php8.4-fpm
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "kutt" "thedevs-network/kutt"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping services"
|
||||
systemctl stop kutt
|
||||
msg_ok "Stopped services"
|
||||
|
||||
@@ -35,6 +35,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "langflow" "langflow-ai/langflow"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Langflow"
|
||||
systemctl stop langflow
|
||||
msg_ok "Stopped Langflow"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_tag "librechat" "danny-avila/LibreChat" "v"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop librechat rag-api
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "lingarr" "lingarr-translate/lingarr"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop lingarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -42,6 +42,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "linkding" "sissbruecker/linkding"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop nginx linkding linkding-tasks
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "lobehub" "lobehub/lobehub"; then
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop lobehub
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "localagi" "mudler/LocalAGI"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop localagi
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -30,6 +30,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "mafl" "hywax/mafl"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
|
||||
msg_info "Stopping Mafl service"
|
||||
systemctl stop mafl
|
||||
msg_ok "Service stopped"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "mastodon" "mastodon/mastodon"; then
|
||||
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop mastodon-web mastodon-sidekiq mastodon-streaming
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "matter-hub" "RiDDiX/home-assistant-matter-hub"; then
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@^10" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop matter-hub
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "mediamanager" "maxdorninger/MediaManager"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop mediamanager
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -30,6 +30,8 @@ function update_script() {
|
||||
|
||||
if [[ -d /opt/meilisearch-ui ]]; then
|
||||
if check_for_gh_release "meilisearch-ui" "riccox/meilisearch-ui"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
|
||||
|
||||
msg_info "Stopping Meilisearch-UI"
|
||||
systemctl stop meilisearch-ui
|
||||
msg_ok "Stopped Meilisearch-UI"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "mini-qr" "lyqht/mini-qr"; then
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop caddy
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -30,6 +30,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "myspeed" "gnmyt/myspeed"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop myspeed
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "neko" "m1k1o/neko"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop neko
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "nightscout" "nightscout/cgm-remote-monitor"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop nightscout
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "nodebb" "NodeBB/NodeBB"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop nodebb
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "nodecast-tv" "technomancer702/nodecast-tv"; then
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop nodecast-tv
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
setup_meilisearch
|
||||
|
||||
if check_for_gh_release "openarchiver" "LogicLabs-OU/OpenArchiver"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop openarchiver
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -34,6 +34,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "openthread-br" "openthread/ot-br-posix"; then
|
||||
setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop otbr-web
|
||||
systemctl stop otbr-agent
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Marcos Felipe (mfelipe)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/volcengine/OpenViking
|
||||
|
||||
APP="OpenViking"
|
||||
var_tags="${var_tags:-ai;memory;rag}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/openviking ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating Debian Packages"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated Debian Packages"
|
||||
|
||||
if check_for_gh_release "openviking-server" "volcengine/OpenViking"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop openviking
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating OpenViking"
|
||||
$STD uv pip install --python /opt/openviking/bin/python --upgrade openviking
|
||||
msg_ok "Updated OpenViking"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start openviking
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
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}:1933/studio${CL}"
|
||||
@@ -30,6 +30,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "pairdrop" "schlagmichdoch/PairDrop"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop pairdrop
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -34,6 +34,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "paperclip-ai" "paperclipai/paperclip"; then
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop paperclip
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "passwordpusher" "pglombardo/PasswordPusher"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop passwordpusher
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "peertube" "Chocobozzz/PeerTube"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@^10" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop peertube
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "pinchflat" "TheBadFella/Pinchflat-NGX"; then
|
||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop pinchflat
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ EOF
|
||||
|
||||
create_backup /opt/portabase/.env
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@11.8.0" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@11.8.0" setup_nodejs
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "portabase" "Portabase/portabase" "tarball"
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "postiz" "gitroomhq/postiz-app"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop postiz-orchestrator postiz-frontend postiz-backend
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -54,6 +54,8 @@ EOF
|
||||
fi
|
||||
|
||||
if check_for_gh_release "readmeabook" "kikootwo/ReadMeABook"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop readmeabook
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "revealjs" "hakimel/reveal.js"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop revealjs
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "securo" "securo-finance/securo"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop securo securo-worker securo-beat
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "seelf" "YuukanOO/seelf"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop seelf
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
setup_mariadb
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Updating Shinobi"
|
||||
cd /opt/Shinobi
|
||||
$STD sh UPDATE.sh
|
||||
|
||||
@@ -33,6 +33,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "simplelogin" "simple-login/app"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop simplelogin-webapp simplelogin-email simplelogin-job
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -37,6 +37,8 @@ function update_script() {
|
||||
check_for_gh_release "snapotter" "snapotter-hq/SnapOtter" && UPDATE_AVAILABLE=true
|
||||
|
||||
if [[ "$NEEDS_V2_MIGRATION" == true || "$UPDATE_AVAILABLE" == true ]]; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop snapotter
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "solidtime" "solidtime-io/solidtime"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop caddy
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "split-pro" "oss-apps/split-pro"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop split-pro
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -39,6 +39,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Updating Storybook"
|
||||
cd "$PROJECT_PATH"
|
||||
$STD npx storybook@latest upgrade --yes
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "suggestarr" "giuseppe99barchetta/SuggestArr"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop suggestarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "super-productivity" "super-productivity/super-productivity"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "super-productivity" "super-productivity/super-productivity" "tarball"
|
||||
|
||||
msg_info "Building Web App"
|
||||
|
||||
@@ -30,6 +30,8 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="26" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop t3code
|
||||
|
||||
@@ -34,6 +34,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "tasmocompiler" "benzino77/tasmocompiler"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop tasmocompiler
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -43,6 +43,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "teable" "teableio/teable"; then
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop teable
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "teslamate" "teslamate-org/teslamate"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop teslamate
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -37,6 +37,8 @@ function update_script() {
|
||||
fetch_and_deploy_gh_release "pandoc" "jgm/pandoc" "binary" "latest" "" "pandoc-*-$(arch_resolve).deb"
|
||||
|
||||
if check_for_gh_release "transmute" "transmute-app/transmute"; then
|
||||
NODE_VERSION="25" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop transmute
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "trip" "itskovacs/TRIP"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop trip
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/systemd/system/bgutil-provider.service ]]; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Adding BgUtil POT Provider"
|
||||
ensure_dependencies ffmpeg libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config
|
||||
fetch_and_deploy_gh_release "bgutil-ytdlp-pot-provider" "Brainicism/bgutil-ytdlp-pot-provider" "tarball"
|
||||
@@ -58,6 +60,8 @@ EOF
|
||||
fi
|
||||
|
||||
if check_for_gh_release "tubearchivist" "tubearchivist/tubearchivist"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop bgutil-provider tubearchivist tubearchivist-celery tubearchivist-beat
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -40,6 +40,8 @@ function update_script() {
|
||||
ENABLE_GPU="yes" setup_hwaccel
|
||||
fi
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Updating ${APP} (Patience)"
|
||||
curl -fsSL https://unsloth.ai/install.sh -o /tmp/unsloth-install.sh
|
||||
export UNSLOTH_STUDIO_HOME=/opt/unsloth
|
||||
|
||||
@@ -175,6 +175,8 @@ EOF
|
||||
fi
|
||||
|
||||
if check_for_gh_release "wanderer" "open-wanderer/wanderer"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping service"
|
||||
systemctl stop wanderer-web
|
||||
msg_ok "Stopped service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "wizarr" "wizarrrr/wizarr"; then
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop wizarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "xyops" "pixlcore/xyops"; then
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop xyops
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "yopass" "jhaals/yopass"; then
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop yopass
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
@@ -32,6 +32,8 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "your-spotify" "Yooooomi/your_spotify"; then
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@^10,serve" setup_nodejs
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop your-spotify your-spotify-web
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
@@ -35,6 +35,8 @@ function update_script() {
|
||||
systemctl stop zerotier-one
|
||||
msg_ok "Stopping Service"
|
||||
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
|
||||
msg_info "Updating Zerotier-One"
|
||||
apt_update_safe
|
||||
$STD apt upgrade -y
|
||||
|
||||
@@ -1,114 +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/activepieces/activepieces
|
||||
|
||||
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 \
|
||||
build-essential \
|
||||
python3 \
|
||||
poppler-utils \
|
||||
redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql
|
||||
PG_DB_NAME="activepieces" PG_DB_USER="activepieces" PG_DB_EXTENSIONS="vector" setup_postgresql_db
|
||||
|
||||
fetch_and_deploy_gh_release "activepieces" "activepieces/activepieces" "tarball"
|
||||
NODE_VERSION="24" NODE_MODULE="$(jq -r '.packageManager' /opt/activepieces/package.json)" setup_nodejs
|
||||
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "v$(jq -r '.devDependencies.deno' /opt/activepieces/packages/server/engine/package.json)" "/usr/local/bin" "deno-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
|
||||
|
||||
msg_info "Building Activepieces"
|
||||
cd /opt/activepieces
|
||||
REDISMS_DISABLE_POSTINSTALL=1 $STD bun install --frozen-lockfile
|
||||
$STD npx turbo run build --filter=web --filter=@activepieces/engine --filter=api --filter=worker
|
||||
find dist/packages/web -name '*.map' -delete
|
||||
rm -rf node_modules bun.lock packages/pieces/core packages/pieces/custom packages/web packages/cli packages/tests-e2e packages/ee
|
||||
find packages/pieces/community -mindepth 1 -maxdepth 1 -type d ! -name slack ! -name square ! -name facebook-leads ! -name intercom ! -name microsoft-teams-bot -exec rm -rf {} +
|
||||
node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.workspaces=p.workspaces.filter(w=>fs.existsSync(w.replace('/*','')));fs.writeFileSync('package.json',JSON.stringify(p,null,2))"
|
||||
REDISMS_DISABLE_POSTINSTALL=1 $STD bun install --production
|
||||
rm -rf ~/.bun/install/cache
|
||||
msg_ok "Built Activepieces"
|
||||
|
||||
msg_info "Configuring Activepieces"
|
||||
mkdir -p /opt/activepieces_data/cache
|
||||
JWT_SECRET=$(openssl rand -hex 32)
|
||||
cat <<EOF >/opt/activepieces_data/.env
|
||||
NODE_ENV=production
|
||||
AP_ENVIRONMENT=prod
|
||||
AP_PORT=80
|
||||
AP_FRONTEND_URL=http://${LOCAL_IP}
|
||||
AP_API_KEY=$(openssl rand -hex 64)
|
||||
AP_ENCRYPTION_KEY=$(openssl rand -hex 16)
|
||||
AP_JWT_SECRET=${JWT_SECRET}
|
||||
AP_WORKER_TOKEN=$(node -e "process.stdout.write(require('jsonwebtoken').sign({ id: require('crypto').randomUUID(), type: 'WORKER' }, process.argv[1], { expiresIn: '100y', keyid: '1', algorithm: 'HS256', issuer: 'activepieces' }))" "${JWT_SECRET}")
|
||||
AP_POSTGRES_HOST=localhost
|
||||
AP_POSTGRES_PORT=5432
|
||||
AP_POSTGRES_DATABASE=activepieces
|
||||
AP_POSTGRES_USERNAME=activepieces
|
||||
AP_POSTGRES_PASSWORD=${PG_DB_PASS}
|
||||
AP_REDIS_HOST=localhost
|
||||
AP_REDIS_PORT=6379
|
||||
AP_EXECUTION_MODE=UNSANDBOXED
|
||||
AP_DENO_PATH=/usr/local/bin/deno
|
||||
AP_CACHE_BASE_PATH=/opt/activepieces_data/cache
|
||||
AP_CONFIG_PATH=/opt/activepieces_data
|
||||
AP_TELEMETRY_ENABLED=false
|
||||
EOF
|
||||
chmod 600 /opt/activepieces_data/.env
|
||||
msg_ok "Configured Activepieces"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/activepieces.service
|
||||
[Unit]
|
||||
Description=Activepieces
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Wants=activepieces-worker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/activepieces
|
||||
EnvironmentFile=/opt/activepieces_data/.env
|
||||
Environment=AP_CONTAINER_TYPE=APP
|
||||
ExecStart=/usr/bin/node --enable-source-maps packages/server/api/dist/src/bootstrap.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/activepieces-worker.service
|
||||
[Unit]
|
||||
Description=Activepieces Worker
|
||||
After=activepieces.service
|
||||
PartOf=activepieces.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/activepieces
|
||||
EnvironmentFile=/opt/activepieces_data/.env
|
||||
ExecStart=/usr/bin/node --enable-source-maps packages/server/worker/dist/src/bootstrap.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now activepieces activepieces-worker
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
|
||||
$STD apt install -y build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
NODE_VERSION="26" setup_nodejs
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="directus" PG_DB_USER="directus" setup_postgresql_db
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
#!/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/freescout-help-desk/freescout
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
var_admin_email="${var_admin_email:-admin@example.com}"
|
||||
if [[ ! "$var_admin_email" =~ ^[^@[:space:]]+@[^@[:space:]]+\.[^@[:space:]]+$ ]]; then
|
||||
msg_warn "Invalid admin email '${var_admin_email}', using admin@example.com"
|
||||
var_admin_email="admin@example.com"
|
||||
fi
|
||||
var_admin_pass="${var_admin_pass:-$(random_password 16)}"
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="freescout" MARIADB_DB_USER="freescout" setup_mariadb_db
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
|
||||
fetch_and_deploy_gh_release "freescout" "freescout-help-desk/freescout" "tarball"
|
||||
|
||||
msg_info "Configuring FreeScout"
|
||||
cd /opt/freescout
|
||||
cat <<EOF >/opt/freescout/.env
|
||||
APP_URL=http://${LOCAL_IP}
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=freescout
|
||||
DB_USERNAME=freescout
|
||||
DB_PASSWORD=${MARIADB_DB_PASS}
|
||||
APP_KEY=
|
||||
EOF
|
||||
$STD php artisan key:generate --force
|
||||
$STD php artisan storage:link
|
||||
$STD php artisan migrate --force
|
||||
$STD php artisan freescout:create-user --role=admin --firstName=Admin --lastName=FreeScout --email="$var_admin_email" --password="$var_admin_pass" --no-interaction
|
||||
touch /opt/freescout/storage/.installed
|
||||
$STD php artisan freescout:clear-cache
|
||||
chown -R www-data:www-data /opt/freescout
|
||||
cat <<EOF >>~/freescout.creds
|
||||
|
||||
FreeScout Admin
|
||||
Email: ${var_admin_email}
|
||||
Password: ${var_admin_pass}
|
||||
EOF
|
||||
chmod 600 ~/freescout.creds
|
||||
msg_ok "Configured FreeScout"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
sed -i 's/^;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php/8.4/fpm/php.ini
|
||||
systemctl restart php8.4-fpm
|
||||
PHP_SOCK=$(get_php_fpm_socket)
|
||||
cat <<EOF >/etc/nginx/sites-available/freescout
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
|
||||
root /opt/freescout/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
client_max_body_size 128M;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
}
|
||||
location ~ \.php\$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)\$;
|
||||
fastcgi_pass unix:${PHP_SOCK};
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location ~* ^/storage/attachment/ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
}
|
||||
location ~* ^/(?:css|js)/.*\.(?:css|js)\$ {
|
||||
expires 2d;
|
||||
access_log off;
|
||||
add_header Cache-Control "public, must-revalidate";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
}
|
||||
location ~* ^/storage/.*\.((?!(jpg|jpeg|jfif|pjpeg|pjp|apng|bmp|gif|ico|cur|png|tif|tiff|webp|pdf|txt|diff|patch|json|mp3|wav|ogg|wma)).)*\$ {
|
||||
add_header Content-disposition "attachment; filename=\$2";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
default_type application/octet-stream;
|
||||
}
|
||||
location ~* ^/(storage/|.*\.).*\$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
add_header Cache-Control "public";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
}
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
nginx_enable_site "freescout"
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Setting up Cron"
|
||||
cat <<EOF >/etc/cron.d/freescout
|
||||
* * * * * www-data php /opt/freescout/artisan schedule:run >/dev/null 2>&1
|
||||
EOF
|
||||
systemctl enable -q --now cron
|
||||
msg_ok "Set up Cron"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Marcos Felipe (mfelipe)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/volcengine/OpenViking
|
||||
|
||||
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 openssl
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Installing OpenViking"
|
||||
$STD uv venv --python 3.12 /opt/openviking
|
||||
$STD uv pip install --python /opt/openviking/bin/python openviking
|
||||
cat <<EOF >~/.openviking-server
|
||||
$(get_latest_github_release "volcengine/OpenViking")
|
||||
EOF
|
||||
msg_ok "Installed OpenViking"
|
||||
|
||||
msg_info "Configuring OpenViking"
|
||||
ROOT_API_KEY=$(openssl rand -hex 32)
|
||||
mkdir -p /opt/openviking_data
|
||||
cat <<EOF >/opt/openviking_data/ov.conf
|
||||
{
|
||||
"server": {
|
||||
"host": "0.0.0.0",
|
||||
"port": 1933,
|
||||
"root_api_key": "${ROOT_API_KEY}",
|
||||
"cors_origins": ["*"]
|
||||
},
|
||||
"storage": {
|
||||
"workspace": "/opt/openviking_data/data",
|
||||
"agfs": { "backend": "local" },
|
||||
"vectordb": { "backend": "local" }
|
||||
},
|
||||
"embedding": {
|
||||
"dense": {
|
||||
"api_base": "https://api.openai.com/v1",
|
||||
"api_key": "REPLACE_WITH_YOUR_EMBEDDING_API_KEY",
|
||||
"provider": "openai",
|
||||
"dimension": 1536,
|
||||
"model": "text-embedding-3-small"
|
||||
}
|
||||
},
|
||||
"vlm": {
|
||||
"api_base": "https://api.openai.com/v1",
|
||||
"api_key": "REPLACE_WITH_YOUR_VLM_API_KEY",
|
||||
"provider": "openai",
|
||||
"model": "gpt-4o"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
chmod 600 /opt/openviking_data/ov.conf
|
||||
msg_ok "Configured OpenViking"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/openviking.service
|
||||
[Unit]
|
||||
Description=OpenViking HTTP Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/openviking_data
|
||||
Environment="OPENVIKING_CONFIG_FILE=/opt/openviking_data/ov.conf"
|
||||
ExecStart=/opt/openviking/bin/openviking-server
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now openviking
|
||||
|
||||
ready=0
|
||||
for _ in {1..60}; do
|
||||
if curl -fsS -o /dev/null "http://127.0.0.1:1933/health"; then
|
||||
ready=1
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
if [[ "$ready" -ne 1 ]]; then
|
||||
msg_warn "OpenViking did not become healthy within 120 seconds — check 'systemctl status openviking'"
|
||||
fi
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Running OpenViking Doctor"
|
||||
if OPENVIKING_CONFIG_FILE=/opt/openviking_data/ov.conf /opt/openviking/bin/openviking-server doctor >/dev/null 2>&1; then
|
||||
msg_ok "Doctor check passed"
|
||||
else
|
||||
msg_warn "Doctor check reported warnings — configure the model API keys in /opt/openviking_data/ov.conf and restart the service"
|
||||
fi
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -20,7 +20,7 @@ $STD apt install -y \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@11.8.0" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@11.8.0" setup_nodejs
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="portabase" PG_DB_USER="portabase" setup_postgresql_db
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ $STD apt install -y \
|
||||
bubblewrap
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
NODE_VERSION="26" setup_nodejs
|
||||
|
||||
msg_info "Installing T3 Code and Provider CLIs"
|
||||
$STD npm install -g \
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# community-scripts ORG | wg-easy Addon Installer
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/wg-easy/wg-easy
|
||||
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/core.func")
|
||||
load_functions
|
||||
elif command -v wget >/dev/null 2>&1; then
|
||||
source <(wget -qO- "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/core.func")
|
||||
load_functions
|
||||
fi
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/lib/tools.func")
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/error_handler.func")
|
||||
|
||||
color
|
||||
catch_errors
|
||||
|
||||
APP="wg-easy"
|
||||
APP_TYPE="addon"
|
||||
|
||||
header_info "$APP"
|
||||
require_debian_like
|
||||
confirm_not_pve_host
|
||||
get_lxc_ip
|
||||
|
||||
function build_wgeasy() {
|
||||
cd /opt/wg-easy/src || exit
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm build
|
||||
mkdir -p .output/server/database
|
||||
cp -r server/database/migrations .output/server/database/
|
||||
}
|
||||
|
||||
function install_wgeasy() {
|
||||
if [[ -d /etc/wgdashboard ]]; then
|
||||
msg_error "WGDashboard is installed in this container. wg-easy and WGDashboard would both manage wg0 - install wg-easy in its own LXC."
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f /etc/wireguard/wg0.conf ]]; then
|
||||
msg_error "/etc/wireguard/wg0.conf already exists and wg-easy would overwrite it - install wg-easy in its own LXC."
|
||||
exit 1
|
||||
fi
|
||||
if ! ip link add wgeasy-probe type wireguard &>/dev/null; then
|
||||
msg_error "wg-easy cannot create a WireGuard interface in this container."
|
||||
msg_error "Load the module on the Proxmox VE host: modprobe wireguard && echo wireguard >/etc/modules-load.d/wireguard.conf"
|
||||
exit 1
|
||||
fi
|
||||
ip link del wgeasy-probe
|
||||
|
||||
local MEM_MB
|
||||
MEM_MB=$(awk '/MemTotal/ {printf "%.0f", $2/1024}' /proc/meminfo)
|
||||
if ((MEM_MB < 2048)); then
|
||||
msg_error "Insufficient memory: ${MEM_MB} MB detected. At least 2048 MB RAM is required to build wg-easy."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat <<EOF >/etc/sysctl.d/99-wg-easy.conf
|
||||
net.ipv4.ip_forward=1
|
||||
net.ipv6.conf.all.forwarding=1
|
||||
EOF
|
||||
sysctl -q -p /etc/sysctl.d/99-wg-easy.conf &>/dev/null || true
|
||||
if [[ "$(sysctl -n net.ipv4.ip_forward)" != "1" ]]; then
|
||||
rm -f /etc/sysctl.d/99-wg-easy.conf
|
||||
msg_error "wg-easy needs IP forwarding, but net.ipv4.ip_forward cannot be enabled in this container."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local DISABLE_IPV6="false"
|
||||
[[ "$(cat /proc/sys/net/ipv6/conf/all/disable_ipv6 2>/dev/null)" == "0" ]] || DISABLE_IPV6="true"
|
||||
if [[ "$(ip route show default | awk '{print $5; exit}')" != "eth0" ]]; then
|
||||
msg_warn "The default route is not on eth0 - set the device in wg-easy under Admin > Interface after setup."
|
||||
fi
|
||||
|
||||
local WG_HOST ADMIN_PASS
|
||||
WG_HOST=$(prompt_input_required "wg-easy endpoint (public DNS name or IP your clients connect to):" "$LOCAL_IP" 120 "var_wg_host")
|
||||
[[ "$WG_HOST" == *:* && "$WG_HOST" != \[* ]] && WG_HOST="[${WG_HOST}]"
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
ensure_dependencies wireguard-tools iptables
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
|
||||
fetch_and_deploy_gh_release "wg-easy" "wg-easy/wg-easy" "tarball"
|
||||
|
||||
msg_info "Building wg-easy"
|
||||
build_wgeasy
|
||||
mv /opt/wg-easy/src/.output /opt/wg-easy/app
|
||||
msg_ok "Built wg-easy"
|
||||
|
||||
msg_info "Configuring wg-easy"
|
||||
ADMIN_PASS=$(random_password)
|
||||
cat <<EOF >/opt/wg-easy/.env
|
||||
PORT=51821
|
||||
HOST=0.0.0.0
|
||||
INSECURE=true
|
||||
DISABLE_IPV6=${DISABLE_IPV6}
|
||||
DEBUG=Server,WireGuard,Database,CMD,Firewall
|
||||
INIT_ENABLED=true
|
||||
INIT_USERNAME=admin
|
||||
INIT_PASSWORD=${ADMIN_PASS}
|
||||
INIT_HOST=${WG_HOST}
|
||||
INIT_PORT=51820
|
||||
EOF
|
||||
chmod 600 /opt/wg-easy/.env
|
||||
cat <<'EOF' >/usr/local/bin/wg-easy-cli
|
||||
#!/usr/bin/env bash
|
||||
set -a
|
||||
source /opt/wg-easy/.env
|
||||
set +a
|
||||
exec node /opt/wg-easy/app/server/cli.mjs "$@"
|
||||
EOF
|
||||
chmod +x /usr/local/bin/wg-easy-cli
|
||||
cat <<EOF >/etc/systemd/system/wg-easy.service
|
||||
[Unit]
|
||||
Description=wg-easy
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/wg-easy/app
|
||||
EnvironmentFile=/opt/wg-easy/.env
|
||||
ExecStart=/usr/bin/node server/index.mjs
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now wg-easy
|
||||
msg_ok "Configured wg-easy"
|
||||
|
||||
echo ""
|
||||
msg_ok "wg-easy is reachable at: ${BL}http://${LOCAL_IP}:51821${CL}"
|
||||
echo -e "${INFO}${YW}Username:${CL} admin"
|
||||
echo -e "${INFO}${YW}Password:${CL} ${ADMIN_PASS}"
|
||||
echo -e "${INFO}${YW}Clients connect to ${CL}${WG_HOST}:51820/udp${YW} - forward UDP 51820 on your router to ${CL}${LOCAL_IP}${YW}, keep TCP 51821 on the LAN.${CL}"
|
||||
if [[ "$WG_HOST" == "$LOCAL_IP" ]]; then
|
||||
msg_warn "No public endpoint was set - change the host in wg-easy under Admin > Config before adding clients."
|
||||
fi
|
||||
}
|
||||
|
||||
function update_wgeasy() {
|
||||
if check_for_gh_release "wg-easy" "wg-easy/wg-easy"; then
|
||||
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
|
||||
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP=".env app" fetch_and_deploy_gh_release "wg-easy" "wg-easy/wg-easy" "tarball"
|
||||
|
||||
msg_info "Building wg-easy"
|
||||
build_wgeasy
|
||||
msg_ok "Built wg-easy"
|
||||
|
||||
# Swapped only after the build: the tunnel stays up meanwhile, so an update run over the VPN does not cut itself off
|
||||
msg_info "Restarting wg-easy"
|
||||
rm -rf /opt/wg-easy/app
|
||||
mv /opt/wg-easy/src/.output /opt/wg-easy/app
|
||||
systemctl restart wg-easy
|
||||
msg_ok "Restarted wg-easy"
|
||||
msg_ok "Updated wg-easy"
|
||||
fi
|
||||
}
|
||||
|
||||
function uninstall_wgeasy() {
|
||||
msg_info "Uninstalling wg-easy"
|
||||
systemctl disable -q --now wg-easy
|
||||
wg-quick down wg0 &>/dev/null || true
|
||||
rm -f /etc/systemd/system/wg-easy.service /usr/local/bin/wg-easy-cli /etc/sysctl.d/99-wg-easy.conf "$HOME/.wg-easy"
|
||||
systemctl daemon-reload
|
||||
rm -rf /opt/wg-easy /etc/wireguard/wg-easy.db /etc/wireguard/wg0.conf
|
||||
msg_ok "Uninstalled wg-easy"
|
||||
}
|
||||
|
||||
if [[ -f /etc/systemd/system/wg-easy.service ]]; then
|
||||
if [[ "${type:-}" == "update" ]]; then
|
||||
update_wgeasy
|
||||
exit 0
|
||||
fi
|
||||
read -r -p "${TAB}Update (1), Uninstall (2), Cancel (3)? [1/2/3]: " action || action=""
|
||||
action="${action//[[:space:]]/}"
|
||||
case "$action" in
|
||||
1) update_wgeasy ;;
|
||||
2) uninstall_wgeasy ;;
|
||||
3) msg_warn "No changes made to wg-easy" ;;
|
||||
*) msg_error "Invalid input - no changes made to wg-easy" ;;
|
||||
esac
|
||||
else
|
||||
read -r -p "${TAB}Install wg-easy? (y/n): " answer || answer=""
|
||||
answer="${answer//[[:space:]]/}"
|
||||
if [[ "${answer,,}" =~ ^(y|yes)$ ]]; then
|
||||
install_wgeasy
|
||||
else
|
||||
msg_warn "wg-easy installation skipped"
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user