1 Commits

Author SHA1 Message Date
michel.roegl-brunner
6bfd19484d Update CHANGELOG.md 2025-05-14 10:43:02 +02:00
52 changed files with 1015 additions and 1231 deletions

View File

@@ -25,13 +25,6 @@ jobs:
app-id: ${{ vars.APP_ID }} app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }} private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Generate a token for PR approval and merge
id: generate-token-merge
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID_APPROVE_AND_MERGE }}
private-key: ${{ secrets.APP_KEY_APPROVE_AND_MERGE }}
# Step 1: Checkout repository # Step 1: Checkout repository
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -98,17 +91,14 @@ jobs:
gh pr review $PR_NUMBER --approve gh pr review $PR_NUMBER --approve
fi fi
- name: Approve pull request and merge - name: Re-approve pull request after update
if: env.changed == 'true' if: env.changed == 'true'
env: env:
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
git config --global user.name "github-actions-automege[bot]" PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number')
git config --global user.email "github-actions-automege[bot]@users.noreply.github.com"
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
if [ -n "$PR_NUMBER" ]; then if [ -n "$PR_NUMBER" ]; then
gh pr review $PR_NUMBER --approve gh pr review $PR_NUMBER --approve
gh pr merge $PR_NUMBER --squash --admin
fi fi
# Step 8: Output success message when no changes # Step 8: Output success message when no changes

View File

@@ -80,25 +80,7 @@ jobs:
VAR+="${{ github.event.issue.html_url }}" VAR+="${{ github.event.issue.html_url }}"
echo "message=$VAR" >> $GITHUB_ENV echo "message=$VAR" >> $GITHUB_ENV
- name: Check if Discord thread exists
id: check_thread
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
THREAD_ID=$(curl -s -X GET "https://discord.com/api/v10/guilds/${{ secrets.DISCORD_GUILD_ID }}/threads/active" \
-H "Authorization: Bot ${{ secrets.DISCORD_BOT_TOKEN }}" \
-H "Content-Type: application/json" | \
jq -r --arg TITLE "$ISSUE_TITLE" --arg PARENT_ID "${{ secrets.DISCORD_CHANNEL_ID }}" \
'.threads[] | select(.parent_id == $PARENT_ID and .name == ("Wanted Tester for " + $TITLE)) | .id')
if [ -n "$THREAD_ID" ]; then
echo "thread_exists=true" >> "$GITHUB_OUTPUT"
else
echo "thread_exists=false" >> "$GITHUB_OUTPUT"
fi
- name: Create a forumpost in Discord - name: Create a forumpost in Discord
if: steps.check_thread.outputs.thread_exists != 'true'
id: post_to_discord id: post_to_discord
env: env:
DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }} DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }}
@@ -124,7 +106,6 @@ jobs:
fi fi
- name: Comment on Issue - name: Comment on Issue
if: steps.check_thread.outputs.thread_exists != 'true'
id: comment_on_issue id: comment_on_issue
env: env:
MESSAGE: ${{ env.message }} MESSAGE: ${{ env.message }}

View File

@@ -14,13 +14,6 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate a token for PR approval and merge
id: generate-token-merge
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID_APPROVE_AND_MERGE }}
private-key: ${{ secrets.APP_KEY_APPROVE_AND_MERGE }}
- name: Extract Issue Title (Lowercase & Underscores) - name: Extract Issue Title (Lowercase & Underscores)
id: extract_title id: extract_title
run: echo "TITLE=$(echo '${{ github.event.issue.title }}' | tr '[:upper:]' '[:lower:]' | sed 's/ /_/g')" >> $GITHUB_ENV run: echo "TITLE=$(echo '${{ github.event.issue.title }}' | tr '[:upper:]' '[:lower:]' | sed 's/ /_/g')" >> $GITHUB_ENV
@@ -79,19 +72,6 @@ jobs:
#gh pr merge $pr_number --squash #gh pr merge $pr_number --squash
echo pr_number=$pr_number >> $GITHUB_ENV echo pr_number=$pr_number >> $GITHUB_ENV
- name: Approve pull request and merge
if: env.changed == 'true'
env:
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }}
run: |
git config --global user.name "github-actions-automege[bot]"
git config --global user.email "github-actions-automege[bot]@users.noreply.github.com"
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
if [ -n "$PR_NUMBER" ]; then
gh pr review $PR_NUMBER --approve
gh pr merge $PR_NUMBER --squash --admin
fi
- name: Comment on Issue - name: Comment on Issue
uses: actions/github-script@v7 uses: actions/github-script@v7
with: with:

View File

@@ -29,13 +29,6 @@ jobs:
app-id: ${{ vars.APP_ID }} app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }} private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Generate a token for PR approval and merge
id: generate-token-merge
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID_APPROVE_AND_MERGE }}
private-key: ${{ secrets.APP_KEY_APPROVE_AND_MERGE }}
- name: Crawl from newreleases.io - name: Crawl from newreleases.io
env: env:
token: ${{ secrets.NEWRELEASES_TOKEN }} token: ${{ secrets.NEWRELEASES_TOKEN }}
@@ -117,12 +110,10 @@ jobs:
- name: Approve pull request and merge - name: Approve pull request and merge
if: env.changed == 'true' if: env.changed == 'true'
env: env:
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }} GH_TOKEN: ${{ secrets.PAT_MICHEL }}
run: | run: |
git config --global user.name "github-actions-automege[bot]" PR_NUMBER=$(gh pr list --head "update_versions" --json number --jq '.[].number')
git config --global user.email "github-actions-automege[bot]@users.noreply.github.com"
PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number')
if [ -n "$PR_NUMBER" ]; then if [ -n "$PR_NUMBER" ]; then
gh pr review $PR_NUMBER --approve gh pr review $PR_NUMBER --approve
gh pr merge $PR_NUMBER --squash --admin gh pr merge $PR_NUMBER --squash --delete-branch --admin
fi fi

View File

@@ -133,6 +133,10 @@ jobs:
echo "install file already exists in ProxmoxVE" echo "install file already exists in ProxmoxVE"
exit 1 exit 1
fi fi
if [[ -f "frontend/public/json/${script_name}.json" ]]; then
echo "json file already exists in ProxmoxVE"
exit 1
fi
git checkout -b "$branch_name" git checkout -b "$branch_name"
@@ -153,13 +157,10 @@ jobs:
cp ../frontend/public/json/$json_file frontend/public/json/. || true cp ../frontend/public/json/$json_file frontend/public/json/. || true
fi fi
echo $script_name sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|' ct/$script_name.sh
sed -i "s|https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func|https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func|" ct/$script_name.sh sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' ct/$script_name.sh
sed -i "s|https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func|https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func|" ct/$script_name.sh sed -i 's|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|' install/$script_name-install.sh
sed -i "s|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|" ct/$script_name.sh git add .
sed -i "s|# License: MIT \| https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE|# License: MIT \| https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE|" install/$script_name-install.sh
git add . > /dev/null 2>&1
if git diff --cached --exit-code; then if git diff --cached --exit-code; then
echo "No changes detected, skipping commit." echo "No changes detected, skipping commit."
exit 0 exit 0

View File

