mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-28 11:15:53 +00:00
Compare commits
1 Commits
update_ver
...
github-act
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bfd19484d |
16
.github/workflows/auto-update-app-headers.yml
vendored
16
.github/workflows/auto-update-app-headers.yml
vendored
@@ -25,13 +25,6 @@ jobs:
|
||||
app-id: ${{ vars.APP_ID }}
|
||||
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
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
@@ -98,17 +91,14 @@ jobs:
|
||||
gh pr review $PR_NUMBER --approve
|
||||
fi
|
||||
|
||||
- name: Approve pull request and merge
|
||||
- name: Re-approve pull request after update
|
||||
if: env.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_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')
|
||||
PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
fi
|
||||
|
||||
# Step 8: Output success message when no changes
|
||||
|
||||
@@ -80,25 +80,7 @@ jobs:
|
||||
VAR+="${{ github.event.issue.html_url }}"
|
||||
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
|
||||
if: steps.check_thread.outputs.thread_exists != 'true'
|
||||
id: post_to_discord
|
||||
env:
|
||||
DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }}
|
||||
@@ -124,7 +106,6 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Comment on Issue
|
||||
if: steps.check_thread.outputs.thread_exists != 'true'
|
||||
id: comment_on_issue
|
||||
env:
|
||||
MESSAGE: ${{ env.message }}
|
||||
|
||||
20
.github/workflows/delete_new_script.yaml
vendored
20
.github/workflows/delete_new_script.yaml
vendored
@@ -14,13 +14,6 @@ jobs:
|
||||
with:
|
||||
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)
|
||||
id: extract_title
|
||||
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
|
||||
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
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
|
||||
@@ -29,13 +29,6 @@ jobs:
|
||||
app-id: ${{ vars.APP_ID }}
|
||||
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
|
||||
env:
|
||||
token: ${{ secrets.NEWRELEASES_TOKEN }}
|
||||
@@ -117,12 +110,10 @@ jobs:
|
||||
- name: Approve pull request and merge
|
||||
if: env.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }}
|
||||
GH_TOKEN: ${{ secrets.PAT_MICHEL }}
|
||||
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')
|
||||
PR_NUMBER=$(gh pr list --head "update_versions" --json number --jq '.[].number')
|
||||
if [ -n "$PR_NUMBER" ]; then
|
||||
gh pr review $PR_NUMBER --approve
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
gh pr merge $PR_NUMBER --squash --delete-branch --admin
|
||||
fi
|
||||
|
||||
15
.github/workflows/move-to-main-repo.yaml
vendored
15
.github/workflows/move-to-main-repo.yaml
vendored
@@ -133,6 +133,10 @@ jobs:
|
||||
echo "install file already exists in ProxmoxVE"
|
||||
exit 1
|
||||
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"
|
||||
|
||||
@@ -153,13 +157,10 @@ jobs:
|
||||
cp ../frontend/public/json/$json_file frontend/public/json/. || true
|
||||
fi
|
||||
|
||||
echo $script_name
|
||||
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|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|" 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
|
||||
|
||||
git add . > /dev/null 2>&1
|
||||
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|# 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|# 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 .
|
||||
if git diff --cached --exit-code; then
|
||||
echo "No changes detected, skipping commit."
|
||||
exit 0
|
||||
|
||||
72
CHANGELOG.md
72
CHANGELOG.md
@@ -7,76 +7,6 @@
|
||||
|
||||
<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
|
||||
|
||||
### 🆕 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: 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))
|
||||
- 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))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
@@ -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"
|
||||
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"
|
||||
$STD go build
|
||||
chmod +x bitmagnet
|
||||
[ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/
|
||||
[ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/
|
||||
|
||||
39
ct/asterisk.sh
Normal file
39
ct/asterisk.sh
Normal 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}"
|
||||
@@ -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}"
|
||||
@@ -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}"
|
||||
@@ -6,7 +6,7 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/
|
||||
# Source: https://www.freepbx.org/
|
||||
|
||||
APP="FreePBX"
|
||||
var_tags="pbx;voip;telephony"
|
||||
var_tags=""
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-20}"
|
||||
|
||||
6
ct/headers/asterisk
Normal file
6
ct/headers/asterisk
Normal file
@@ -0,0 +1,6 @@
|
||||
___ __ _ __
|
||||
/ | _____/ /____ _____(_)____/ /__
|
||||
/ /| | / ___/ __/ _ \/ ___/ / ___/ //_/
|
||||
/ ___ |(__ ) /_/ __/ / / (__ ) ,<
|
||||
/_/ |_/____/\__/\___/_/ /_/____/_/|_|
|
||||
|
||||
6
ct/headers/authentik
Normal file
6
ct/headers/authentik
Normal file
@@ -0,0 +1,6 @@
|
||||
___ __ __ __ _ __
|
||||
/ | __ __/ /_/ /_ ___ ____ / /_(_) /__
|
||||
/ /| |/ / / / __/ __ \/ _ \/ __ \/ __/ / //_/
|
||||
/ ___ / /_/ / /_/ / / / __/ / / / /_/ / ,<
|
||||
/_/ |_\__,_/\__/_/ /_/\___/_/ /_/\__/_/_/|_|
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
____ __ __
|
||||
/ __ )____ ______/ /__________ _____/ /_
|
||||
/ __ / __ `/ ___/ //_/ ___/ _ \/ ___/ __/
|
||||
/ /_/ / /_/ / /__/ ,< / / / __(__ ) /_
|
||||
/_____/\__,_/\___/_/|_/_/ \___/____/\__/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
____ _ __ __
|
||||
/ __ )(_) /_____ ___ ____ _____ _____ ___ / /_
|
||||
/ __ / / __/ __ `__ \/ __ `/ __ `/ __ \/ _ \/ __/
|
||||
/ /_/ / / /_/ / / / / / /_/ / /_/ / / / / __/ /_
|
||||
/_____/_/\__/_/ /_/ /_/\__,_/\__, /_/ /_/\___/\__/
|
||||
/____/
|
||||
6
ct/headers/bookstack
Normal file
6
ct/headers/bookstack
Normal file
@@ -0,0 +1,6 @@
|
||||
____ __ __ __
|
||||
/ __ )____ ____ / /_______/ /_____ ______/ /__
|
||||
/ __ / __ \/ __ \/ //_/ ___/ __/ __ `/ ___/ //_/
|
||||
/ /_/ / /_/ / /_/ / ,< (__ ) /_/ /_/ / /__/ ,<
|
||||
/_____/\____/\____/_/|_/____/\__/\__,_/\___/_/|_|
|
||||
|
||||
6
ct/headers/gatus
Normal file
6
ct/headers/gatus
Normal file
@@ -0,0 +1,6 @@
|
||||
__
|
||||
____ _____ _/ /___ _______
|
||||
/ __ `/ __ `/ __/ / / / ___/
|
||||
/ /_/ / /_/ / /_/ /_/ (__ )
|
||||
\__, /\__,_/\__/\__,_/____/
|
||||
/____/
|
||||
@@ -1,6 +1,6 @@
|
||||
__
|
||||
/ /_ ____ ____ ___ ____ ___________
|
||||
/ __ \/ __ \/ __ `__ \/ __ `/ ___/ ___/
|
||||
/ / / / /_/ / / / / / / /_/ / / / /
|
||||
__ __
|
||||
/ / / /___ ____ ___ ____ ___________
|
||||
/ /_/ / __ \/ __ `__ \/ __ `/ ___/ ___/
|
||||
/ __ / /_/ / / / / / / /_/ / / / /
|
||||
/_/ /_/\____/_/ /_/ /_/\__,_/_/ /_/
|
||||
|
||||
|
||||
6
ct/headers/homeassistant-core
Normal file
6
ct/headers/homeassistant-core
Normal file
@@ -0,0 +1,6 @@
|
||||
__ __ ___ _ __ __ ______
|
||||
/ / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___ ________
|
||||
/ /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/_____/ / / __ \/ ___/ _ \
|
||||
/ __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_/_____/ /___/ /_/ / / / __/
|
||||
/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____/\____/_/ \___/
|
||||
|
||||
6
ct/headers/matterbridge
Normal file
6
ct/headers/matterbridge
Normal file
@@ -0,0 +1,6 @@
|
||||
__ ___ __ __ __ _ __
|
||||
/ |/ /___ _/ /_/ /____ _____/ /_ _____(_)___/ /___ ____
|
||||
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ \/ ___/ / __ / __ `/ _ \
|
||||
/ / / / /_/ / /_/ /_/ __/ / / /_/ / / / / /_/ / /_/ / __/
|
||||
/_/ /_/\__,_/\__/\__/\___/_/ /_.___/_/ /_/\__,_/\__, /\___/
|
||||
/____/
|
||||
6
ct/headers/mattermost
Normal file
6
ct/headers/mattermost
Normal file
@@ -0,0 +1,6 @@
|
||||
__ ___ __ __ __
|
||||
/ |/ /___ _/ /_/ /____ _________ ___ ____ _____/ /_
|
||||
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ `__ \/ __ \/ ___/ __/
|
||||
/ / / / /_/ / /_/ /_/ __/ / / / / / / / /_/ (__ ) /_
|
||||
/_/ /_/\__,_/\__/\__/\___/_/ /_/ /_/ /_/\____/____/\__/
|
||||
|
||||
6
ct/headers/openproject
Normal file
6
ct/headers/openproject
Normal file
@@ -0,0 +1,6 @@
|
||||
____ ____ _ __
|
||||
/ __ \____ ___ ____ / __ \_________ (_)__ _____/ /_
|
||||
/ / / / __ \/ _ \/ __ \/ /_/ / ___/ __ \ / / _ \/ ___/ __/
|
||||
/ /_/ / /_/ / __/ / / / ____/ / / /_/ / / / __/ /__/ /_
|
||||
\____/ .___/\___/_/ /_/_/ /_/ \____/_/ /\___/\___/\__/
|
||||
/_/ /___/
|
||||
6
ct/headers/paperless-ngx
Normal file
6
ct/headers/paperless-ngx
Normal file
@@ -0,0 +1,6 @@
|
||||
____ __
|
||||
/ __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __
|
||||
/ /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/_____/ __ \/ __ `/ |/_/
|
||||
/ ____/ /_/ / /_/ / __/ / / / __(__ |__ )_____/ / / / /_/ /> <
|
||||
/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_|
|
||||
/_/ /____/
|
||||
@@ -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
|
||||
# Source: https://homarr.dev/
|
||||
|
||||
APP="homarr"
|
||||
APP="Homarr"
|
||||
var_tags="${var_tags:-arr;dashboard}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
@@ -124,7 +124,7 @@ EOF
|
||||
fetch_and_deploy_gh_release "homarr-labs/homarr"
|
||||
mv /opt/homarr-data-backup/.env /opt/homarr/.env
|
||||
cd /opt/homarr
|
||||
$STD pnpm install --config.allowBuildScripts=true
|
||||
$STD pnpm install
|
||||
$STD pnpm build
|
||||
cp /opt/homarr/apps/nextjs/next.config.ts .
|
||||
cp /opt/homarr/apps/nextjs/package.json .
|
||||
|
||||
@@ -6,15 +6,19 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/
|
||||
|
||||
## App Default Values
|
||||
APP="Koel"
|
||||
var_tags="${var_tags:-music}"
|
||||
var_tags="${var_tags:-music;player;homelab}"
|
||||
var_disk="${var_disk:-9}"
|
||||
var_cpu="${var_cpu:-3}"
|
||||
var_ram="${var_ram:-3072}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_verbose="${var_verbose:-yes}"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
72
ct/odoo.sh
Normal file
72
ct/odoo.sh
Normal 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}"
|
||||
37
ct/rclone.sh
37
ct/rclone.sh
@@ -1,9 +1,9 @@
|
||||
#!/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)
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/rclone/rclone
|
||||
# Source: https://rclone.org/
|
||||
|
||||
APP="Rclone"
|
||||
var_tags="${var_tags:-os}"
|
||||
@@ -23,35 +23,14 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/rclone ]]; then
|
||||
if [[ ! -d /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/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 rclone-web
|
||||
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
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -61,5 +40,3 @@ description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
|
||||
36
frontend/public/json/asterisk.json
Normal file
36
frontend/public/json/asterisk.json
Normal 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": []
|
||||
}
|
||||
41
frontend/public/json/authentik.json
Normal file
41
frontend/public/json/authentik.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -8,22 +8,22 @@
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3333,
|
||||
"interface_port": 8080,
|
||||
"documentation": "https://bitmagnet.io/setup.html",
|
||||
"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`",
|
||||
"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": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/bitmagnet.sh",
|
||||
"script": "ct/alpine-bitmagnet.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"ram": 256,
|
||||
"hdd": 3,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -42,10 +42,5 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"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"
|
||||
}
|
||||
]
|
||||
"notes": []
|
||||
}
|
||||
|
||||
46
frontend/public/json/gatus.json
Normal file
46
frontend/public/json/gatus.json
Normal 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": []
|
||||
}
|
||||
40
frontend/public/json/odoo.json
Normal file
40
frontend/public/json/odoo.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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",
|
||||
"version": "v11.9.6",
|
||||
"date": "2025-05-13T12:16:17Z"
|
||||
},
|
||||
{
|
||||
"name": "element-hq/synapse",
|
||||
"version": "v1.129.0",
|
||||
"date": "2025-05-06T12:28:54Z"
|
||||
},
|
||||
{
|
||||
"name": "zabbix/zabbix",
|
||||
"version": "7.2.7rc1",
|
||||
@@ -114,16 +14,51 @@
|
||||
"version": "6.3.0-alpha.4",
|
||||
"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",
|
||||
"version": "v2.65.9",
|
||||
"date": "2025-05-13T05:14:39Z"
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.6.9-rc0",
|
||||
"date": "2025-05-10T18:57:30Z"
|
||||
},
|
||||
{
|
||||
"name": "go-gitea/gitea",
|
||||
"version": "v1.23.8",
|
||||
"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",
|
||||
"version": "v2025-05-11",
|
||||
@@ -184,6 +119,11 @@
|
||||
"version": "v10.7.2",
|
||||
"date": "2025-05-12T10:42:32Z"
|
||||
},
|
||||
{
|
||||
"name": "nzbgetcom/nzbget",
|
||||
"version": "v25.0",
|
||||
"date": "2025-05-12T09:12:04Z"
|
||||
},
|
||||
{
|
||||
"name": "dgtlmoon/changedetection.io",
|
||||
"version": "0.49.17",
|
||||
@@ -199,6 +139,16 @@
|
||||
"version": "v2.18.1",
|
||||
"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",
|
||||
"version": "v0.84.0",
|
||||
@@ -224,6 +174,11 @@
|
||||
"version": "v5.22.4.9896",
|
||||
"date": "2025-04-23T18:51:12Z"
|
||||
},
|
||||
{
|
||||
"name": "pocketbase/pocketbase",
|
||||
"version": "v0.28.0",
|
||||
"date": "2025-05-11T06:25:22Z"
|
||||
},
|
||||
{
|
||||
"name": "owncast/owncast",
|
||||
"version": "v0.2.3",
|
||||
@@ -349,6 +304,11 @@
|
||||
"version": "v2.36.0",
|
||||
"date": "2025-05-07T11:54:14Z"
|
||||
},
|
||||
{
|
||||
"name": "Checkmk/checkmk",
|
||||
"version": "v2.2.0p42-rc1",
|
||||
"date": "2025-05-07T11:50:30Z"
|
||||
},
|
||||
{
|
||||
"name": "openobserve/openobserve",
|
||||
"version": "v0.14.7",
|
||||
@@ -374,6 +334,11 @@
|
||||
"version": "v1.12.1rc0",
|
||||
"date": "2025-05-06T20:56:30Z"
|
||||
},
|
||||
{
|
||||
"name": "redis/redis",
|
||||
"version": "8.0.1-int",
|
||||
"date": "2025-05-06T18:40:34Z"
|
||||
},
|
||||
{
|
||||
"name": "Athou/commafeed",
|
||||
"version": "5.8.0",
|
||||
@@ -384,6 +349,11 @@
|
||||
"version": "v0.19.0",
|
||||
"date": "2025-05-06T18:05:42Z"
|
||||
},
|
||||
{
|
||||
"name": "jenkinsci/jenkins",
|
||||
"version": "jenkins-2.509",
|
||||
"date": "2025-05-06T15:37:10Z"
|
||||
},
|
||||
{
|
||||
"name": "MariaDB/server",
|
||||
"version": "mariadb-11.4.6",
|
||||
@@ -490,8 +460,38 @@
|
||||
"date": "2025-05-03T20:23:27Z"
|
||||
},
|
||||
{
|
||||
"name": "prometheus-pve/prometheus-pve-exporter",
|
||||
"version": "v3.5.4",
|
||||
"date": "2025-05-02T13:42:06Z"
|
||||
"name": "actualbudget/actual",
|
||||
"version": "v25.5.0",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,42 +4,40 @@ import type { Category, Script } from "@/lib/types";
|
||||
import ScriptAccordion from "./ScriptAccordion";
|
||||
|
||||
const Sidebar = ({
|
||||
items,
|
||||
selectedScript,
|
||||
setSelectedScript,
|
||||
items,
|
||||
selectedScript,
|
||||
setSelectedScript,
|
||||
}: {
|
||||
items: Category[];
|
||||
selectedScript: string | null;
|
||||
setSelectedScript: (script: string | null) => void;
|
||||
items: Category[];
|
||||
selectedScript: string | null;
|
||||
setSelectedScript: (script: string | null) => void;
|
||||
}) => {
|
||||
const filteredItems = items.filter(category => category.scripts && category.scripts.length > 0);
|
||||
const uniqueScripts = items.reduce((acc, category) => {
|
||||
for (const script of category.scripts) {
|
||||
if (!acc.some((s) => s.name === script.name)) {
|
||||
acc.push(script);
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}, [] as Script[]);
|
||||
|
||||
const uniqueScripts = filteredItems.reduce((acc, category) => {
|
||||
for (const script of category.scripts) {
|
||||
if (!acc.some((s) => s.name === script.name)) {
|
||||
acc.push(script);
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}, [] as Script[]);
|
||||
|
||||
return (
|
||||
<div className="flex min-w-72 flex-col sm:max-w-72">
|
||||
<div className="flex items-end justify-between pb-4">
|
||||
<h1 className="text-xl font-bold">Categories</h1>
|
||||
<p className="text-xs italic text-muted-foreground">
|
||||
{uniqueScripts.length} Total scripts
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-lg">
|
||||
<ScriptAccordion
|
||||
items={filteredItems}
|
||||
selectedScript={selectedScript}
|
||||
setSelectedScript={setSelectedScript}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div className="flex min-w-72 flex-col sm:max-w-72">
|
||||
<div className="flex items-end justify-between pb-4">
|
||||
<h1 className="text-xl font-bold">Categories</h1>
|
||||
<p className="text-xs italic text-muted-foreground">
|
||||
{uniqueScripts.length} Total scripts
|
||||
</p>
|
||||
</div>
|
||||
<div className="rounded-lg">
|
||||
<ScriptAccordion
|
||||
items={items}
|
||||
selectedScript={selectedScript}
|
||||
setSelectedScript={setSelectedScript}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sidebar;
|
||||
export default Sidebar;
|
||||
@@ -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"
|
||||
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"
|
||||
$STD go build
|
||||
chmod +x bitmagnet
|
||||
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
|
||||
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
||||
msg_ok "Installed bitmagnet v${RELEASE}"
|
||||
|
||||
read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
|
||||
|
||||
msg_info "Enabling bitmagnet Service"
|
||||
cat <<EOF >/etc/init.d/bitmagnet
|
||||
#!/sbin/openrc-run
|
||||
@@ -63,10 +60,6 @@ pidfile="/var/run/bitmagnet.pid"
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
export TMDB_API_KEY="$tmdbapikey"
|
||||
}
|
||||
EOF
|
||||
chmod +x /etc/init.d/bitmagnet
|
||||
$STD rc-update add bitmagnet default
|
||||
|
||||
53
install/asterisk-install.sh
Normal file
53
install/asterisk-install.sh
Normal 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"
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
@@ -24,7 +24,7 @@ update_os
|
||||
#NODE_VERSION="22" NODE_MODULE="yarn" install_node_and_modules
|
||||
|
||||
#PG_VERSION="15"
|
||||
#MARIADB_VERSION="11.8"
|
||||
MARIADB_VERSION="10.11"
|
||||
#MYSQL_VERSION="8.0"
|
||||
|
||||
#install_postgresql
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://www.freepbx.org/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
@@ -13,15 +13,162 @@ setting_up_container
|
||||
network_check
|
||||
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"
|
||||
cd /tmp
|
||||
wget https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh -O /tmp/sng_freepbx_debian_install.sh
|
||||
bash /tmp/sng_freepbx_debian_install.sh
|
||||
cd /usr/local/src
|
||||
curl -fsSL http://mirror.freepbx.org/modules/packages/freepbx/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
|
||||
|
||||
# Cleanup
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
|
||||
@@ -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"
|
||||
@@ -5,7 +5,7 @@
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
@@ -13,17 +13,18 @@ setting_up_container
|
||||
network_check
|
||||
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)"
|
||||
$STD apt-get install -y \
|
||||
postgresql \
|
||||
nginx \
|
||||
apt-transport-https \
|
||||
gnupg2 \
|
||||
lsb-release \
|
||||
ffmpeg \
|
||||
curl \
|
||||
unzip \
|
||||
sudo \
|
||||
mc \
|
||||
cron \
|
||||
libapache2-mod-xsendfile \
|
||||
libzip-dev \
|
||||
@@ -31,62 +32,78 @@ $STD apt-get install -y \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpq-dev \
|
||||
libwebp-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
libwebp-dev \
|
||||
libapache2-mod-php \
|
||||
composer
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
# 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 "Setting up PostgreSQL Database"
|
||||
msg_info "Setting up PSql Database"
|
||||
DB_NAME=koel_db
|
||||
DB_USER=koel
|
||||
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 DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||
{
|
||||
echo "Koel-Credentials"
|
||||
echo "Koel Database User: $DB_USER"
|
||||
echo "Koel Database Password: $DB_PASS"
|
||||
echo "Koel Database Name: $DB_NAME"
|
||||
} >>~/koel.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
echo "Koel-Credentials"
|
||||
echo "Koel Database User: $DB_USER"
|
||||
echo "Koel Database Password: $DB_PASS"
|
||||
echo "Koel Database Name: $DB_NAME"
|
||||
} >> ~/koel.creds
|
||||
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)"
|
||||
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | 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
|
||||
RELEASE=$(wget -q https://github.com/koel/koel/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||
cd /opt
|
||||
unzip koel.zip
|
||||
cd /opt/koel
|
||||
mv .env.example .env
|
||||
$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
|
||||
mkdir -p /opt/koel_{media,sync}
|
||||
wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
||||
unzip -q koel-${RELEASE}.zip
|
||||
chown -R :www-data /opt/*
|
||||
chmod -R g+r /opt/*
|
||||
chmod -R g+rw /opt/*
|
||||
chown -R www-data:www-data /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_info "Set up web services"
|
||||
cat <<EOF >/etc/nginx/sites-available/koel
|
||||
server {
|
||||
listen *:80;
|
||||
listen 6767;
|
||||
server_name koel.local;
|
||||
root /opt/koel/public;
|
||||
index index.php;
|
||||
@@ -103,24 +120,18 @@ server {
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
internal;
|
||||
alias /opt/koel_media;
|
||||
autoindex on;
|
||||
access_log /var/log/nginx/koel.access.log;
|
||||
error_log /var/log/nginx/koel.error.log;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files \$uri \$uri/ /index.php?\$args;
|
||||
|
||||
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;
|
||||
|
||||
try_files \$uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO \$fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
@@ -141,7 +152,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/koel.zip
|
||||
rm -rf /opt/koel-${RELEASE}.zip
|
||||
$STD apt-get autoremove
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
@@ -21,23 +21,32 @@ $STD apt-get install -y \
|
||||
fping \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
mariadb-client \
|
||||
mariadb-server \
|
||||
mtr-tiny \
|
||||
nginx \
|
||||
nmap \
|
||||
rrdtool \
|
||||
snmp \
|
||||
snmpd
|
||||
snmpd \
|
||||
git \
|
||||
whois
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
install_php
|
||||
install_mariadb
|
||||
install_composer
|
||||
msg_info "Installing PHP"
|
||||
$STD apt-get install -y \
|
||||
php8.2-{cli,fpm,gd,gmp,mbstring,mysql,snmp,xml,zip,curl}
|
||||
msg_ok "Installed PHP"
|
||||
|
||||
msg_info "Installing Python"
|
||||
$STD apt-get install -y \
|
||||
python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
|
||||
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"
|
||||
DB_NAME=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_info "Setup Librenms"
|
||||
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
|
||||
fetch_and_deploy_gh_release "librenms/librenms"
|
||||
tmp_file=$(mktemp)
|
||||
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 -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
|
||||
|
||||
|
||||
pip3 install --no-user -r /opt/librenms/requirements.txt
|
||||
$STD pip3 install -r /opt/librenms/requirements.txt
|
||||
|
||||
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_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
|
||||
chmod 771 /opt/librenms
|
||||
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
|
||||
msg_ok "Setup LibreNMS"
|
||||
msg_ok "Setup Composer"
|
||||
|
||||
|
||||
msg_info "Configure MariaDB"
|
||||
sed -i "/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0" /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
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
|
||||
systemctl enable -q --now mariadb
|
||||
msg_ok "Configured MariaDB"
|
||||
msg_ok "Setup MariaDB"
|
||||
|
||||
msg_info "Configure PHP-FPM"
|
||||
cp /etc/php/8.2/fpm/pool.d/www.conf /etc/php/8.2/fpm/pool.d/librenms.conf
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
@@ -17,7 +17,8 @@ $STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
gnupg2 postgresql \
|
||||
gnupg2\
|
||||
postgresql \
|
||||
lsb-release \
|
||||
rbenv \
|
||||
libpq-dev \
|
||||
@@ -37,43 +38,50 @@ DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||
{
|
||||
echo "Manyfold Credentials"
|
||||
echo "Manyfold Database User: $DB_USER"
|
||||
echo "Manyfold Database Password: $DB_PASS"
|
||||
echo "Manyfold Database Name: $DB_NAME"
|
||||
} >>~/manyfold.creds
|
||||
echo "Manyfold Credentials"
|
||||
echo "Manyfold Database User: $DB_USER"
|
||||
echo "Manyfold Database Password: $DB_PASS"
|
||||
echo "Manyfold Database Name: $DB_NAME"
|
||||
} >> ~/manyfold.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
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
|
||||
curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip
|
||||
unzip -q manyfold.zip
|
||||
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/')
|
||||
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Downloaded Manyfold"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="npm@latest,${YARN_VERSION}" install_node_and_modules
|
||||
RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" setup_rbenv_stack
|
||||
msg_info "Setting up Node.js/Yarn"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g npm@latest
|
||||
$STD npm install -g yarn
|
||||
msg_ok "Installed Node.js/Yarn"
|
||||
|
||||
# msg_info "Add ruby-build"
|
||||
# mkdir -p ~/.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) }')
|
||||
# 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
|
||||
# mv ruby-build-* ~/.rbenv/plugins/ruby-build
|
||||
# echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt
|
||||
# msg_ok "Added ruby-build"
|
||||
msg_info "Add ruby-build"
|
||||
mkdir -p ~/.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) }')
|
||||
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
|
||||
mv ruby-build-* ~/.rbenv/plugins/ruby-build
|
||||
echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt
|
||||
msg_ok "Added ruby-build"
|
||||
|
||||
# msg_info "Installing ruby ${RUBY_VERSION}"
|
||||
# $STD rbenv install $RUBY_VERSION
|
||||
# echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >>~/.bashrc
|
||||
# echo 'eval "$(rbenv init -)"' >>~/.bashrc
|
||||
# source ~/.bashrc
|
||||
# msg_ok "Installed ruby ${RUBY_VERSION}"
|
||||
msg_info "Installing ruby ${RUBY_VERSION}"
|
||||
$STD rbenv install $RUBY_VERSION
|
||||
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
||||
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
msg_ok "Installed ruby ${RUBY_VERSION}"
|
||||
|
||||
msg_info "Adding manyfold user"
|
||||
useradd -m -s /usr/bin/bash manyfold
|
||||
@@ -104,7 +112,7 @@ source /opt/.env
|
||||
cd /opt/manyfold
|
||||
chown -R manyfold:manyfold /opt/manyfold
|
||||
$STD gem install bundler
|
||||
$STD rbenv global $RUBY_INSTALL_VERSION
|
||||
$STD rbenv global $RUBY_VERSION
|
||||
$STD bundle install
|
||||
$STD gem install sidekiq
|
||||
$STD npm install --global corepack
|
||||
@@ -116,7 +124,6 @@ rm /opt/manyfold/config/credentials.yml.enc
|
||||
$STD bin/rails credentials:edit
|
||||
$STD bin/rails db:migrate
|
||||
$STD bin/rails assets:precompile
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed manyfold"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
74
install/odoo-install.sh
Normal file
74
install/odoo-install.sh
Normal 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"
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/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/rclone/rclone
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@@ -14,29 +14,14 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
apache2-utils \
|
||||
unzip
|
||||
$STD apt-get install -y gnupg2
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing rclone"
|
||||
temp_file=$(mktemp)
|
||||
mkdir -p /opt/rclone
|
||||
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
|
||||
$STD fetch_and_deploy_gh_release rclone/rclone
|
||||
dpkg -i rclone-v1.69.1-linux-amd64.deb
|
||||
msg_ok "Installed rclone"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/rclone-web.service
|
||||
[Unit]
|
||||
Description=Rclone Web GUI
|
||||
@@ -45,21 +30,19 @@ After=network-online.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/rclone
|
||||
ExecStart=/opt/rclone/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/login.pwd
|
||||
ExecStart=/usr/bin/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable -q --now rclone-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"
|
||||
|
||||
@@ -490,8 +490,7 @@ advanced_settings() {
|
||||
while read -r pair; do
|
||||
start=$(echo "${pair}" | cut -d':' -f1)
|
||||
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)|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}')
|
||||
BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
|
||||
fi
|
||||
@@ -906,7 +905,7 @@ config_file() {
|
||||
while read -r pair; do
|
||||
start=$(echo "${pair}" | cut -d':' -f1)
|
||||
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}')
|
||||
BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
|
||||
fi
|
||||
|
||||
161
misc/core.func
161
misc/core.func
@@ -47,7 +47,6 @@ formatting() {
|
||||
BOLD=$(echo "\033[1m")
|
||||
HOLD=" "
|
||||
TAB=" "
|
||||
TAB3=" "
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -216,155 +215,127 @@ __curl_err_handler() {
|
||||
}
|
||||
|
||||
### dev spinner ###
|
||||
declare -A MSG_INFO_SHOWN=()
|
||||
SPINNER_PID=""
|
||||
SPINNER_ACTIVE=0
|
||||
SPINNER_PID=""
|
||||
SPINNER_MSG=""
|
||||
declare -A MSG_INFO_SHOWN=()
|
||||
|
||||
# Trap cleanup on various signals
|
||||
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() {
|
||||
local msg="$1"
|
||||
local msg="${1:-Processing...}"
|
||||
local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏)
|
||||
local spin_i=0
|
||||
local interval=0.1
|
||||
|
||||
stop_spinner
|
||||
# Set message and clear current line
|
||||
SPINNER_MSG="$msg"
|
||||
printf "\r\e[2K" >&2
|
||||
|
||||
# Stop any existing spinner
|
||||
stop_spinner
|
||||
|
||||
# Set active flag
|
||||
SPINNER_ACTIVE=1
|
||||
|
||||
# Start spinner in background
|
||||
{
|
||||
while [ "$SPINNER_ACTIVE" -eq 1 ]; do
|
||||
if [ -t 2 ]; then
|
||||
printf "\r\e[2K%s %b" "${TAB}${spinner_frames[spin_i]}${TAB}" "${YW}${SPINNER_MSG}${CL}" >&2
|
||||
else
|
||||
printf "%s...\n" "$SPINNER_MSG" >&2
|
||||
break
|
||||
fi
|
||||
spin_i=$(((spin_i + 1) % ${#spinner_frames[@]}))
|
||||
while [[ "$SPINNER_ACTIVE" -eq 1 ]]; do
|
||||
printf "\r\e[2K%s %b" "${TAB}${frames[spin_i]}${TAB}" "${YW}${SPINNER_MSG}${CL}" >&2
|
||||
spin_i=$(((spin_i + 1) % ${#frames[@]}))
|
||||
sleep "$interval"
|
||||
done
|
||||
} &
|
||||
|
||||
local pid=$!
|
||||
if kill -0 "$pid" 2>/dev/null; then
|
||||
SPINNER_PID="$pid"
|
||||
disown "$SPINNER_PID" 2>/dev/null || true
|
||||
else
|
||||
SPINNER_ACTIVE=0
|
||||
SPINNER_PID=""
|
||||
fi
|
||||
SPINNER_PID=$!
|
||||
|
||||
# Disown to prevent getting "Terminated" messages
|
||||
disown "$SPINNER_PID" 2>/dev/null || true
|
||||
}
|
||||
|
||||
# === Spinner Stop (No wait!) ===
|
||||
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
|
||||
|
||||
if kill -0 "$SPINNER_PID" 2>/dev/null; then
|
||||
kill "$SPINNER_PID" 2>/dev/null || true
|
||||
for _ in $(seq 1 10); do
|
||||
kill -0 "$SPINNER_PID" 2>/dev/null || break
|
||||
sleep 0.05
|
||||
done
|
||||
kill "$SPINNER_PID" 2>/dev/null
|
||||
# Give it a moment to terminate
|
||||
sleep 0.1
|
||||
# Force kill if still running
|
||||
if kill -0 "$SPINNER_PID" 2>/dev/null; then
|
||||
kill -9 "$SPINNER_PID" 2>/dev/null
|
||||
fi
|
||||
# Wait for process but ignore errors
|
||||
wait "$SPINNER_PID" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Clear spinner line
|
||||
printf "\r\e[2K" >&2
|
||||
SPINNER_PID=""
|
||||
fi
|
||||
}
|
||||
|
||||
# === Cleanup Spinner on signals ===
|
||||
cleanup_spinner() {
|
||||
stop_spinner
|
||||
spinner_guard() {
|
||||
# Safely stop spinner if it's running
|
||||
if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "${SPINNER_PID}" ]]; then
|
||||
stop_spinner
|
||||
fi
|
||||
}
|
||||
|
||||
# === msg_info ===
|
||||
msg_info() {
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
if [ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]; then return; fi
|
||||
local msg="${1:-Information message}"
|
||||
|
||||
# Only show each message once unless reset
|
||||
if [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]]; then
|
||||
return
|
||||
fi
|
||||
MSG_INFO_SHOWN["$msg"]=1
|
||||
stop_spinner
|
||||
|
||||
spinner_guard
|
||||
start_spinner "$msg"
|
||||
}
|
||||
|
||||
# === msg_ok ===
|
||||
msg_ok() {
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
if [ "$SPINNER_ACTIVE" -eq 1 ]; then
|
||||
stop_spinner
|
||||
else
|
||||
printf "\r\e[2K" >&2
|
||||
fi
|
||||
printf "\r\e[2K%s %b\n" "$CM" "${GN}${msg}${CL}" >&2
|
||||
local msg="${1:-Operation completed successfully}"
|
||||
stop_spinner
|
||||
printf "\r\e[2K%s %b\n" "${CM}" "${GN}${msg}${CL}" >&2
|
||||
|
||||
# Remove from shown messages to allow it to be shown again
|
||||
unset MSG_INFO_SHOWN["$msg"]
|
||||
}
|
||||
|
||||
# === msg_error ===
|
||||
msg_error() {
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
local msg="${1:-An error occurred}"
|
||||
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() {
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
local msg="${1:-Warning}"
|
||||
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"]
|
||||
}
|
||||
|
||||
# === msg_custom ===
|
||||
# Helper function to display a message with custom symbol and color
|
||||
msg_custom() {
|
||||
local symbol="$1"
|
||||
local color="$2"
|
||||
local msg="$3"
|
||||
[ -z "$msg" ] && return
|
||||
local symbol="${1:-*}"
|
||||
local color="${2:-$CL}"
|
||||
local msg="${3:-Custom message}"
|
||||
stop_spinner
|
||||
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.
|
||||
# # ------------------------------------------------------------------------------
|
||||
|
||||
@@ -86,7 +86,7 @@ setting_up_container() {
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
systemctl disable -q --now systemd-networkd-wait-online.service
|
||||
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
|
||||
|
||||
131
misc/tools.func
131
misc/tools.func
@@ -112,10 +112,10 @@ install_postgresql() {
|
||||
msg_ok "PostgreSQL $PG_VERSION is already installed"
|
||||
return
|
||||
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
|
||||
else
|
||||
msg_info "Setup PostgreSQL $PG_VERSION"
|
||||
echo -e "PostgreSQL not installed, proceeding with fresh install of $PG_VERSION"
|
||||
NEED_PG_INSTALL=true
|
||||
fi
|
||||
|
||||
@@ -123,11 +123,11 @@ install_postgresql() {
|
||||
if [[ -n "$CURRENT_PG_VERSION" ]]; then
|
||||
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"
|
||||
|
||||
msg_info "Stopping PostgreSQL service"
|
||||
systemctl stop postgresql
|
||||
fi
|
||||
|
||||
msg_info "Stopping PostgreSQL service"
|
||||
systemctl stop postgresql || true
|
||||
|
||||
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
|
||||
|
||||
@@ -149,7 +149,7 @@ install_postgresql() {
|
||||
fi
|
||||
|
||||
$STD msg_info "Starting PostgreSQL $PG_VERSION"
|
||||
systemctl enable -q --now postgresql
|
||||
systemctl enable --now postgresql
|
||||
|
||||
if [[ -n "$CURRENT_PG_VERSION" ]]; then
|
||||
$STD msg_info "Restoring dumped data"
|
||||
@@ -167,18 +167,13 @@ install_mariadb() {
|
||||
|
||||
# grab dynamic latest LTS version
|
||||
if [[ "$MARIADB_VERSION" == "latest" ]]; then
|
||||
$STD msg_info "Resolving latest GA MariaDB version"
|
||||
MARIADB_VERSION=$(curl -fsSL http://mirror.mariadb.org/repo/ |
|
||||
grep -Eo '[0-9]+\.[0-9]+\.[0-9]+/' |
|
||||
grep -vE 'rc/|rolling/' |
|
||||
sed 's|/||' |
|
||||
sort -Vr |
|
||||
head -n1)
|
||||
msg_info "Resolving latest MariaDB version"
|
||||
MARIADB_VERSION=$(curl -fsSL https://mariadb.org | grep -oP 'MariaDB \K10\.[0-9]+' | head -n1)
|
||||
if [[ -z "$MARIADB_VERSION" ]]; then
|
||||
msg_error "Could not determine latest GA MariaDB version"
|
||||
msg_error "Could not determine latest MariaDB version"
|
||||
return 1
|
||||
fi
|
||||
$STD msg_ok "Latest GA MariaDB version is $MARIADB_VERSION"
|
||||
msg_ok "Latest MariaDB version is $MARIADB_VERSION"
|
||||
fi
|
||||
|
||||
local CURRENT_VERSION=""
|
||||
@@ -187,23 +182,23 @@ install_mariadb() {
|
||||
fi
|
||||
|
||||
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 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
|
||||
fi
|
||||
|
||||
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 apt-get purge -y 'mariadb*' || true
|
||||
rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg
|
||||
else
|
||||
msg_info "Setup MariaDB $MARIADB_VERSION"
|
||||
msg_info "Installing MariaDB $MARIADB_VERSION"
|
||||
fi
|
||||
|
||||
$STD msg_info "Setting up MariaDB Repository"
|
||||
msg_info "Setting up MariaDB Repository"
|
||||
curl -fsSL "https://mariadb.org/mariadb_release_signing_key.asc" |
|
||||
gpg --dearmor -o /etc/apt/trusted.gpg.d/mariadb.gpg
|
||||
|
||||
@@ -213,7 +208,7 @@ install_mariadb() {
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mariadb-server mariadb-client
|
||||
|
||||
msg_ok "Setup MariaDB $MARIADB_VERSION"
|
||||
msg_ok "Installed MariaDB $MARIADB_VERSION"
|
||||
}
|
||||
|
||||
install_mysql() {
|
||||
@@ -258,9 +253,6 @@ install_php() {
|
||||
local PHP_MODULE="${PHP_MODULE:-}"
|
||||
local PHP_APACHE="${PHP_APACHE:-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 COMBINED_MODULES
|
||||
|
||||
@@ -287,11 +279,11 @@ install_php() {
|
||||
fi
|
||||
|
||||
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
|
||||
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${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
|
||||
$STD apt-get update
|
||||
fi
|
||||
@@ -337,12 +329,12 @@ install_php() {
|
||||
|
||||
for ini in "${PHP_INI_PATHS[@]}"; do
|
||||
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|^upload_max_filesize = .*|upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}|" "$ini"
|
||||
sed -i "s|^post_max_size = .*|post_max_size = ${PHP_POST_MAX_SIZE}|" "$ini"
|
||||
sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini"
|
||||
$STD msg_ok "Patched $ini"
|
||||
msg_ok "Patched $ini"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -355,14 +347,14 @@ install_composer() {
|
||||
if [[ -x "$COMPOSER_BIN" ]]; then
|
||||
local CURRENT_VERSION
|
||||
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
|
||||
msg_info "Setup Composer"
|
||||
msg_info "Composer not found, installing latest version"
|
||||
fi
|
||||
|
||||
# Download and install latest composer
|
||||
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
|
||||
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer &>/dev/null
|
||||
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
msg_error "Failed to install Composer"
|
||||
@@ -921,80 +913,3 @@ function setup_gs() {
|
||||
msg_error "Ghostscript installation failed"
|
||||
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)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user