@@ -7,76 +7,6 @@
<h3 align="center">All notable changes to this project will be documented in this file.</h3> <h3 align="center">All notable changes to this project will be documented in this file.</h3>
## 2025-05-14
### 🆕 New Scripts
- odoo ([#4477](https://github.com/community-scripts/ProxmoxVE/pull/4477))
- alpine-transmission ([#4277](https://github.com/community-scripts/ProxmoxVE/pull/4277))
- alpine-tinyauth ([#4264](https://github.com/community-scripts/ProxmoxVE/pull/4264))
- alpine-rclone ([#4265](https://github.com/community-scripts/ProxmoxVE/pull/4265))
- streamlink-webui ([#4262](https://github.com/community-scripts/ProxmoxVE/pull/4262))
- Fumadocs ([#4263](https://github.com/community-scripts/ProxmoxVE/pull/4263))
- asterisk ([#4468](https://github.com/community-scripts/ProxmoxVE/pull/4468))
- gatus ([#4443](https://github.com/community-scripts/ProxmoxVE/pull/4443))
- alpine-gatus ([#4442](https://github.com/community-scripts/ProxmoxVE/pull/4442))
- Alpine-Traefik [@MickLesk](https://github.com/MickLesk) ([#4412](https://github.com/community-scripts/ProxmoxVE/pull/4412))
### 🚀 Updated Scripts
- fix: fetch_release_and_deploy function [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4478](https://github.com/community-scripts/ProxmoxVE/pull/4478))
- Website: re-add documenso & some little bugfixes [@MickLesk](https://github.com/MickLesk) ([#4456](https://github.com/community-scripts/ProxmoxVE/pull/4456))
- update some improvements from dev (tools.func) [@MickLesk](https://github.com/MickLesk) ([#4430](https://github.com/community-scripts/ProxmoxVE/pull/4430))
- Alpine: Use onliner for updates [@tremor021](https://github.com/tremor021) ([#4414](https://github.com/community-scripts/ProxmoxVE/pull/4414))
- #### 🐞 Bug Fixes
- Bugfix: Mikrotik & Pimox HAOS VM (NEXTID) [@MickLesk](https://github.com/MickLesk) ([#4313](https://github.com/community-scripts/ProxmoxVE/pull/4313))
- Bookstack: fix copy of themes/uploads/storage [@MickLesk](https://github.com/MickLesk) ([#4457](https://github.com/community-scripts/ProxmoxVE/pull/4457))
- homarr: fetch versions dynamically from source repo [@CrazyWolf13](https://github.com/CrazyWolf13) ([#4409](https://github.com/community-scripts/ProxmoxVE/pull/4409))
- Authentik: change install to UV & increase resources to 10GB RAM [@MickLesk](https://github.com/MickLesk) ([#4364](https://github.com/community-scripts/ProxmoxVE/pull/4364))
- Jellyseerr: better handling of node and pnpm [@MickLesk](https://github.com/MickLesk) ([#4365](https://github.com/community-scripts/ProxmoxVE/pull/4365))
- Alpine-Rclone: Fix location of passwords file [@tremor021](https://github.com/tremor021) ([#4465](https://github.com/community-scripts/ProxmoxVE/pull/4465))
- Zammad: Enable ElasticSearch service [@tremor021](https://github.com/tremor021) ([#4391](https://github.com/community-scripts/ProxmoxVE/pull/4391))
- openhab: use zulu17-jdk [@moodyblue](https://github.com/moodyblue) ([#4438](https://github.com/community-scripts/ProxmoxVE/pull/4438))
- (fix) Documenso: fix build failures [@vhsdream](https://github.com/vhsdream) ([#4382](https://github.com/community-scripts/ProxmoxVE/pull/4382))
- #### ✨ New Features
- Feature: LXC-Delete (pve helper): add "all items" [@MickLesk](https://github.com/MickLesk) ([#4296](https://github.com/community-scripts/ProxmoxVE/pull/4296))
- Feature: get correct next VMID [@MickLesk](https://github.com/MickLesk) ([#4292](https://github.com/community-scripts/ProxmoxVE/pull/4292))
- HomeAssistant-Core: update script for 2025.5+ [@MickLesk](https://github.com/MickLesk) ([#4363](https://github.com/community-scripts/ProxmoxVE/pull/4363))
- Feature: autologin for Alpine [@MickLesk](https://github.com/MickLesk) ([#4344](https://github.com/community-scripts/ProxmoxVE/pull/4344))
- monitor-all: improvements - tag based filtering [@grizmin](https://github.com/grizmin) ([#4437](https://github.com/community-scripts/ProxmoxVE/pull/4437))
- Make apt-cacher-ng a client of its own server [@pgcudahy](https://github.com/pgcudahy) ([#4092](https://github.com/community-scripts/ProxmoxVE/pull/4092))
- #### 🔧 Refactor
- openhab. correct some typos [@moodyblue](https://github.com/moodyblue) ([#4448](https://github.com/community-scripts/ProxmoxVE/pull/4448))
### 🧰 Maintenance
- #### 💾 Core
- fix: improve bridge detection in all network interface configuration files [@filippolauria](https://github.com/filippolauria) ([#4413](https://github.com/community-scripts/ProxmoxVE/pull/4413))
- Config file Function in build.func [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4411](https://github.com/community-scripts/ProxmoxVE/pull/4411))
- fix: detect all bridge types, not just vmbr prefix [@filippolauria](https://github.com/filippolauria) ([#4351](https://github.com/community-scripts/ProxmoxVE/pull/4351))
- #### 📂 Github
- Add Github app for auto PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#4461](https://github.com/community-scripts/ProxmoxVE/pull/4461))
### 🌐 Website
- FAQ: Explanation "updatable" [@tremor021](https://github.com/tremor021) ([#4300](https://github.com/community-scripts/ProxmoxVE/pull/4300))
- #### 📝 Script Information
- Jellyfin Media Server: Update configuration path [@tremor021](https://github.com/tremor021) ([#4434](https://github.com/community-scripts/ProxmoxVE/pull/4434))
- Pingvin Share: Added explanation on how to add/edit environment variables [@tremor021](https://github.com/tremor021) ([#4432](https://github.com/community-scripts/ProxmoxVE/pull/4432))
- pingvin.json: fix typo [@warmbo](https://github.com/warmbo) ([#4426](https://github.com/community-scripts/ProxmoxVE/pull/4426))
- Navidrome - Fix config path (use /etc/ instead of /var/lib) [@quake1508](https://github.com/quake1508) ([#4406](https://github.com/community-scripts/ProxmoxVE/pull/4406))
## 2025-03-24 ## 2025-03-24
### 🆕 New Scripts ### 🆕 New Scripts
@@ -104,7 +34,7 @@
- GoMFT: Fix build dependencies [@tremor021](https://github.com/tremor021) ([#3313](https://github.com/community-scripts/ProxmoxVE/pull/3313)) - GoMFT: Fix build dependencies [@tremor021](https://github.com/tremor021) ([#3313](https://github.com/community-scripts/ProxmoxVE/pull/3313))
- GoMFT: Don't rely on binaries from github [@tremor021](https://github.com/tremor021) ([#3303](https://github.com/community-scripts/ProxmoxVE/pull/3303)) - GoMFT: Don't rely on binaries from github [@tremor021](https://github.com/tremor021) ([#3303](https://github.com/community-scripts/ProxmoxVE/pull/3303))
- Wikijs: Remove Dev Message & Performance-Boost [@bvdberg01](https://github.com/bvdberg01) ([#3232](https://github.com/community-scripts/ProxmoxVE/pull/3232)) - Wikijs: Remove Dev Message & Performance-Boost [@bvdberg01](https://github.com/bvdberg01) ([#3232](https://github.com/community-scripts/ProxmoxVE/pull/3232))
- Update omada download url [@bvdberg01](https://github.com/bvdberg01) ([#3245](https://github.cooxVE/pull/3245)) - Update omada download url [@bvdberg01](https://github.com/bvdberg01) ([#3245](https://github.com/community-scripts/ProxmoxVE/pull/3245))
- TriliumNotes: Fix release handling [@tremor021](https://github.com/tremor021) ([#3160](https://github.com/community-scripts/ProxmoxVE/pull/3160)) - TriliumNotes: Fix release handling [@tremor021](https://github.com/tremor021) ([#3160](https://github.com/community-scripts/ProxmoxVE/pull/3160))
- #### ✨ New Features - #### ✨ New Features

View File

@@ -63,8 +63,7 @@ function update_script() {
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
cd /opt/bitmagnet cd /opt/bitmagnet
VREL=v$RELEASE $STD go build
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet chmod +x bitmagnet
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/ [ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/ [ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/

39
ct/asterisk.sh Normal file
View File

@@ -0,0 +1,39 @@
#!/usr/bin/env bash
source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://asterisk.org/
APP="Asterisk"
var_tags="${var_tags:-os}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "No Update function provided for ${APP} LXC"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"

View File

@@ -1,63 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: ksad (enirys31)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://garethgeorge.github.io/backrest/
APP="Backrest"
var_tags="${var_tags:-backup}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/backrest ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping ${APP}"
systemctl stop backrest
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP} to ${RELEASE}"
cd /opt/backrest/bin
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "backrest_Linux_x86_64.tar.gz"
tar -xzf backrest_Linux_x86_64.tar.gz
rm -rf backrest_Linux_x86_64.tar.gz
rm -f install.sh uninstall.sh
chmod +x backrest
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP}"
systemctl start backrest
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9898${CL}"

View File

@@ -1,98 +0,0 @@
#!/usr/bin/env bash
source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/bitmagnet/bitmagnet
APP="Bitmagnet"
var_tags="${var_tags:-os}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/bitmagnet ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/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 Service"
systemctl stop bitmagnet-web
msg_ok "Stopped Service"
msg_info "Backing up database"
rm -f /tmp/backup.sql
$STD sudo -u postgres pg_dump \
--column-inserts \
--data-only \
--on-conflict-do-nothing \
--rows-per-insert=1000 \
--table=metadata_sources \
--table=content \
--table=content_attributes \
--table=content_collections \
--table=content_collections_content \
--table=torrent_sources \
--table=torrents \
--table=torrent_files \
--table=torrent_hints \
--table=torrent_contents \
--table=torrent_tags \
--table=torrents_torrent_sources \
--table=key_values \
bitmagnet \
>/tmp/backup.sql
mv /tmp/backup.sql /opt/
msg_ok "Database backed up"
msg_info "Updating ${APP} to v${RELEASE}"
[ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/
[ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/
rm -rf /opt/bitmagnet/*
temp_file=$(mktemp)
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
cd /opt/bitmagnet
VREL=v$RELEASE
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated $APP to v${RELEASE}"
msg_info "Starting Service"
systemctl start bitmagnet-web
msg_ok "Started Service"
msg_info "Cleaning up"
rm -f "$temp_file"
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3333${CL}"

View File

@@ -6,7 +6,7 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/
# Source: https://www.freepbx.org/ # Source: https://www.freepbx.org/
APP="FreePBX" APP="FreePBX"
var_tags="pbx;voip;telephony" var_tags=""
var_cpu="${var_cpu:-1}" var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}" var_ram="${var_ram:-1024}"
var_disk="${var_disk:-20}" var_disk="${var_disk:-20}"

6
ct/headers/asterisk Normal file
View File

@@ -0,0 +1,6 @@
___ __ _ __
/ | _____/ /____ _____(_)____/ /__
/ /| | / ___/ __/ _ \/ ___/ / ___/ //_/
/ ___ |(__ ) /_/ __/ / / (__ ) ,<
/_/ |_/____/\__/\___/_/ /_/____/_/|_|

6
ct/headers/authentik Normal file
View File

@@ -0,0 +1,6 @@
___ __ __ __ _ __
/ | __ __/ /_/ /_ ___ ____ / /_(_) /__
/ /| |/ / / / __/ __ \/ _ \/ __ \/ __/ / //_/
/ ___ / /_/ / /_/ / / / __/ / / / /_/ / ,<
/_/ |_\__,_/\__/_/ /_/\___/_/ /_/\__/_/_/|_|

View File

@@ -1,6 +0,0 @@
____ __ __
/ __ )____ ______/ /__________ _____/ /_
/ __ / __ `/ ___/ //_/ ___/ _ \/ ___/ __/
/ /_/ / /_/ / /__/ ,< / / / __(__ ) /_
/_____/\__,_/\___/_/|_/_/ \___/____/\__/

View File

@@ -1,6 +0,0 @@
____ _ __ __
/ __ )(_) /_____ ___ ____ _____ _____ ___ / /_
/ __ / / __/ __ `__ \/ __ `/ __ `/ __ \/ _ \/ __/
/ /_/ / / /_/ / / / / / /_/ / /_/ / / / / __/ /_
/_____/_/\__/_/ /_/ /_/\__,_/\__, /_/ /_/\___/\__/
/____/

6
ct/headers/bookstack Normal file
View File

@@ -0,0 +1,6 @@
____ __ __ __
/ __ )____ ____ / /_______/ /_____ ______/ /__
/ __ / __ \/ __ \/ //_/ ___/ __/ __ `/ ___/ //_/
/ /_/ / /_/ / /_/ / ,< (__ ) /_/ /_/ / /__/ ,<
/_____/\____/\____/_/|_/____/\__/\__,_/\___/_/|_|

6
ct/headers/gatus Normal file
View File

@@ -0,0 +1,6 @@
__
____ _____ _/ /___ _______
/ __ `/ __ `/ __/ / / / ___/
/ /_/ / /_/ / /_/ /_/ (__ )
\__, /\__,_/\__/\__,_/____/
/____/

View File

@@ -1,6 +1,6 @@
__ __ __
/ /_ ____ ____ ___ ____ ___________ / / / /___ ____ ___ ____ ___________
/ __ \/ __ \/ __ `__ \/ __ `/ ___/ ___/ / /_/ / __ \/ __ `__ \/ __ `/ ___/ ___/
/ / / / /_/ / / / / / / /_/ / / / / / __ / /_/ / / / / / / /_/ / / / /
/_/ /_/\____/_/ /_/ /_/\__,_/_/ /_/ /_/ /_/\____/_/ /_/ /_/\__,_/_/ /_/

View File

@@ -0,0 +1,6 @@
__ __ ___ _ __ __ ______
/ / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___ ________
/ /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/_____/ / / __ \/ ___/ _ \
/ __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_/_____/ /___/ /_/ / / / __/
/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____/\____/_/ \___/

6
ct/headers/matterbridge Normal file
View File

@@ -0,0 +1,6 @@
__ ___ __ __ __ _ __
/ |/ /___ _/ /_/ /____ _____/ /_ _____(_)___/ /___ ____
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ \/ ___/ / __ / __ `/ _ \
/ / / / /_/ / /_/ /_/ __/ / / /_/ / / / / /_/ / /_/ / __/
/_/ /_/\__,_/\__/\__/\___/_/ /_.___/_/ /_/\__,_/\__, /\___/
/____/

6
ct/headers/mattermost Normal file
View File

@@ -0,0 +1,6 @@
__ ___ __ __ __
/ |/ /___ _/ /_/ /____ _________ ___ ____ _____/ /_
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ `__ \/ __ \/ ___/ __/
/ / / / /_/ / /_/ /_/ __/ / / / / / / / /_/ (__ ) /_
/_/ /_/\__,_/\__/\__/\___/_/ /_/ /_/ /_/\____/____/\__/

6
ct/headers/openproject Normal file
View File

@@ -0,0 +1,6 @@
____ ____ _ __
/ __ \____ ___ ____ / __ \_________ (_)__ _____/ /_
/ / / / __ \/ _ \/ __ \/ /_/ / ___/ __ \ / / _ \/ ___/ __/
/ /_/ / /_/ / __/ / / / ____/ / / /_/ / / / __/ /__/ /_
\____/ .___/\___/_/ /_/_/ /_/ \____/_/ /\___/\___/\__/
/_/ /___/

6
ct/headers/paperless-ngx Normal file
View File

@@ -0,0 +1,6 @@
____ __
/ __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __
/ /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/_____/ __ \/ __ `/ |/_/
/ ____/ /_/ / /_/ / __/ / / / __(__ |__ )_____/ / / / /_/ /> <
/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_|
/_/ /____/

View File

@@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://homarr.dev/ # Source: https://homarr.dev/
APP="homarr" APP="Homarr"
var_tags="${var_tags:-arr;dashboard}" var_tags="${var_tags:-arr;dashboard}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}" var_ram="${var_ram:-4096}"
@@ -124,7 +124,7 @@ EOF
fetch_and_deploy_gh_release "homarr-labs/homarr" fetch_and_deploy_gh_release "homarr-labs/homarr"
mv /opt/homarr-data-backup/.env /opt/homarr/.env mv /opt/homarr-data-backup/.env /opt/homarr/.env
cd /opt/homarr cd /opt/homarr
$STD pnpm install --config.allowBuildScripts=true $STD pnpm install
$STD pnpm build $STD pnpm build
cp /opt/homarr/apps/nextjs/next.config.ts . cp /opt/homarr/apps/nextjs/next.config.ts .
cp /opt/homarr/apps/nextjs/package.json . cp /opt/homarr/apps/nextjs/package.json .

View File

@@ -6,15 +6,19 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/
## App Default Values ## App Default Values
APP="Koel" APP="Koel"
var_tags="${var_tags:-music}" var_tags="${var_tags:-music;player;homelab}"
var_disk="${var_disk:-9}" var_disk="${var_disk:-9}"
var_cpu="${var_cpu:-3}" var_cpu="${var_cpu:-3}"
var_ram="${var_ram:-3072}" var_ram="${var_ram:-3072}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}" var_verbose="${var_verbose:-yes}"
# App Output & Base Settings
header_info "$APP" header_info "$APP"
base_settings
# Core
variables variables
color color
catch_errors catch_errors

72
ct/odoo.sh Normal file
View File

@@ -0,0 +1,72 @@
#!/usr/bin/env bash
source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/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/odoo/odoo
APP="Odoo"
# shellcheck disable=SC2034
var_tags="${var_tags:-erp}"
var_disk="${var_disk:-6}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/odoo/odoo.conf ]]; then
msg_error "No ${APP} Installation Found!"
exit 1
fi
RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1)
LATEST_VERSION=$(curl -fsSL "https://nightly.odoo.com/${RELEASE}/nightly/deb/" |
grep -oP "odoo_${RELEASE}\.\d+_all\.deb" |
sed -E "s/odoo_(${RELEASE}\.[0-9]+)_all\.deb/\1/" |
sort -V |
tail -n1)
if [[ "${LATEST_VERSION}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
msg_info "Stopping ${APP} service"
systemctl stop odoo
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP} to ${LATEST_VERSION}"
curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.latest_all.deb -o /opt/odoo.deb
$STD apt install -y /opt/odoo.deb
echo "$RELEASE" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting ${APP} service"
systemctl start odoo
msg_ok "Started ${APP}"
msg_info "Cleaning Up"
rm -f /opt/odoo.deb
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${LATEST_VERSION}"
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}:8069${CL}"

View File

@@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG # Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021) # Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/rclone/rclone # Source: https://rclone.org/
APP="Rclone" APP="Rclone"
var_tags="${var_tags:-os}" var_tags="${var_tags:-os}"
@@ -23,35 +23,14 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /opt/rclone ]]; then if [[ ! -d /var ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Updating $APP LXC"
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then $STD apt-get update
msg_info "Stopping Service" $STD apt-get -y upgrade
systemctl stop rclone-web msg_ok "Updated $APP LXC"
msg_ok "Stopped Service"
msg_info "Updating ${APP} to v${RELEASE}"
temp_file=$(mktemp)
rm -rf /opt/rclone/*
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file"
$STD unzip -j "$temp_file" '*/**' -d /opt/rclone
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated $APP to v${RELEASE}"
msg_info "Starting Service"
systemctl start rclone-web
msg_ok "Started Service"
msg_info "Cleaning up"
rm -f "$temp_file"
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
fi
exit exit
} }
@@ -61,5 +40,3 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" 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}"

View File

@@ -0,0 +1,36 @@
{
"name": "Asterisk",
"slug": "asterisk",
"categories": [
0,
4
],
"date_created": "2025-05-13",
"type": "ct",
"updateable": false,
"privileged": false,
"interface_port": null,
"documentation": "https://docs.asterisk.org/",
"config_path": "/etc/asterisk",
"website": "https://asterisk.org/",
"logo": "https://docs.asterisk.org/favicon.ico",
"description": "Asterisk is an open-source framework for building communications applications, most commonly used as a phone system (PBX). Developed by Digium (now part of Sangoma), it turns a standard computer into a powerful telephony server.",
"install_methods": [
{
"type": "default",
"script": "ct/asterisk.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 4,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

View File

@@ -0,0 +1,41 @@
{
"name": "authentik",
"slug": "authentik",
"categories": [
6
],
"date_created": "2024-12-27",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 9000,
"documentation": "https://docs.goauthentik.io/docs/",
"website": "https://goauthentik.io/",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/authentik.svg",
"config_path": "/etc/authentik/config.yml",
"description": "authentik is an IdP (Identity Provider) and SSO (single sign on) that is built with security at the forefront of every piece of code, every feature, with an emphasis on flexibility and versatility.",
"install_methods": [
{
"type": "default",
"script": "ct/authentik.sh",
"resources": {
"cpu": 6,
"ram": 8192,
"hdd": 12,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Authentik is very resource-heavy, it is recommended to use at least 8GB RAM anytime!",
"type": "warning"
}
]
}

View File

@@ -1,40 +0,0 @@
{
"name": "Backrest",
"slug": "backrest",
"categories": [
7
],
"date_created": "2025-05-11",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 9898,
"documentation": "https://garethgeorge.github.io/backrest/introduction/getting-started",
"website": "https://garethgeorge.github.io/backrest",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/backrest-light.svg",
"config_path": "/opt/backrest/config/config.json",
"description": "Backrest is a web-accessible backup solution built on top of restic and providing a WebUI which wraps the restic CLI and makes it easy to create repos, browse snapshots, and restore files. Additionally, Backrest can run in the background and take an opinionated approach to scheduling snapshots and orchestrating repo health operations.",
"install_methods": [
{
"type": "default",
"script": "ct/backrest.sh",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 8,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"type": "info",
"text": "`cat ~/.ssh/id_ed25519.pub` to view ssh public key. This key is used to authenticate with sftp targets. You can add this key on the sftp server."
}
]
}

View File

@@ -8,22 +8,22 @@
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 3333, "interface_port": 8080,
"documentation": "https://bitmagnet.io/setup.html", "documentation": "https://bitmagnet.io/setup.html",
"website": "https://bitmagnet.io/", "website": "https://bitmagnet.io/",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/webp/bitmagnet.webp", "logo": "https://github.com/bitmagnet-io/bitmagnet/blob/main/webui/public/magnet.svg",
"config_path": "`/opt/bitmagnet/config.yml` or `/opt/bitmagnet/.env`", "config_path": "`/opt/bitmagnet/config.yml` or `/opt/bitmagnet/.env`",
"description": "A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.", "description": "A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.",
"install_methods": [ "install_methods": [
{ {
"type": "default", "type": "default",
"script": "ct/bitmagnet.sh", "script": "ct/alpine-bitmagnet.sh",
"resources": { "resources": {
"cpu": 1, "cpu": 1,
"ram": 512, "ram": 256,
"hdd": 4, "hdd": 3,
"os": "debian", "os": "alpine",
"version": "12" "version": "3.21"
} }
}, },
{ {
@@ -42,10 +42,5 @@
"username": null, "username": null,
"password": null "password": null
}, },
"notes": [ "notes": []
{
"text": "During installation you will be asked to enter your TMDB API key, if you wanna use it. Make sure you have it ready.",
"type": "info"
}
]
} }

View File

@@ -0,0 +1,46 @@
{
"name": "Alpine-gatus",
"slug": "alpine-gatus",
"categories": [
9
],
"date_created": "2025-05-06",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8080,
"documentation": "https://gatus.io/docs",
"website": "https://gatus.io/",
"logo": "https://raw.githubusercontent.com/TwiN/gatus/refs/heads/master/web/static/img/logo.svg",
"config_path": "/opt/gatus/config/config.yaml",
"description": "Gatus is a developer-oriented health dashboard that gives you the ability to monitor your services using HTTP, ICMP, TCP, and even DNS queries as well as evaluate the result of said queries by using a list of conditions on values like the status code, the response time, the certificate expiration, the body and many others. The icing on top is that each of these health checks can be paired with alerting via Slack, Teams, PagerDuty, Discord, Twilio and many more.",
"install_methods": [
{
"type": "default",
"script": "ct/gatus.sh",
"resources": {
"cpu": 1,
"ram": 512,
"hdd": 4,
"os": "debian",
"version": "12"
}
},
{
"type": "alpine",
"script": "ct/alpine-gatus.sh",
"resources": {
"cpu": 1,
"ram": 256,
"hdd": 3,
"os": "alpine",
"version": "3.21"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

View File

@@ -0,0 +1,40 @@
{
"name": "Odoo",
"slug": "odoo",
"categories": [
25
],
"date_created": "2025-05-14",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8069,
"documentation": "https://www.odoo.com/en_EN/page/docs",
"website": "https://www.odoo.com/",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/odoo.svg",
"config_path": "/etc/odoo/odoo.conf",
"description": "Odoo is a comprehensive open-source business platform made up of modular apps that cover key areas such as CRM, accounting, inventory, sales, project management, HR, helpdesk, and e-commerce. All modules are tightly integrated, allowing businesses to fully digitize and automate their workflows. Its modular design makes it suitable for both small companies and large enterprises, with flexibility to adapt to different industries. Odoo combines user-friendliness with powerful functionality, offering a unified solution for managing a wide range of business operations.",
"install_methods": [
{
"type": "default",
"script": "ct/odoo.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 6,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": "admin",
"password": "admin"
},
"notes": [
{
"text": "Database Credentials: `cat ~/odoo.creds`",
"type": "info"
}
]
}

View File

@@ -1,44 +0,0 @@
{
"name": "Rclone",
"slug": "rclone",
"categories": [
11
],
"date_created": "2025-05-06",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://rclone.org/docs/",
"website": "https://rclone.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg",
"config_path": "~/.config/rclone/rclone.conf",
"description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces",
"install_methods": [
{
"type": "default",
"script": "ct/rclone.sh",
"resources": {
"cpu": 1,
"ram": 256,
"hdd": 1,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"type": "info",
"text": "`cat ~/rclone.creds` to view login credentials"
},
{
"type": "info",
"text": "`htpasswd -b -B /opt/login.pwd newuser newuserpassword` to add more users."
}
]
}

View File

@@ -1,109 +1,9 @@
[ [
{
"name": "blakeblackshear/frigate",
"version": "v0.14.1",
"date": "2024-08-29T22:32:51Z"
},
{
"name": "Checkmk/checkmk",
"version": "v2.4.0p1-rc1",
"date": "2025-05-14T07:54:22Z"
},
{
"name": "nzbgetcom/nzbget",
"version": "v25.0",
"date": "2025-05-12T09:12:04Z"
},
{
"name": "morpheus65535/bazarr",
"version": "v1.5.2",
"date": "2025-05-11T16:40:55Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.22.1895",
"date": "2025-05-14T05:59:00Z"
},
{
"name": "TandoorRecipes/recipes",
"version": "2.0.0-alpha-4",
"date": "2025-05-14T05:01:45Z"
},
{
"name": "MediaBrowser/Emby.Releases",
"version": "4.8.11.0",
"date": "2025-03-10T06:39:11Z"
},
{
"name": "ollama/ollama",
"version": "v0.6.9-rc0",
"date": "2025-05-10T18:57:30Z"
},
{
"name": "esphome/esphome",
"version": "2025.4.2",
"date": "2025-05-11T22:18:43Z"
},
{
"name": "cross-seed/cross-seed",
"version": "v6.12.4",
"date": "2025-05-11T11:41:32Z"
},
{
"name": "firefly-iii/firefly-iii",
"version": "v6.2.12",
"date": "2025-04-20T19:22:17Z"
},
{
"name": "netbox-community/netbox",
"version": "v4.3.1",
"date": "2025-05-13T19:45:00Z"
},
{
"name": "glanceapp/glance",
"version": "v0.8.1",
"date": "2025-05-13T19:42:42Z"
},
{
"name": "pocketbase/pocketbase",
"version": "v0.28.1",
"date": "2025-05-13T18:45:47Z"
},
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.510",
"date": "2025-05-13T18:33:42Z"
},
{
"name": "mongodb/mongo",
"version": "r6.0.23",
"date": "2025-05-13T18:28:23Z"
},
{
"name": "keycloak/keycloak",
"version": "26.2.4",
"date": "2025-05-08T09:10:10Z"
},
{
"name": "OctoPrint/OctoPrint",
"version": "1.11.1",
"date": "2025-05-13T13:32:07Z"
},
{
"name": "redis/redis",
"version": "8.0.1",
"date": "2025-05-13T13:31:53Z"
},
{ {
"name": "theonedev/onedev", "name": "theonedev/onedev",
"version": "v11.9.6", "version": "v11.9.6",
"date": "2025-05-13T12:16:17Z" "date": "2025-05-13T12:16:17Z"
}, },
{
"name": "element-hq/synapse",
"version": "v1.129.0",
"date": "2025-05-06T12:28:54Z"
},
{ {
"name": "zabbix/zabbix", "name": "zabbix/zabbix",
"version": "7.2.7rc1", "version": "7.2.7rc1",
@@ -114,16 +14,51 @@
"version": "6.3.0-alpha.4", "version": "6.3.0-alpha.4",
"date": "2025-05-13T11:18:29Z" "date": "2025-05-13T11:18:29Z"
}, },
{
"name": "firefly-iii/firefly-iii",
"version": "v6.2.12",
"date": "2025-04-20T19:22:17Z"
},
{
"name": "cross-seed/cross-seed",
"version": "v6.12.4",
"date": "2025-05-11T11:41:32Z"
},
{
"name": "element-hq/synapse",
"version": "v1.129.0",
"date": "2025-05-06T12:28:54Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.22.1893",
"date": "2025-05-13T05:57:50Z"
},
{ {
"name": "zitadel/zitadel", "name": "zitadel/zitadel",
"version": "v2.65.9", "version": "v2.65.9",
"date": "2025-05-13T05:14:39Z" "date": "2025-05-13T05:14:39Z"
}, },
{
"name": "ollama/ollama",
"version": "v0.6.9-rc0",
"date": "2025-05-10T18:57:30Z"
},
{ {
"name": "go-gitea/gitea", "name": "go-gitea/gitea",
"version": "v1.23.8", "version": "v1.23.8",
"date": "2025-05-12T22:40:50Z" "date": "2025-05-12T22:40:50Z"
}, },
{
"name": "MediaBrowser/Emby.Releases",
"version": "4.8.11.0",
"date": "2025-03-10T06:39:11Z"
},
{
"name": "keycloak/keycloak",
"version": "26.2.4",
"date": "2025-05-08T09:10:10Z"
},
{ {
"name": "leiweibau/Pi.Alert", "name": "leiweibau/Pi.Alert",
"version": "v2025-05-11", "version": "v2025-05-11",
@@ -184,6 +119,11 @@
"version": "v10.7.2", "version": "v10.7.2",
"date": "2025-05-12T10:42:32Z" "date": "2025-05-12T10:42:32Z"
}, },
{
"name": "nzbgetcom/nzbget",
"version": "v25.0",
"date": "2025-05-12T09:12:04Z"
},
{ {
"name": "dgtlmoon/changedetection.io", "name": "dgtlmoon/changedetection.io",
"version": "0.49.17", "version": "0.49.17",
@@ -199,6 +139,16 @@
"version": "v2.18.1", "version": "v2.18.1",
"date": "2025-05-12T07:16:12Z" "date": "2025-05-12T07:16:12Z"
}, },
{
"name": "esphome/esphome",
"version": "2025.4.2",
"date": "2025-05-11T22:18:43Z"
},
{
"name": "morpheus65535/bazarr",
"version": "v1.5.2",
"date": "2025-05-11T16:40:55Z"
},
{ {
"name": "outline/outline", "name": "outline/outline",
"version": "v0.84.0", "version": "v0.84.0",
@@ -224,6 +174,11 @@
"version": "v5.22.4.9896", "version": "v5.22.4.9896",
"date": "2025-04-23T18:51:12Z" "date": "2025-04-23T18:51:12Z"
}, },
{
"name": "pocketbase/pocketbase",
"version": "v0.28.0",
"date": "2025-05-11T06:25:22Z"
},
{ {
"name": "owncast/owncast", "name": "owncast/owncast",
"version": "v0.2.3", "version": "v0.2.3",
@@ -349,6 +304,11 @@
"version": "v2.36.0", "version": "v2.36.0",
"date": "2025-05-07T11:54:14Z" "date": "2025-05-07T11:54:14Z"
}, },
{
"name": "Checkmk/checkmk",
"version": "v2.2.0p42-rc1",
"date": "2025-05-07T11:50:30Z"
},
{ {
"name": "openobserve/openobserve", "name": "openobserve/openobserve",
"version": "v0.14.7", "version": "v0.14.7",
@@ -374,6 +334,11 @@
"version": "v1.12.1rc0", "version": "v1.12.1rc0",
"date": "2025-05-06T20:56:30Z" "date": "2025-05-06T20:56:30Z"
}, },
{
"name": "redis/redis",
"version": "8.0.1-int",
"date": "2025-05-06T18:40:34Z"
},
{ {
"name": "Athou/commafeed", "name": "Athou/commafeed",
"version": "5.8.0", "version": "5.8.0",
@@ -384,6 +349,11 @@
"version": "v0.19.0", "version": "v0.19.0",
"date": "2025-05-06T18:05:42Z" "date": "2025-05-06T18:05:42Z"
}, },
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.509",
"date": "2025-05-06T15:37:10Z"
},
{ {
"name": "MariaDB/server", "name": "MariaDB/server",
"version": "mariadb-11.4.6", "version": "mariadb-11.4.6",
@@ -490,8 +460,38 @@
"date": "2025-05-03T20:23:27Z" "date": "2025-05-03T20:23:27Z"
}, },
{ {
"name": "prometheus-pve/prometheus-pve-exporter", "name": "actualbudget/actual",
"version": "v3.5.4", "version": "v25.5.0",
"date": "2025-05-02T13:42:06Z" "date": "2025-05-03T19:03:17Z"
},
{
"name": "rogerfar/rdt-client",
"version": "v2.0.111",
"date": "2025-05-03T16:25:30Z"
},
{
"name": "blakeblackshear/frigate",
"version": "v0.14.1",
"date": "2024-08-29T22:32:51Z"
},
{
"name": "kimai/kimai",
"version": "2.33.0",
"date": "2025-05-03T10:33:49Z"
},
{
"name": "documenso/documenso",
"version": "v1.10.3",
"date": "2025-05-02T23:23:25Z"
},
{
"name": "prometheus/prometheus",
"version": "v0.304.0-rc.0",
"date": "2025-05-02T17:29:18Z"
},
{
"name": "jhuckaby/Cronicle",
"version": "v0.9.80",
"date": "2025-05-02T16:48:15Z"
} }
] ]

View File

@@ -12,9 +12,7 @@ const Sidebar = ({
selectedScript: string | null; selectedScript: string | null;
setSelectedScript: (script: string | null) => void; setSelectedScript: (script: string | null) => void;
}) => { }) => {
const filteredItems = items.filter(category => category.scripts && category.scripts.length > 0); const uniqueScripts = items.reduce((acc, category) => {
const uniqueScripts = filteredItems.reduce((acc, category) => {
for (const script of category.scripts) { for (const script of category.scripts) {
if (!acc.some((s) => s.name === script.name)) { if (!acc.some((s) => s.name === script.name)) {
acc.push(script); acc.push(script);
@@ -33,7 +31,7 @@ const Sidebar = ({
</div> </div>
<div className="rounded-lg"> <div className="rounded-lg">
<ScriptAccordion <ScriptAccordion
items={filteredItems} items={items}
selectedScript={selectedScript} selectedScript={selectedScript}
setSelectedScript={setSelectedScript} setSelectedScript={setSelectedScript}
/> />

View File

@@ -40,15 +40,12 @@ temp_file=$(mktemp)
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
cd /opt/bitmagnet cd /opt/bitmagnet
VREL=v$RELEASE $STD go build
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet chmod +x bitmagnet
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'" $STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
echo "${RELEASE}" >/opt/bitmagnet_version.txt echo "${RELEASE}" >/opt/bitmagnet_version.txt
msg_ok "Installed bitmagnet v${RELEASE}" msg_ok "Installed bitmagnet v${RELEASE}"
read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
msg_info "Enabling bitmagnet Service" msg_info "Enabling bitmagnet Service"
cat <<EOF >/etc/init.d/bitmagnet cat <<EOF >/etc/init.d/bitmagnet
#!/sbin/openrc-run #!/sbin/openrc-run
@@ -63,10 +60,6 @@ pidfile="/var/run/bitmagnet.pid"
depend() { depend() {
use net use net
} }
start_pre() {
export TMDB_API_KEY="$tmdbapikey"
}
EOF EOF
chmod +x /etc/init.d/bitmagnet chmod +x /etc/init.d/bitmagnet
$STD rc-update add bitmagnet default $STD rc-update add bitmagnet default

View File

@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
libsrtp2-dev \
build-essential \
libedit-dev \
uuid-dev \
libjansson-dev \
libxml2-dev \
libsqlite3-dev
msg_ok "Installed Dependencies"
msg_info "Downloading Asterisk"
RELEASE=$(curl -s https://downloads.asterisk.org/pub/telephony/asterisk/ | grep -o 'asterisk-[0-9]\+-current\.tar\.gz' | sort -V | tail -n1)
temp_file=$(mktemp)
curl -fsSL "https://downloads.asterisk.org/pub/telephony/asterisk/${RELEASE}" -o "$temp_file"
mkdir -p /opt/asterisk
tar zxf "$temp_file" --strip-components=1 -C /opt/asterisk
cd /opt/asterisk
msg_ok "Downloaded Asterisk"
msg_info "Installing Asterisk"
$STD ./contrib/scripts/install_prereq install
$STD ./configure
$STD make -j$(nproc)
$STD make install
$STD make config
$STD make install-logrotate
$STD make samples
$STD systemctl start asterisk
msg_ok "Installed Asterisk"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
$STD rm -f "$temp_file"
msg_ok "Cleaned"

View File

@@ -1,55 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: ksad (enirys31)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://garethgeorge.github.io/backrest/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Backrest"
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
mkdir -p /opt/backrest/{bin,config,data}
cd /opt/backrest/bin
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "backrest_Linux_x86_64.tar.gz"
tar -xzf backrest_Linux_x86_64.tar.gz
chmod +x backrest
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Backrest"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/backrest.service
[Unit]
Description=Backrest
After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/backrest/bin/backrest
Environment="BACKREST_PORT=9898"
Environment="BACKREST_CONFIG=/opt/backrest/config/config.json"
Environment="BACKREST_DATA=/opt/backrest/data"
Environment="XDG_CACHE_HOME=/opt/backrest/cache"
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now backrest
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
rm -rf backrest_Linux_x86_64.tar.gz
rm -f install.sh uninstall.sh
msg_ok "Cleaned"

View File

@@ -1,78 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bitmagnet-io/bitmagnet
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
iproute2 \
gcc \
musl-dev
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
install_go
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
msg_info "Installing bitmagnet v${RELEASE}"
mkdir -p /opt/bitmagnet
temp_file=$(mktemp)
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
cd /opt/bitmagnet
VREL=v$RELEASE
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet
POSTGRES_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$POSTGRES_PASSWORD';"
$STD sudo -u postgres psql -c "CREATE DATABASE bitmagnet;"
{
echo "PostgreSQL Credentials"
echo ""
echo "postgres user password: $POSTGRES_PASSWORD"
} >>~/postgres.creds
echo "${RELEASE}" >/opt/bitmagnet_version.txt
msg_ok "Installed bitmagnet v${RELEASE}"
read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/bitmagnet-web.service
[Unit]
Description=bitmagnet Web GUI
After=network-online.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/bitmagnet
ExecStart=/opt/bitmagnet/bitmagnet worker run --all
Environment=POSTGRES_HOST=localhost
Environment=POSTGRES_PASSWORD=$POSTGRES_PASSWORD
Environment=TMDB_API_KEY=$tmdbapikey
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now bitmagnet-web
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"

View File

@@ -24,7 +24,7 @@ update_os
#NODE_VERSION="22" NODE_MODULE="yarn" install_node_and_modules #NODE_VERSION="22" NODE_MODULE="yarn" install_node_and_modules
#PG_VERSION="15" #PG_VERSION="15"
#MARIADB_VERSION="11.8" MARIADB_VERSION="10.11"
#MYSQL_VERSION="8.0" #MYSQL_VERSION="8.0"
#install_postgresql #install_postgresql

View File

@@ -13,15 +13,162 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
build-essential \
git \
libnewt-dev \
libssl-dev \
libncurses5-dev \
subversion \
libsqlite3-dev \
libjansson-dev \
libxml2-dev \
uuid-dev \
default-libmysqlclient-dev \
htop \
sngrep \
lame \
ffmpeg \
mpg123 \
vim \
expect \
openssh-server \
apache2 \
mariadb-server \
mariadb-client \
bison \
flex \
php8.2 \
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
php-pear \
sox \
sqlite3 \
pkg-config \
automake \
libtool \
autoconf \
unixodbc-dev \
uuid \
libasound2-dev \
libogg-dev \
libvorbis-dev \
libicu-dev \
libcurl4-openssl-dev \
odbc-mariadb \
libical-dev \
libneon27-dev \
libsrtp2-dev \
libspandsp-dev \
subversion \
libtool-bin \
python-dev-is-python3 \
unixodbc \
software-properties-common \
nodejs \
npm \
ipset \
iptables \
fail2ban \
php-soap
msg_ok "Installed Dependencies"
msg_info "Installing Asterisk (Patience)"
cd /usr/src
curl -fsSL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
tar xf asterisk-21-current.tar.gz
cd asterisk-21.*
$STD contrib/scripts/get_mp3_source.sh
$STD contrib/scripts/install_prereq install
$STD ./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled
$STD make
$STD make install
$STD make samples
$STD make config
ldconfig
msg_ok "Installed Asterisk"
msg_info "Setup Asterisk"
groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk:asterisk /etc/asterisk
chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk:asterisk /usr/lib64/asterisk
sed -i 's|#AST_USER|AST_USER|' /etc/default/asterisk
sed -i 's|#AST_GROUP|AST_GROUP|' /etc/default/asterisk
sed -i 's|;runuser|runuser|' /etc/asterisk/asterisk.conf
sed -i 's|;rungroup|rungroup|' /etc/asterisk/asterisk.conf
echo "/usr/lib64" >> /etc/ld.so.conf.d/x86_64-linux-gnu.conf
ldconfig
msg_ok "Done Setup Asterisk"
msg_info "Setup Apache"
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/8.2/apache2/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/8.2/apache2/php.ini
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
$STD a2enmod rewrite
systemctl restart apache2
rm /var/www/html/index.html
msg_ok "Done Setup Apache"
# Configure ODBC
cat <<EOF > /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage = 1
EOF
cat <<EOF > /etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to 'asteriskcdrdb' database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF
msg_info "Installing FreePBX" msg_info "Installing FreePBX"
cd /tmp cd /usr/local/src
wget https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh -O /tmp/sng_freepbx_debian_install.sh curl -fsSL http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz
bash /tmp/sng_freepbx_debian_install.sh tar zxf freepbx-17.0-latest-EDGE.tgz
cd /usr/local/src/freepbx/
$STD ./start_asterisk start
# Even though the php code completes successfully, it is returning non-zero exit code, so in the next line we return true, needed for successful installation
./install -n &>/dev/null || true
$STD fwconsole ma installall
$STD fwconsole reload
$STD fwconsole restart
msg_ok "Installed FreePBX" msg_ok "Installed FreePBX"
msg_info "Setup FreePBX Service"
cat <<EOF > /etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable -q --now freepbx
msg_ok "Done Setup FreePBX Service"
motd_ssh motd_ssh
customize customize
# Cleanup
msg_info "Cleaning up" msg_info "Cleaning up"
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean

View File

@@ -1,171 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Arian Nasr (arian-nasr)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.freepbx.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
build-essential \
git \
libnewt-dev \
libssl-dev \
libncurses5-dev \
subversion \
libsqlite3-dev \
libjansson-dev \
libxml2-dev \
uuid-dev \
default-libmysqlclient-dev \
htop \
sngrep \
lame \
ffmpeg \
mpg123 \
vim \
expect \
openssh-server \
apache2 \
mariadb-server \
mariadb-client \
bison \
flex \
php8.2 \
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
php-pear \
sox \
sqlite3 \
pkg-config \
automake \
libtool \
autoconf \
unixodbc-dev \
uuid \
libasound2-dev \
libogg-dev \
libvorbis-dev \
libicu-dev \
libcurl4-openssl-dev \
odbc-mariadb \
libical-dev \
libneon27-dev \
libsrtp2-dev \
libspandsp-dev \
subversion \
libtool-bin \
python-dev-is-python3 \
unixodbc \
software-properties-common \
nodejs \
npm \
ipset \
iptables \
fail2ban \
php-soap
msg_ok "Installed Dependencies"
msg_info "Installing Asterisk (Patience)"
cd /usr/src
curl -fsSL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
tar xf asterisk-21-current.tar.gz
cd asterisk-21.*
$STD contrib/scripts/get_mp3_source.sh
$STD contrib/scripts/install_prereq install
$STD ./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled
$STD make
$STD make install
$STD make samples
$STD make config
ldconfig
msg_ok "Installed Asterisk"
msg_info "Setup Asterisk"
groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk:asterisk /etc/asterisk
chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk:asterisk /usr/lib64/asterisk
sed -i 's|#AST_USER|AST_USER|' /etc/default/asterisk
sed -i 's|#AST_GROUP|AST_GROUP|' /etc/default/asterisk
sed -i 's|;runuser|runuser|' /etc/asterisk/asterisk.conf
sed -i 's|;rungroup|rungroup|' /etc/asterisk/asterisk.conf
echo "/usr/lib64" >>/etc/ld.so.conf.d/x86_64-linux-gnu.conf
ldconfig
msg_ok "Done Setup Asterisk"
msg_info "Setup Apache"
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/8.2/apache2/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/8.2/apache2/php.ini
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
$STD a2enmod rewrite
systemctl restart apache2
rm /var/www/html/index.html
msg_ok "Done Setup Apache"
# Configure ODBC
cat <<EOF >/etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage = 1
EOF
cat <<EOF >/etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to 'asteriskcdrdb' database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF
msg_info "Installing FreePBX"
cd /usr/local/src
curl -fsSL http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz -o freepbx-17.0-latest-EDGE.tgz
tar zxf freepbx-17.0-latest-EDGE.tgz
cd /usr/local/src/freepbx/
$STD ./start_asterisk start
# Even though the php code completes successfully, it is returning non-zero exit code, so in the next line we return true, needed for successful installation
./install -n &>/dev/null || true
$STD fwconsole ma installall
$STD fwconsole reload
$STD fwconsole restart
msg_ok "Installed FreePBX"
msg_info "Setup FreePBX Service"
cat <<EOF >/etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable -q --now freepbx
msg_ok "Done Setup FreePBX Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -13,17 +13,18 @@ setting_up_container
network_check network_check
update_os update_os
PG_VERSION="16" install_postgresql
PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php
NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules
install_composer
msg_info "Installing Dependencies (Patience)" msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \ $STD apt-get install -y \
postgresql \
nginx \ nginx \
apt-transport-https \ apt-transport-https \
gnupg2 \
lsb-release \ lsb-release \
ffmpeg \ ffmpeg \
curl \
unzip \
sudo \
mc \
cron \ cron \
libapache2-mod-xsendfile \ libapache2-mod-xsendfile \
libzip-dev \ libzip-dev \
@@ -31,19 +32,15 @@ $STD apt-get install -y \
libpng-dev \ libpng-dev \
libjpeg62-turbo-dev \ libjpeg62-turbo-dev \
libpq-dev \ libpq-dev \
libwebp-dev libwebp-dev \
libapache2-mod-php \
composer
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
# PG_VERSION="16" install_postgresql msg_info "Setting up PSql Database"
# PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php
# NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules
# install_composer
msg_info "Setting up PostgreSQL Database"
DB_NAME=koel_db DB_NAME=koel_db
DB_USER=koel DB_USER=koel
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
APP_SECRET=$(openssl rand -base64 32)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $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 "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 client_encoding TO 'utf8';"
@@ -55,38 +52,58 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
echo "Koel Database Password: $DB_PASS" echo "Koel Database Password: $DB_PASS"
echo "Koel Database Name: $DB_NAME" echo "Koel Database Name: $DB_NAME"
} >> ~/koel.creds } >> ~/koel.creds
msg_ok "Set up PostgreSQL Database" msg_ok "Set up PostgreSQL database"
msg_info "Setting up Node.js/Yarn"
mkdir -p /etc/apt/keyrings
$STD curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
$STD echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
$STD apt-get update
$STD apt-get install -y nodejs
$STD npm install -g npm@latest
$STD npm install -g yarn
msg_ok "Installed Node.js/Yarn"
msg_info "Setting up PHP"
$STD curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
$STD sh -c '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 update
$STD apt install -y php8.3 php8.3-{bcmath,exif,bz2,cli,common,curl,fpm,gd,intl,sqlite3,mbstring,xml,zip,pgsql}
msg_ok "PHP successfully setup"
msg_info "Installing Koel(Patience)" msg_info "Installing Koel(Patience)"
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | grep "title>Release" | cut -d " " -f 4) RELEASE=$(wget -q https://github.com/koel/koel/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
mkdir -p /opt/koel_{media,sync}
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip -o /opt/koel.zip
cd /opt cd /opt
unzip koel.zip mkdir -p /opt/koel_{media,sync}
cd /opt/koel wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
mv .env.example .env unzip -q koel-${RELEASE}.zip
$STD composer install --no-interaction
sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \
-e "s/DB_HOST=.*/DB_HOST=localhost/" \
-e "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" \
-e "s/DB_PORT=.*/DB_PORT=5432/" \
-e "s|APP_KEY=.*|APP_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" \
-e "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" \
-e "s|DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" \
-e "s|MEDIA_PATH=.*|MEDIA_PATH=/opt/koel_media|" \
-e "s|FFMPEG_PATH=/usr/local/bin/ffmpeg|FFMPEG_PATH=/usr/bin/ffmpeg|" /opt/koel/.env
php artisan koel:init --no-assets
chown -R :www-data /opt/* chown -R :www-data /opt/*
chmod -R g+r /opt/* chmod -R g+r /opt/*
chmod -R g+rw /opt/* chmod -R g+rw /opt/*
chown -R www-data:www-data /opt/* chown -R www-data:www-data /opt/*
chmod -R 755 /opt/* chmod -R 755 /opt/*
cd /opt/koel
echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc
source ~/.bashrc
$STD composer update --no-interaction
$STD composer install --no-interaction
sudo sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \
-e "s/DB_HOST=.*/DB_HOST=localhost/" \
-e "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" \
-e "s/DB_PORT=.*/DB_PORT=5432/" \
-e "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" \
-e "s|DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" \
-e "s|MEDIA_PATH=.*|MEDIA_PATH=/opt/koel_media|" \
-e "s|FFMPEG_PATH=/usr/local/bin/ffmpeg|FFMPEG_PATH=/usr/bin/ffmpeg|" /opt/koel/.env
sed -i -e "s/^upload_max_filesize = .*/upload_max_filesize = 200M/" \
-e "s/^post_max_size = .*/post_max_size = 200M/" \
-e "s/^memory_limit = .*/memory_limit = 200M/" /etc/php/8.3/fpm/php.ini
msg_ok "Installed Koel" msg_ok "Installed Koel"
msg_info "Set up web services" msg_info "Set up web services"
cat <<EOF >/etc/nginx/sites-available/koel cat <<EOF >/etc/nginx/sites-available/koel
server { server {
listen *:80; listen 6767;
server_name koel.local; server_name koel.local;
root /opt/koel/public; root /opt/koel/public;
index index.php; index index.php;
@@ -103,24 +120,18 @@ server {
} }
location /media/ { location /media/ {
internal;
alias /opt/koel_media; alias /opt/koel_media;
autoindex on;
access_log /var/log/nginx/koel.access.log;
error_log /var/log/nginx/koel.error.log;
} }
location ~ \.php$ { location ~ \.php$ {
try_files \$uri \$uri/ /index.php?\$args; try_files \$uri =404;
fastcgi_param PATH_INFO \$fastcgi_path_info;
fastcgi_param PATH_TRANSLATED \$document_root\$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.3-fpm.sock; fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_param PATH_INFO \$fastcgi_path_info;
} }
} }
EOF EOF
@@ -141,7 +152,7 @@ motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
rm -rf /opt/koel.zip rm -rf /opt/koel-${RELEASE}.zip
$STD apt-get autoremove $STD apt-get autoremove
$STD apt-get autoclean $STD apt-get autoclean
msg_ok "Cleaned" msg_ok "Cleaned"

View File

@@ -21,23 +21,32 @@ $STD apt-get install -y \
fping \ fping \
graphviz \ graphviz \
imagemagick \ imagemagick \
mariadb-client \
mariadb-server \
mtr-tiny \ mtr-tiny \
nginx \ nginx \
nmap \ nmap \
rrdtool \ rrdtool \
snmp \ snmp \
snmpd snmpd \
git \
whois
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
install_php msg_info "Installing PHP"
install_mariadb $STD apt-get install -y \
install_composer php8.2-{cli,fpm,gd,gmp,mbstring,mysql,snmp,xml,zip,curl}
msg_ok "Installed PHP"
msg_info "Installing Python" msg_info "Installing Python"
$STD apt-get install -y \ $STD apt-get install -y \
python3-{dotenv,pymysql,redis,setuptools,systemd,pip} python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
msg_ok "Installed Python" msg_ok "Installed Python"
msg_info "Add User"
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
msg_ok "Add User"
msg_info "Configuring Database" msg_info "Configuring Database"
DB_NAME=librenms DB_NAME=librenms
DB_USER=librenms DB_USER=librenms
@@ -54,13 +63,15 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS
msg_ok "Configured Database" msg_ok "Configured Database"
msg_info "Setup Librenms" msg_info "Setup Librenms"
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)" tmp_file=$(mktemp)
fetch_and_deploy_gh_release "librenms/librenms" RELEASE=$(curl -fsSL https://api.github.com/repos/librenms/librenms/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL https://github.com/librenms/librenms/archive/refs/tags/${RELEASE}.tar.gz -o $tmp_file
tar -xzf $tmp_file -C /opt
mv /opt/librenms-${RELEASE} /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/ setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
$STD pip3 install -r /opt/librenms/requirements.txt
pip3 install --no-user -r /opt/librenms/requirements.txt
cp /opt/librenms/.env.example /opt/librenms/.env cp /opt/librenms/.env.example /opt/librenms/.env
@@ -68,18 +79,25 @@ sed -i "s/^#DB_DATABASE=.*/DB_DATABASE=${DB_NAME}/" /opt/librenms/.env
sed -i "s/^#DB_USERNAME=.*/DB_USERNAME=${DB_USER}/" /opt/librenms/.env sed -i "s/^#DB_USERNAME=.*/DB_USERNAME=${DB_USER}/" /opt/librenms/.env
sed -i "s/^#DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/" /opt/librenms/.env sed -i "s/^#DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/" /opt/librenms/.env
msg_ok "Setup Librenms"
msg_info "Setup Composer"
cd /opt
curl -fsSL https://getcomposer.org/composer-stable.phar -o /usr/bin/composer
chmod +x /usr/bin/composer
cd /opt/librenms
$STD composer install --no-dev -o --no-interaction
chown -R librenms:librenms /opt/librenms chown -R librenms:librenms /opt/librenms
chmod 771 /opt/librenms chmod 771 /opt/librenms
setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
msg_ok "Setup LibreNMS" msg_ok "Setup Composer"
msg_info "Configure MariaDB" msg_info "Setup MariaDB"
sed -i "/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0" /etc/mysql/mariadb.conf.d/50-server.cnf sed -i '/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0' /etc/mysql/mariadb.conf.d/50-server.cnf
systemctl enable -q --now mariadb systemctl enable -q --now mariadb
msg_ok "Configured MariaDB" msg_ok "Setup MariaDB"
msg_info "Configure PHP-FPM" msg_info "Configure PHP-FPM"
cp /etc/php/8.2/fpm/pool.d/www.conf /etc/php/8.2/fpm/pool.d/librenms.conf cp /etc/php/8.2/fpm/pool.d/www.conf /etc/php/8.2/fpm/pool.d/librenms.conf

View File

@@ -17,7 +17,8 @@ $STD apt-get install -y \
curl \ curl \
sudo \ sudo \
mc \ mc \
gnupg2 postgresql \ gnupg2\
postgresql \
lsb-release \ lsb-release \
rbenv \ rbenv \
libpq-dev \ libpq-dev \
@@ -45,35 +46,42 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
msg_ok "Set up PostgreSQL" msg_ok "Set up PostgreSQL"
msg_info "Downloading Manyfold" msg_info "Downloading Manyfold"
RELEASE=$(curl -fsSL https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cd /opt cd /opt
curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip
unzip -q manyfold.zip unzip -q manyfold.zip
mv /opt/manyfold-${RELEASE}/ /opt/manyfold mv /opt/manyfold-${RELEASE}/ /opt/manyfold
RUBY_INSTALL_VERSION=$(cat /opt/manyfold/.ruby-version) RUBY_VERSION=$(cat /opt/manyfold/.ruby-version)
YARN_VERSION=$(grep '"packageManager":' /opt/manyfold/package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/') YARN_VERSION=$(grep '"packageManager":' /opt/manyfold/package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/')
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Downloaded Manyfold" msg_ok "Downloaded Manyfold"
NODE_VERSION="22" NODE_MODULE="npm@latest,${YARN_VERSION}" install_node_and_modules msg_info "Setting up Node.js/Yarn"
RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" setup_rbenv_stack mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
$STD apt-get update
$STD apt-get install -y nodejs
$STD npm install -g npm@latest
$STD npm install -g yarn
msg_ok "Installed Node.js/Yarn"
# msg_info "Add ruby-build" msg_info "Add ruby-build"
# mkdir -p ~/.rbenv/plugins mkdir -p ~/.rbenv/plugins
# cd ~/.rbenv/plugins cd ~/.rbenv/plugins
# RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
# curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip
# unzip -q ruby-build.zip unzip -q ruby-build.zip
# mv ruby-build-* ~/.rbenv/plugins/ruby-build mv ruby-build-* ~/.rbenv/plugins/ruby-build
# echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt
# msg_ok "Added ruby-build" msg_ok "Added ruby-build"
# msg_info "Installing ruby ${RUBY_VERSION}" msg_info "Installing ruby ${RUBY_VERSION}"
# $STD rbenv install $RUBY_VERSION $STD rbenv install $RUBY_VERSION
# echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >>~/.bashrc echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
# echo 'eval "$(rbenv init -)"' >>~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# source ~/.bashrc source ~/.bashrc
# msg_ok "Installed ruby ${RUBY_VERSION}" msg_ok "Installed ruby ${RUBY_VERSION}"
msg_info "Adding manyfold user" msg_info "Adding manyfold user"
useradd -m -s /usr/bin/bash manyfold useradd -m -s /usr/bin/bash manyfold
@@ -104,7 +112,7 @@ source /opt/.env
cd /opt/manyfold cd /opt/manyfold
chown -R manyfold:manyfold /opt/manyfold chown -R manyfold:manyfold /opt/manyfold
$STD gem install bundler $STD gem install bundler
$STD rbenv global $RUBY_INSTALL_VERSION $STD rbenv global $RUBY_VERSION
$STD bundle install $STD bundle install
$STD gem install sidekiq $STD gem install sidekiq
$STD npm install --global corepack $STD npm install --global corepack
@@ -116,7 +124,6 @@ rm /opt/manyfold/config/credentials.yml.enc
$STD bin/rails credentials:edit $STD bin/rails credentials:edit
$STD bin/rails db:migrate $STD bin/rails db:migrate
$STD bin/rails assets:precompile $STD bin/rails assets:precompile
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed manyfold" msg_ok "Installed manyfold"
msg_info "Creating Service" msg_info "Creating Service"

74
install/odoo-install.sh Normal file
View File

@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/tteck/Proxmox/raw/main/LICENSE
# Source: https://github.com/odoo/odoo
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
build-essential \
make
msg_ok "Installed Dependencies"
RELEASE=$(curl -fsSL https://nightly.odoo.com/ | grep -oE 'href="[0-9]+\.[0-9]+/nightly"' | head -n1 | cut -d'"' -f2 | cut -d/ -f1)
LATEST_VERSION=$(curl -fsSL "https://nightly.odoo.com/${RELEASE}/nightly/deb/" |
grep -oP "odoo_${RELEASE}\.\d+_all\.deb" |
sed -E "s/odoo_(${RELEASE}\.[0-9]+)_all\.deb/\1/" |
sort -V |
tail -n1)
msg_info "Setup Odoo $RELEASE"
curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.latest_all.deb -o /opt/odoo.deb
$STD apt install -y /opt/odoo.deb
msg_ok "Setup Odoo $RELEASE"
msg_info "Setup PostgreSQL Database"
DB_NAME="odoo"
DB_USER="odoo_usr"
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
{
echo "Odoo-Credentials"
echo -e "Odoo Database User: $DB_USER"
echo -e "Odoo Database Password: $DB_PASS"
echo -e "Odoo Database Name: $DB_NAME"
} >>~/odoo.creds
msg_ok "Setup PostgreSQL"
msg_info "Configuring Odoo"
sed -i \
-e "s|^;*db_host *=.*|db_host = localhost|" \
-e "s|^;*db_port *=.*|db_port = 5432|" \
-e "s|^;*db_user *=.*|db_user = $DB_USER|" \
-e "s|^;*db_password *=.*|db_password = $DB_PASS|" \
/etc/odoo/odoo.conf
$STD sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -i base --stop-after-init
systemctl restart odoo
echo "${LATEST_VERSION}" >/opt/${APPLICATION}_version.txt
msg_ok "Configured Odoo"
msg_info "Restarting Odoo"
msg_ok "Restarted Odoo"
motd_ssh
customize
msg_info "Cleaning up"
rm -f /opt/odoo.deb
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG # Copyright (c) 2021-2025 tteck
# Author: Slaviša Arežina (tremor021) # Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT
# Source: https://github.com/rclone/rclone # https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color color
@@ -14,29 +14,14 @@ network_check
update_os update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt-get install -y gnupg2
apache2-utils \
unzip
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing rclone" msg_info "Installing rclone"
temp_file=$(mktemp) $STD fetch_and_deploy_gh_release rclone/rclone
mkdir -p /opt/rclone dpkg -i rclone-v1.69.1-linux-amd64.deb
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file"
$STD unzip -j "$temp_file" '*/**' -d /opt/rclone
cd /opt/rclone
RCLONE_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD htpasswd -cb -B /opt/login.pwd admin "$RCLONE_PASSWORD"
{
echo "rclone-Credentials"
echo "rclone User Name: admin"
echo "rclone Password: $RCLONE_PASSWORD"
} >>~/rclone.creds
echo "${RELEASE}" >/opt/rclone_version.txt
msg_ok "Installed rclone" msg_ok "Installed rclone"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/rclone-web.service cat <<EOF >/etc/systemd/system/rclone-web.service
[Unit] [Unit]
Description=Rclone Web GUI Description=Rclone Web GUI
@@ -45,21 +30,19 @@ After=network-online.target
[Service] [Service]
Type=simple Type=simple
User=root User=root
WorkingDirectory=/opt/rclone ExecStart=/usr/bin/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345
ExecStart=/opt/rclone/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/login.pwd
Restart=on-failure Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable -q --now rclone-web systemctl enable -q --now rclone-web
msg_ok "Created Service"
motd_ssh motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
rm -f "$temp_file"
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean
msg_ok "Cleaned" msg_ok "Cleaned"

View File

@@ -490,8 +490,7 @@ advanced_settings() {
while read -r pair; do while read -r pair; do
start=$(echo "${pair}" | cut -d':' -f1) start=$(echo "${pair}" | cut -d':' -f1)
end=$(echo "${pair}" | cut -d':' -f2) end=$(echo "${pair}" | cut -d':' -f2)
echo "${start}:${end} --- $(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}')" if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*bridge[-_](ports|stp|fd|vlan-aware|vids)\s+'; then
if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*(bridge[-_](ports|stp|fd|vlan-aware|vids)|ovs_type\s+OVSBridge)\b'; then
iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}') iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}')
BRIDGES="${iface_name}"$'\n'"${BRIDGES}" BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
fi fi
@@ -906,7 +905,7 @@ config_file() {
while read -r pair; do while read -r pair; do
start=$(echo "${pair}" | cut -d':' -f1) start=$(echo "${pair}" | cut -d':' -f1)
end=$(echo "${pair}" | cut -d':' -f2) end=$(echo "${pair}" | cut -d':' -f2)
if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*(bridge[-_](ports|stp|fd|vlan-aware|vids)|ovs_type\s+OVSBridge)\b'; then if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*bridge[-_](ports|stp|fd|vlan-aware|vids)\s+'; then
iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}') iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}')
BRIDGES="${iface_name}"$'\n'"${BRIDGES}" BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
fi fi

View File

@@ -47,7 +47,6 @@ formatting() {
BOLD=$(echo "\033[1m") BOLD=$(echo "\033[1m")
HOLD=" " HOLD=" "
TAB=" " TAB=" "
TAB3=" "
} }
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -216,155 +215,127 @@ __curl_err_handler() {
} }
### dev spinner ### ### dev spinner ###
declare -A MSG_INFO_SHOWN=()
SPINNER_PID=""
SPINNER_ACTIVE=0 SPINNER_ACTIVE=0
SPINNER_PID=""
SPINNER_MSG="" SPINNER_MSG=""
declare -A MSG_INFO_SHOWN=()
# Trap cleanup on various signals # Trap cleanup on various signals
trap 'cleanup_spinner' EXIT INT TERM HUP trap 'cleanup_spinner' EXIT INT TERM HUP
spinner_frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') # Cleans up spinner process on exit
cleanup_spinner() {
stop_spinner
# Additional cleanup if needed
}
# Ensure POSIX compatibility across Alpine and Debian/Ubuntu
# === Spinner Start ===
start_spinner() { start_spinner() {
local msg="$1" local msg="${1:-Processing...}"
local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏)
local spin_i=0 local spin_i=0
local interval=0.1 local interval=0.1
stop_spinner # Set message and clear current line
SPINNER_MSG="$msg" SPINNER_MSG="$msg"
printf "\r\e[2K" >&2
# Stop any existing spinner
stop_spinner
# Set active flag
SPINNER_ACTIVE=1 SPINNER_ACTIVE=1
# Start spinner in background
{ {
while [ "$SPINNER_ACTIVE" -eq 1 ]; do while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do
if [ -t 2 ]; then printf "\r\e[2K%s %b" "${TAB}${frames[spin_i]}${TAB}" "${YW}${SPINNER_MSG}${CL}" >&2
printf "\r\e[2K%s %b" "${TAB}${spinner_frames[spin_i]}${TAB}" "${YW}${SPINNER_MSG}${CL}" >&2 spin_i=$(((spin_i + 1) % ${#frames[@]}))
else
printf "%s...\n" "$SPINNER_MSG" >&2
break
fi
spin_i=$(((spin_i + 1) % ${#spinner_frames[@]}))
sleep "$interval" sleep "$interval"
done done
} & } &
local pid=$! SPINNER_PID=$!
if kill -0 "$pid" 2>/dev/null; then
SPINNER_PID="$pid" # Disown to prevent getting "Terminated" messages
disown "$SPINNER_PID" 2>/dev/null || true disown "$SPINNER_PID" 2>/dev/null || true
else
SPINNER_ACTIVE=0
SPINNER_PID=""
fi
} }
# === Spinner Stop (No wait!) ===
stop_spinner() { stop_spinner() {
if [ "$SPINNER_ACTIVE" -eq 1 ] && [ -n "$SPINNER_PID" ]; then # Check if spinner is active and PID exists
if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "${SPINNER_PID}" ]]; then
SPINNER_ACTIVE=0 SPINNER_ACTIVE=0
if kill -0 "$SPINNER_PID" 2>/dev/null; then if kill -0 "$SPINNER_PID" 2>/dev/null; then
kill "$SPINNER_PID" 2>/dev/null || true kill "$SPINNER_PID" 2>/dev/null
for _ in $(seq 1 10); do # Give it a moment to terminate
kill -0 "$SPINNER_PID" 2>/dev/null || break sleep 0.1
sleep 0.05 # Force kill if still running
done if kill -0 "$SPINNER_PID" 2>/dev/null; then
kill -9 "$SPINNER_PID" 2>/dev/null
fi fi
# Wait for process but ignore errors
wait "$SPINNER_PID" 2>/dev/null || true
fi
# Clear spinner line
printf "\r\e[2K" >&2 printf "\r\e[2K" >&2
SPINNER_PID="" SPINNER_PID=""
fi fi
} }
# === Cleanup Spinner on signals === spinner_guard() {
cleanup_spinner() { # Safely stop spinner if it's running
if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "${SPINNER_PID}" ]]; then
stop_spinner stop_spinner
fi
} }
# === msg_info ===
msg_info() { msg_info() {
local msg="$1" local msg="${1:-Information message}"
[ -z "$msg" ] && return
if [ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]; then return; fi # Only show each message once unless reset
if [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]]; then
return
fi
MSG_INFO_SHOWN["$msg"]=1 MSG_INFO_SHOWN["$msg"]=1
stop_spinner
spinner_guard
start_spinner "$msg" start_spinner "$msg"
} }
# === msg_ok ===
msg_ok() { msg_ok() {
local msg="$1" local msg="${1:-Operation completed successfully}"
[ -z "$msg" ] && return
if [ "$SPINNER_ACTIVE" -eq 1 ]; then
stop_spinner stop_spinner
else printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2
printf "\r\e[2K" >&2
fi # Remove from shown messages to allow it to be shown again
printf "\r\e[2K%s %b\n" "$CM" "${GN}${msg}${CL}" >&2
unset MSG_INFO_SHOWN["$msg"] unset MSG_INFO_SHOWN["$msg"]
} }
# === msg_error ===
msg_error() { msg_error() {
local msg="$1" local msg="${1:-An error occurred}"
[ -z "$msg" ] && return
stop_spinner stop_spinner
printf "\r\e[2K%s %b\n" "$CROSS" "${RD}${msg}${CL}" >&2 printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2
} }
# === msg_warn ===
msg_warn() { msg_warn() {
local msg="$1" local msg="${1:-Warning}"
[ -z "$msg" ] && return
stop_spinner stop_spinner
printf "\r\e[2K%s %b\n" "$INFO" "${YWB}${msg}${CL}" >&2 printf "\r\e[2K%s %b\n" "${INFO}" "${YWB}${msg}" >&2
# Remove from shown messages to allow it to be shown again
unset MSG_INFO_SHOWN["$msg"] unset MSG_INFO_SHOWN["$msg"]
} }
# === msg_custom === # Helper function to display a message with custom symbol and color
msg_custom() { msg_custom() {
local symbol="$1" local symbol="${1:-*}"
local color="$2" local color="${2:-$CL}"
local msg="$3" local msg="${3:-Custom message}"
[ -z "$msg" ] && return
stop_spinner stop_spinner
printf "\r\e[2K%s %b\n" "$symbol" "${color}${msg}${CL}" >&2 printf "\r\e[2K%s %b\n" "$symbol" "${color}${msg}${CL}" >&2
} }
msg_progress() {
local current="$1"
local total="$2"
local label="$3"
local width=40
local filled
local percent
local bar
local empty
local fill_char="#"
local empty_char="-"
# Sanitize and validate input
if ! [[ "$current" =~ ^[0-9]+$ ]] || ! [[ "$total" =~ ^[0-9]+$ ]] || [ "$total" -eq 0 ]; then
printf "\r\e[2K%s %b\n" "$CROSS" "${RD}Invalid progress input${CL}" >&2
return
fi
percent=$(((current * 100) / total))
filled=$(((current * width) / total))
empty=$((width - filled))
bar=$(printf "%${filled}s" | tr ' ' "$fill_char")
bar+=$(printf "%${empty}s" | tr ' ' "$empty_char")
# Print the progress line
printf "\r\e[2K%s [%s] %3d%% %s" "${TAB}" "$bar" "$percent" "$label" >&2
# Final newline when complete
if [ "$current" -eq "$total" ]; then
printf "\n" >&2
fi
}
# # ------------------------------------------------------------------------------ # # ------------------------------------------------------------------------------
# # Spinner trap: ensures spinner is stopped on termination signals. # # Spinner trap: ensures spinner is stopped on termination signals.
# # ------------------------------------------------------------------------------ # # ------------------------------------------------------------------------------

View File

@@ -86,7 +86,7 @@ setting_up_container() {
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
systemctl disable -q --now systemd-networkd-wait-online.service systemctl disable -q --now systemd-networkd-wait-online.service
msg_ok "Set up Container OS" msg_ok "Set up Container OS"
#msg_custom "${CM}" "${GN}" "Network Connected: ${BL}$(hostname -I)" msg_ok "Network Connected: ${BL}$(hostname -I)"
} }
# This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected # This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected

View File

@@ -112,10 +112,10 @@ install_postgresql() {
msg_ok "PostgreSQL $PG_VERSION is already installed" msg_ok "PostgreSQL $PG_VERSION is already installed"
return return
fi fi
msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION" echo -e "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
NEED_PG_INSTALL=true NEED_PG_INSTALL=true
else else
msg_info "Setup PostgreSQL $PG_VERSION" echo -e "PostgreSQL not installed, proceeding with fresh install of $PG_VERSION"
NEED_PG_INSTALL=true NEED_PG_INSTALL=true
fi fi
@@ -123,10 +123,10 @@ install_postgresql() {
if [[ -n "$CURRENT_PG_VERSION" ]]; then if [[ -n "$CURRENT_PG_VERSION" ]]; then
msg_info "Dumping all PostgreSQL data from version $CURRENT_PG_VERSION" msg_info "Dumping all PostgreSQL data from version $CURRENT_PG_VERSION"
su - postgres -c "pg_dumpall > /var/lib/postgresql/backup_$(date +%F)_v${CURRENT_PG_VERSION}.sql" su - postgres -c "pg_dumpall > /var/lib/postgresql/backup_$(date +%F)_v${CURRENT_PG_VERSION}.sql"
fi
msg_info "Stopping PostgreSQL service" msg_info "Stopping PostgreSQL service"
systemctl stop postgresql systemctl stop postgresql || true
fi
msg_info "Removing pgdg repo and old GPG key" msg_info "Removing pgdg repo and old GPG key"
rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/trusted.gpg.d/postgresql.gpg
@@ -149,7 +149,7 @@ install_postgresql() {
fi fi
$STD msg_info "Starting PostgreSQL $PG_VERSION" $STD msg_info "Starting PostgreSQL $PG_VERSION"
systemctl enable -q --now postgresql systemctl enable --now postgresql
if [[ -n "$CURRENT_PG_VERSION" ]]; then if [[ -n "$CURRENT_PG_VERSION" ]]; then
$STD msg_info "Restoring dumped data" $STD msg_info "Restoring dumped data"
@@ -167,18 +167,13 @@ install_mariadb() {
# grab dynamic latest LTS version # grab dynamic latest LTS version
if [[ "$MARIADB_VERSION" == "latest" ]]; then if [[ "$MARIADB_VERSION" == "latest" ]]; then
$STD msg_info "Resolving latest GA MariaDB version" msg_info "Resolving latest MariaDB version"
MARIADB_VERSION=$(curl -fsSL http://mirror.mariadb.org/repo/ | MARIADB_VERSION=$(curl -fsSL https://mariadb.org | grep -oP 'MariaDB \K10\.[0-9]+' | head -n1)
grep -Eo '[0-9]+\.[0-9]+\.[0-9]+/' |
grep -vE 'rc/|rolling/' |
sed 's|/||' |
sort -Vr |
head -n1)
if [[ -z "$MARIADB_VERSION" ]]; then if [[ -z "$MARIADB_VERSION" ]]; then
msg_error "Could not determine latest GA MariaDB version" msg_error "Could not determine latest MariaDB version"
return 1 return 1
fi fi
$STD msg_ok "Latest GA MariaDB version is $MARIADB_VERSION" msg_ok "Latest MariaDB version is $MARIADB_VERSION"
fi fi
local CURRENT_VERSION="" local CURRENT_VERSION=""
@@ -187,23 +182,23 @@ install_mariadb() {
fi fi
if [[ "$CURRENT_VERSION" == "$MARIADB_VERSION" ]]; then if [[ "$CURRENT_VERSION" == "$MARIADB_VERSION" ]]; then
$STD msg_info "MariaDB $MARIADB_VERSION, upgrading" msg_info "MariaDB $MARIADB_VERSION already installed, checking for upgrade"
$STD apt-get update $STD apt-get update
$STD apt-get install --only-upgrade -y mariadb-server mariadb-client $STD apt-get install --only-upgrade -y mariadb-server mariadb-client
$STD msg_ok "MariaDB upgraded to $MARIADB_VERSION" msg_ok "MariaDB $MARIADB_VERSION upgraded if applicable"
return 0 return 0
fi fi
if [[ -n "$CURRENT_VERSION" ]]; then if [[ -n "$CURRENT_VERSION" ]]; then
$STD msg_info "Replacing MariaDB $CURRENT_VERSION with $MARIADB_VERSION (data will be preserved)" msg_info "Replacing MariaDB $CURRENT_VERSION with $MARIADB_VERSION (data will be preserved)"
$STD systemctl stop mariadb >/dev/null 2>&1 || true $STD systemctl stop mariadb >/dev/null 2>&1 || true
$STD apt-get purge -y 'mariadb*' || true $STD apt-get purge -y 'mariadb*' || true
rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg
else else
msg_info "Setup MariaDB $MARIADB_VERSION" msg_info "Installing MariaDB $MARIADB_VERSION"
fi fi
$STD msg_info "Setting up MariaDB Repository" msg_info "Setting up MariaDB Repository"
curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" | curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" |
gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg
@@ -213,7 +208,7 @@ install_mariadb() {
$STD apt-get update $STD apt-get update
$STD apt-get install -y mariadb-server mariadb-client $STD apt-get install -y mariadb-server mariadb-client
msg_ok "Setup MariaDB $MARIADB_VERSION" msg_ok "Installed MariaDB $MARIADB_VERSION"
} }
install_mysql() { install_mysql() {
@@ -258,9 +253,6 @@ install_php() {
local PHP_MODULE="${PHP_MODULE:-}" local PHP_MODULE="${PHP_MODULE:-}"
local PHP_APACHE="${PHP_APACHE:-NO}" local PHP_APACHE="${PHP_APACHE:-NO}"
local PHP_FPM="${PHP_FPM:-NO}" local PHP_FPM="${PHP_FPM:-NO}"
local DISTRO_CODENAME
DISTRO_CODENAME=$(awk -F= '/VERSION_CODENAME/ { print $2 }' /etc/os-release)
local DEFAULT_MODULES="bcmath,cli,curl,gd,intl,mbstring,opcache,readline,xml,zip" local DEFAULT_MODULES="bcmath,cli,curl,gd,intl,mbstring,opcache,readline,xml,zip"
local COMBINED_MODULES local COMBINED_MODULES
@@ -287,11 +279,11 @@ install_php() {
fi fi
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
$STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION" $STD echo "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then 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 curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/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/ ${DISTRO_CODENAME} main" \ 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 >/etc/apt/sources.list.d/php.list
$STD apt-get update $STD apt-get update
fi fi
@@ -337,12 +329,12 @@ install_php() {
for ini in "${PHP_INI_PATHS[@]}"; do for ini in "${PHP_INI_PATHS[@]}"; do
if [[ -f "$ini" ]]; then if [[ -f "$ini" ]]; then
$STD msg_info "Patching $ini" msg_info "Patching $ini"
sed -i "s|^memory_limit = .*|memory_limit = ${PHP_MEMORY_LIMIT}|" "$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|^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|^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" sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini"
$STD msg_ok "Patched $ini" msg_ok "Patched $ini"
fi fi
done done
} }
@@ -355,14 +347,14 @@ install_composer() {
if [[ -x "$COMPOSER_BIN" ]]; then if [[ -x "$COMPOSER_BIN" ]]; then
local CURRENT_VERSION local CURRENT_VERSION
CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}') CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
$STD msg_info "Composer $CURRENT_VERSION found, updating to latest" msg_info "Composer $CURRENT_VERSION found, updating to latest"
else else
msg_info "Setup Composer" msg_info "Composer not found, installing latest version"
fi fi
# Download and install latest composer # Download and install latest composer
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer &>/dev/null php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
msg_error "Failed to install Composer" msg_error "Failed to install Composer"
@@ -921,80 +913,3 @@ function setup_gs() {
msg_error "Ghostscript installation failed" msg_error "Ghostscript installation failed"
fi fi
} }
setup_rbenv_stack() {
local RUBY_VERSION="${RUBY_VERSION:-3.4.4}"
local RUBY_INSTALL_RAILS="${RUBY_INSTALL_RAILS:-true}"
local RBENV_DIR="$HOME/.rbenv"
local RBENV_BIN="$RBENV_DIR/bin/rbenv"
local PROFILE_FILE="$HOME/.profile"
local TMP_DIR
TMP_DIR=$(mktemp -d)
$STD msg_info "Installing rbenv + ruby-build + Ruby $RUBY_VERSION"
# Fetch latest rbenv release tag from GitHub (e.g. v1.3.2 → 1.3.2)
local RBENV_RELEASE
RBENV_RELEASE=$(curl -fsSL https://api.github.com/repos/rbenv/rbenv/releases/latest | grep '"tag_name":' | cut -d '"' -f4 | sed 's/^v//')
if [[ -z "$RBENV_RELEASE" ]]; then
msg_error "Failed to fetch latest rbenv version"
rm -rf "$TMP_DIR"
return 1
fi
# Download and extract rbenv release
curl -fsSL "https://github.com/rbenv/rbenv/archive/refs/tags/v${RBENV_RELEASE}.tar.gz" -o "$TMP_DIR/rbenv.tar.gz"
tar -xzf "$TMP_DIR/rbenv.tar.gz" -C "$TMP_DIR"
mkdir -p "$RBENV_DIR"
cp -r "$TMP_DIR/rbenv-${RBENV_RELEASE}/." "$RBENV_DIR/"
cd "$RBENV_DIR" && src/configure && make -C src
# Fetch latest ruby-build plugin release tag (e.g. v20250507 → 20250507)
local RUBY_BUILD_RELEASE
RUBY_BUILD_RELEASE=$(curl -fsSL https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep '"tag_name":' | cut -d '"' -f4 | sed 's/^v//')
if [[ -z "$RUBY_BUILD_RELEASE" ]]; then
msg_error "Failed to fetch latest ruby-build version"
rm -rf "$TMP_DIR"
return 1
fi
# Download and install ruby-build plugin
curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.tar.gz" -o "$TMP_DIR/ruby-build.tar.gz"
tar -xzf "$TMP_DIR/ruby-build.tar.gz" -C "$TMP_DIR"
mkdir -p "$RBENV_DIR/plugins/ruby-build"
cp -r "$TMP_DIR/ruby-build-${RUBY_BUILD_RELEASE}/." "$RBENV_DIR/plugins/ruby-build/"
echo "$RUBY_BUILD_RELEASE" >"$RBENV_DIR/plugins/ruby-build/RUBY_BUILD_version.txt"
# Persist rbenv init to user's profile
if ! grep -q 'rbenv init' "$PROFILE_FILE"; then
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >>"$PROFILE_FILE"
echo 'eval "$(rbenv init -)"' >>"$PROFILE_FILE"
fi
# Activate rbenv in current shell
export PATH="$RBENV_DIR/bin:$PATH"
eval "$("$RBENV_BIN" init - bash)"
# Install Ruby version if not already present
if "$RBENV_BIN" versions --bare | grep -qx "$RUBY_VERSION"; then
msg_ok "Ruby $RUBY_VERSION already installed"
else
$STD msg_info "Installing Ruby $RUBY_VERSION"
$STD "$RBENV_BIN" install "$RUBY_VERSION"
fi
# Set Ruby version globally
"$RBENV_BIN" global "$RUBY_VERSION"
hash -r
# Optionally install Rails via gem
if [[ "$RUBY_INSTALL_RAILS" == "true" ]]; then
$STD msg_info "Installing latest Rails via gem"
gem install rails
msg_ok "Rails $(rails -v) installed"
fi
rm -rf "$TMP_DIR"
msg_ok "rbenv stack ready (Ruby $RUBY_VERSION)"
}