mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-28 11:15:53 +00:00
Compare commits
153 Commits
github-act
...
update_ver
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0498a331e | ||
|
|
1e39073985 | ||
|
|
80ff5a19a6 | ||
|
|
1b5d455d8a | ||
|
|
9c0304206f | ||
|
|
b610d01325 | ||
|
|
800269916d | ||
|
|
88d1339a68 | ||
|
|
a6f4a69cfd | ||
|
|
53b06aa746 | ||
|
|
e33c543859 | ||
|
|
19da53f77d | ||
|
|
860f4f3871 | ||
|
|
cf046389d1 | ||
|
|
7de3f5768f | ||
|
|
6eb1cd8488 | ||
|
|
dae20358d3 | ||
|
|
46bd6a5599 | ||
|
|
7239210ead | ||
|
|
bb44863767 | ||
|
|
6921f19bee | ||
|
|
7f96fef66f | ||
|
|
14ad92198b | ||
|
|
6172db2ec5 | ||
|
|
4b9b14ae1a | ||
|
|
f49b5a661f | ||
|
|
8dc69f80f2 | ||
|
|
ec2c1b946e | ||
|
|
02cf584995 | ||
|
|
7bf6257b02 | ||
|
|
3f24a3fcc0 | ||
|
|
02b83804e1 | ||
|
|
ad0166a8b3 | ||
|
|
c54095425e | ||
|
|
e2ee08d3ae | ||
|
|
71128e6082 | ||
|
|
b692e65cf6 | ||
|
|
a8ef0300e2 | ||
|
|
35ddde0256 | ||
|
|
ca35a45ecd | ||
|
|
ada434223e | ||
|
|
269d9f0528 | ||
|
|
9e2ec4af31 | ||
|
|
620ad1b84f | ||
|
|
5493caaed5 | ||
|
|
5ebd8dc7ab | ||
|
|
f8e02e1ed5 | ||
|
|
a964925a15 | ||
|
|
6a2ff4feef | ||
|
|
56800199f7 | ||
|
|
17776f3355 | ||
|
|
1b8c74a3b3 | ||
|
|
30f0deed4c | ||
|
|
c4dc609202 | ||
|
|
9265e10243 | ||
|
|
7242fc2880 | ||
|
|
b82284d041 | ||
|
|
474d97322d | ||
|
|
0ded7bf751 | ||
|
|
584442e3c7 | ||
|
|
f5292249c3 | ||
|
|
a28751f37a | ||
|
|
e384cdcb3c | ||
|
|
04a07db27c | ||
|
|
2655068e7e | ||
|
|
0e298adc05 | ||
|
|
7cd0eb9fca | ||
|
|
a59f8bef8f | ||
|
|
f9f50e945c | ||
|
|
de814ffd50 | ||
|
|
fcbc27ecd8 | ||
|
|
48d1e7ecf6 | ||
|
|
d5388a85c3 | ||
|
|
be8986d070 | ||
|
|
9584f5e0f8 | ||
|
|
25947ba60b | ||
|
|
f88097e9d7 | ||
|
|
6b1165d7da | ||
|
|
a7408a994b | ||
|
|
8ec5dac90c | ||
|
|
f3ceea5c68 | ||
|
|
1d17fbb429 | ||
|
|
fc625d0d07 | ||
|
|
b9d6559d35 | ||
|
|
4774d76495 | ||
|
|
0a7bed66ea | ||
|
|
05e4ed3fc5 | ||
|
|
44b1bc01af | ||
|
|
c7f0208da8 | ||
|
|
656de28402 | ||
|
|
50f52fe5c7 | ||
|
|
4a56789328 | ||
|
|
230e0100fe | ||
|
|
82361db112 | ||
|
|
adef06845d | ||
|
|
10ff89a117 | ||
|
|
47b83d93cd | ||
|
|
e12157c66d | ||
|
|
1aa20369e9 | ||
|
|
3f20620006 | ||
|
|
1285c4b3bd | ||
|
|
cddb483499 | ||
|
|
f12dec0c75 | ||
|
|
6161aed815 | ||
|
|
5d5b18d11f | ||
|
|
1746c163a5 | ||
|
|
67832266fc | ||
|
|
dbb887e093 | ||
|
|
7e31d6a799 | ||
|
|
a13b714208 | ||
|
|
7cebd85b50 | ||
|
|
3599c8bb8d | ||
|
|
b99494c659 | ||
|
|
0f0664d2e3 | ||
|
|
1b890c6c4a | ||
|
|
9b6fc1d095 | ||
|
|
5df685f67c | ||
|
|
0c072d8e62 | ||
|
|
5989417a8a | ||
|
|
0785ff8720 | ||
|
|
51008e23bd | ||
|
|
5bf570055d | ||
|
|
bc2bfeec1c | ||
|
|
080f42a429 | ||
|
|
3f3d967a2c | ||
|
|
ad0607361a | ||
|
|
75a9afaf56 | ||
|
|
43d33f4a69 | ||
|
|
c54dbef059 | ||
|
|
6ea741bc34 | ||
|
|
cd197e48be | ||
|
|
38d9e4caeb | ||
|
|
6836e234a1 | ||
|
|
032fa7533c | ||
|
|
706ff5b006 | ||
|
|
abfa33f935 | ||
|
|
fbf474f996 | ||
|
|
30faf65098 | ||
|
|
e82b7ba698 | ||
|
|
a337fa15d7 | ||
|
|
2ac12c5d94 | ||
|
|
606008cbe9 | ||
|
|
6ab9a16e95 | ||
|
|
80b76212d9 | ||
|
|
145d116ef8 | ||
|
|
a4c69b211c | ||
|
|
19b0c7d527 | ||
|
|
75812b4409 | ||
|
|
5fd366e9b1 | ||
|
|
c7c9daca80 | ||
|
|
60788fccbd | ||
|
|
b541ecf318 | ||
|
|
30229fe06c |
16
.github/workflows/auto-update-app-headers.yml
vendored
16
.github/workflows/auto-update-app-headers.yml
vendored
@@ -25,6 +25,13 @@ 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
|
||||
@@ -91,14 +98,17 @@ jobs:
|
||||
gh pr review $PR_NUMBER --approve
|
||||
fi
|
||||
|
||||
- name: Re-approve pull request after update
|
||||
- name: Approve pull request and merge
|
||||
if: env.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number')
|
||||
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
|
||||
|
||||
# Step 8: Output success message when no changes
|
||||
|
||||
@@ -80,7 +80,25 @@ 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 }}
|
||||
@@ -106,6 +124,7 @@ 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,6 +14,13 @@ 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
|
||||
@@ -72,6 +79,19 @@ 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,6 +29,13 @@ 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 }}
|
||||
@@ -110,10 +117,12 @@ jobs:
|
||||
- name: Approve pull request and merge
|
||||
if: env.changed == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.PAT_MICHEL }}
|
||||
GH_TOKEN: ${{ steps.generate-token-merge.outputs.token }}
|
||||
run: |
|
||||
PR_NUMBER=$(gh pr list --head "update_versions" --json number --jq '.[].number')
|
||||
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 --delete-branch --admin
|
||||
gh pr merge $PR_NUMBER --squash --admin
|
||||
fi
|
||||
|
||||
15
.github/workflows/move-to-main-repo.yaml
vendored
15
.github/workflows/move-to-main-repo.yaml
vendored
@@ -133,10 +133,6 @@ 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"
|
||||
|
||||
@@ -157,10 +153,13 @@ jobs:
|
||||
cp ../frontend/public/json/$json_file frontend/public/json/. || true
|
||||
fi
|
||||
|
||||
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 .
|
||||
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
|
||||
if git diff --cached --exit-code; then
|
||||
echo "No changes detected, skipping commit."
|
||||
exit 0
|
||||
|
||||
72
CHANGELOG.md
72
CHANGELOG.md
@@ -7,6 +7,76 @@
|
||||
|
||||
<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
|
||||
@@ -34,7 +104,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.com/community-scripts/ProxmoxVE/pull/3245))
|
||||
- Update omada download url [@bvdberg01](https://github.com/bvdberg01) ([#3245](https://github.cooxVE/pull/3245))
|
||||
- TriliumNotes: Fix release handling [@tremor021](https://github.com/tremor021) ([#3160](https://github.com/community-scripts/ProxmoxVE/pull/3160))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
@@ -63,7 +63,8 @@ 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
|
||||
$STD go build
|
||||
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/
|
||||
|
||||
@@ -1,39 +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: 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}"
|
||||
63
ct/backrest.sh
Normal file
63
ct/backrest.sh
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/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}"
|
||||
98
ct/bitmagnet.sh
Normal file
98
ct/bitmagnet.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
#!/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=""
|
||||
var_tags="pbx;voip;telephony"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-20}"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
___ __ _ __
|
||||
/ | _____/ /____ _____(_)____/ /__
|
||||
/ /| | / ___/ __/ _ \/ ___/ / ___/ //_/
|
||||
/ ___ |(__ ) /_/ __/ / / (__ ) ,<
|
||||
/_/ |_/____/\__/\___/_/ /_/____/_/|_|
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
___ __ __ __ _ __
|
||||
/ | __ __/ /_/ /_ ___ ____ / /_(_) /__
|
||||
/ /| |/ / / / __/ __ \/ _ \/ __ \/ __/ / //_/
|
||||
/ ___ / /_/ / /_/ / / / __/ / / / /_/ / ,<
|
||||
/_/ |_\__,_/\__/_/ /_/\___/_/ /_/\__/_/_/|_|
|
||||
|
||||
6
ct/headers/backrest
Normal file
6
ct/headers/backrest
Normal file
@@ -0,0 +1,6 @@
|
||||
____ __ __
|
||||
/ __ )____ ______/ /__________ _____/ /_
|
||||
/ __ / __ `/ ___/ //_/ ___/ _ \/ ___/ __/
|
||||
/ /_/ / /_/ / /__/ ,< / / / __(__ ) /_
|
||||
/_____/\__,_/\___/_/|_/_/ \___/____/\__/
|
||||
|
||||
6
ct/headers/bitmagnet
Normal file
6
ct/headers/bitmagnet
Normal file
@@ -0,0 +1,6 @@
|
||||
____ _ __ __
|
||||
/ __ )(_) /_____ ___ ____ _____ _____ ___ / /_
|
||||
/ __ / / __/ __ `__ \/ __ `/ __ `/ __ \/ _ \/ __/
|
||||
/ /_/ / / /_/ / / / / / /_/ / /_/ / / / / __/ /_
|
||||
/_____/_/\__/_/ /_/ /_/\__,_/\__, /_/ /_/\___/\__/
|
||||
/____/
|
||||
@@ -1,6 +0,0 @@
|
||||
____ __ __ __
|
||||
/ __ )____ ____ / /_______/ /_____ ______/ /__
|
||||
/ __ / __ \/ __ \/ //_/ ___/ __/ __ `/ ___/ //_/
|
||||
/ /_/ / /_/ / /_/ / ,< (__ ) /_/ /_/ / /__/ ,<
|
||||
/_____/\____/\____/_/|_/____/\__/\__,_/\___/_/|_|
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
__
|
||||
____ _____ _/ /___ _______
|
||||
/ __ `/ __ `/ __/ / / / ___/
|
||||
/ /_/ / /_/ / /_/ /_/ (__ )
|
||||
\__, /\__,_/\__/\__,_/____/
|
||||
/____/
|
||||
@@ -1,6 +1,6 @@
|
||||
__ __
|
||||
/ / / /___ ____ ___ ____ ___________
|
||||
/ /_/ / __ \/ __ `__ \/ __ `/ ___/ ___/
|
||||
/ __ / /_/ / / / / / / /_/ / / / /
|
||||
__
|
||||
/ /_ ____ ____ ___ ____ ___________
|
||||
/ __ \/ __ \/ __ `__ \/ __ `/ ___/ ___/
|
||||
/ / / / /_/ / / / / / / /_/ / / / /
|
||||
/_/ /_/\____/_/ /_/ /_/\__,_/_/ /_/
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
__ __ ___ _ __ __ ______
|
||||
/ / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ / ____/___ ________
|
||||
/ /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/_____/ / / __ \/ ___/ _ \
|
||||
/ __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_/_____/ /___/ /_/ / / / __/
|
||||
/_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ \____/\____/_/ \___/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
__ ___ __ __ __ _ __
|
||||
/ |/ /___ _/ /_/ /____ _____/ /_ _____(_)___/ /___ ____
|
||||
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ \/ ___/ / __ / __ `/ _ \
|
||||
/ / / / /_/ / /_/ /_/ __/ / / /_/ / / / / /_/ / /_/ / __/
|
||||
/_/ /_/\__,_/\__/\__/\___/_/ /_.___/_/ /_/\__,_/\__, /\___/
|
||||
/____/
|
||||
@@ -1,6 +0,0 @@
|
||||
__ ___ __ __ __
|
||||
/ |/ /___ _/ /_/ /____ _________ ___ ____ _____/ /_
|
||||
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ `__ \/ __ \/ ___/ __/
|
||||
/ / / / /_/ / /_/ /_/ __/ / / / / / / / /_/ (__ ) /_
|
||||
/_/ /_/\__,_/\__/\__/\___/_/ /_/ /_/ /_/\____/____/\__/
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
____ ____ _ __
|
||||
/ __ \____ ___ ____ / __ \_________ (_)__ _____/ /_
|
||||
/ / / / __ \/ _ \/ __ \/ /_/ / ___/ __ \ / / _ \/ ___/ __/
|
||||
/ /_/ / /_/ / __/ / / / ____/ / / /_/ / / / __/ /__/ /_
|
||||
\____/ .___/\___/_/ /_/_/ /_/ \____/_/ /\___/\___/\__/
|
||||
/_/ /___/
|
||||
@@ -1,6 +0,0 @@
|
||||
____ __
|
||||
/ __ \____ _____ ___ _____/ /__ __________ ____ ____ __ __
|
||||
/ /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/_____/ __ \/ __ `/ |/_/
|
||||
/ ____/ /_/ / /_/ / __/ / / / __(__ |__ )_____/ / / / /_/ /> <
|
||||
/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ /_/\__, /_/|_|
|
||||
/_/ /____/
|
||||
@@ -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
|
||||
$STD pnpm install --config.allowBuildScripts=true
|
||||
$STD pnpm build
|
||||
cp /opt/homarr/apps/nextjs/next.config.ts .
|
||||
cp /opt/homarr/apps/nextjs/package.json .
|
||||
|
||||
@@ -6,19 +6,15 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/
|
||||
|
||||
## App Default Values
|
||||
APP="Koel"
|
||||
var_tags="${var_tags:-music;player;homelab}"
|
||||
var_tags="${var_tags:-music}"
|
||||
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_verbose="${var_verbose:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
72
ct/odoo.sh
72
ct/odoo.sh
@@ -1,72 +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: 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: MickLesk (CanbiZ)
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://rclone.org/
|
||||
# Source: https://github.com/rclone/rclone
|
||||
|
||||
APP="Rclone"
|
||||
var_tags="${var_tags:-os}"
|
||||
@@ -23,14 +23,35 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /var ]]; then
|
||||
if [[ ! -d /opt/rclone ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
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
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -40,3 +61,5 @@ 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}"
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"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": []
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
40
frontend/public/json/backrest.json
Normal file
40
frontend/public/json/backrest.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"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": 8080,
|
||||
"interface_port": 3333,
|
||||
"documentation": "https://bitmagnet.io/setup.html",
|
||||
"website": "https://bitmagnet.io/",
|
||||
"logo": "https://github.com/bitmagnet-io/bitmagnet/blob/main/webui/public/magnet.svg",
|
||||
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/webp/bitmagnet.webp",
|
||||
"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/alpine-bitmagnet.sh",
|
||||
"script": "ct/bitmagnet.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 3,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
"ram": 512,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -42,5 +42,10 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
"notes": [
|
||||
{
|
||||
"text": "During installation you will be asked to enter your TMDB API key, if you wanna use it. Make sure you have it ready.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"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": []
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
44
frontend/public/json/rclone.json
Normal file
44
frontend/public/json/rclone.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"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,9 +1,109 @@
|
||||
[
|
||||
{
|
||||
"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",
|
||||
@@ -14,51 +114,16 @@
|
||||
"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",
|
||||
@@ -119,11 +184,6 @@
|
||||
"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",
|
||||
@@ -139,16 +199,6 @@
|
||||
"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",
|
||||
@@ -174,11 +224,6 @@
|
||||
"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",
|
||||
@@ -304,11 +349,6 @@
|
||||
"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",
|
||||
@@ -334,11 +374,6 @@
|
||||
"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",
|
||||
@@ -349,11 +384,6 @@
|
||||
"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",
|
||||
@@ -460,38 +490,8 @@
|
||||
"date": "2025-05-03T20:23:27Z"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
"name": "prometheus-pve/prometheus-pve-exporter",
|
||||
"version": "v3.5.4",
|
||||
"date": "2025-05-02T13:42:06Z"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,40 +4,42 @@ 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 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 filteredItems = items.filter(category => category.scripts && category.scripts.length > 0);
|
||||
|
||||
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>
|
||||
);
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sidebar;
|
||||
export default Sidebar;
|
||||
|
||||
@@ -40,12 +40,15 @@ 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
|
||||
$STD go build
|
||||
VREL=v$RELEASE
|
||||
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
|
||||
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
|
||||
@@ -60,6 +63,10 @@ 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
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#!/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"
|
||||
55
install/backrest-install.sh
Normal file
55
install/backrest-install.sh
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/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"
|
||||
78
install/bitmagnet-install.sh
Normal file
78
install/bitmagnet-install.sh
Normal file
@@ -0,0 +1,78 @@
|
||||
#!/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="10.11"
|
||||
#MARIADB_VERSION="11.8"
|
||||
#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,162 +13,15 @@ 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 /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
|
||||
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
|
||||
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
|
||||
|
||||
171
install/freepbx-install_backup.sh
Normal file
171
install/freepbx-install_backup.sh
Normal file
@@ -0,0 +1,171 @@
|
||||
#!/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,18 +13,17 @@ 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 \
|
||||
@@ -32,78 +31,62 @@ $STD apt-get install -y \
|
||||
libpng-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpq-dev \
|
||||
libwebp-dev \
|
||||
libapache2-mod-php \
|
||||
composer
|
||||
msg_ok "Installed Dependencies"
|
||||
libwebp-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up PSql Database"
|
||||
# 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"
|
||||
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"
|
||||
|
||||
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"
|
||||
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 "Installing Koel(Patience)"
|
||||
RELEASE=$(wget -q https://github.com/koel/koel/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | grep "title>Release" | cut -d " " -f 4)
|
||||
mkdir -p /opt/koel_{media,sync}
|
||||
wget -q https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip
|
||||
unzip -q koel-${RELEASE}.zip
|
||||
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip -o /opt/koel.zip
|
||||
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
|
||||
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 6767;
|
||||
listen *:80;
|
||||
server_name koel.local;
|
||||
root /opt/koel/public;
|
||||
index index.php;
|
||||
@@ -120,18 +103,24 @@ 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 =404;
|
||||
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;
|
||||
|
||||
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
|
||||
@@ -152,7 +141,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/koel-${RELEASE}.zip
|
||||
rm -rf /opt/koel.zip
|
||||
$STD apt-get autoremove
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
@@ -21,32 +21,23 @@ $STD apt-get install -y \
|
||||
fping \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
mariadb-client \
|
||||
mariadb-server \
|
||||
mtr-tiny \
|
||||
nginx \
|
||||
nmap \
|
||||
rrdtool \
|
||||
snmp \
|
||||
snmpd \
|
||||
git \
|
||||
whois
|
||||
snmpd
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
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"
|
||||
install_php
|
||||
install_mariadb
|
||||
install_composer
|
||||
|
||||
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
|
||||
@@ -63,15 +54,13 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS
|
||||
msg_ok "Configured Database"
|
||||
|
||||
msg_info "Setup 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
|
||||
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
|
||||
fetch_and_deploy_gh_release "librenms/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/
|
||||
|
||||
$STD pip3 install -r /opt/librenms/requirements.txt
|
||||
|
||||
pip3 install --no-user -r /opt/librenms/requirements.txt
|
||||
|
||||
cp /opt/librenms/.env.example /opt/librenms/.env
|
||||
|
||||
@@ -79,25 +68,18 @@ 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 Composer"
|
||||
msg_ok "Setup LibreNMS"
|
||||
|
||||
|
||||
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
|
||||
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
|
||||
systemctl enable -q --now mariadb
|
||||
msg_ok "Setup MariaDB"
|
||||
msg_ok "Configured 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,8 +17,7 @@ $STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
gnupg2\
|
||||
postgresql \
|
||||
gnupg2 postgresql \
|
||||
lsb-release \
|
||||
rbenv \
|
||||
libpq-dev \
|
||||
@@ -38,50 +37,43 @@ 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 -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
RELEASE=$(curl -fsSL 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_VERSION=$(cat /opt/manyfold/.ruby-version)
|
||||
RUBY_INSTALL_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"
|
||||
|
||||
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"
|
||||
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 "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
|
||||
@@ -112,7 +104,7 @@ source /opt/.env
|
||||
cd /opt/manyfold
|
||||
chown -R manyfold:manyfold /opt/manyfold
|
||||
$STD gem install bundler
|
||||
$STD rbenv global $RUBY_VERSION
|
||||
$STD rbenv global $RUBY_INSTALL_VERSION
|
||||
$STD bundle install
|
||||
$STD gem install sidekiq
|
||||
$STD npm install --global corepack
|
||||
@@ -124,6 +116,7 @@ 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"
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/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 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# 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
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@@ -14,14 +14,29 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y gnupg2
|
||||
$STD apt-get install -y \
|
||||
apache2-utils \
|
||||
unzip
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing rclone"
|
||||
$STD fetch_and_deploy_gh_release rclone/rclone
|
||||
dpkg -i rclone-v1.69.1-linux-amd64.deb
|
||||
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
|
||||
msg_ok "Installed rclone"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/rclone-web.service
|
||||
[Unit]
|
||||
Description=Rclone Web GUI
|
||||
@@ -30,19 +45,21 @@ After=network-online.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
ExecStart=/usr/bin/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-user admin --rc-pass 12345
|
||||
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
|
||||
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,7 +490,8 @@ advanced_settings() {
|
||||
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)\s+'; then
|
||||
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
|
||||
iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}')
|
||||
BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
|
||||
fi
|
||||
@@ -905,7 +906,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)\s+'; then
|
||||
if awk "NR >= ${start} && NR <= ${end}" "${iface_filepath}" | grep -qP '^\s*(bridge[-_](ports|stp|fd|vlan-aware|vids)|ovs_type\s+OVSBridge)\b'; then
|
||||
iface_name=$(sed "${start}q;d" "${iface_filepath}" | awk '{print $2}')
|
||||
BRIDGES="${iface_name}"$'\n'"${BRIDGES}"
|
||||
fi
|
||||
|
||||
163
misc/core.func
163
misc/core.func
@@ -47,6 +47,7 @@ formatting() {
|
||||
BOLD=$(echo "\033[1m")
|
||||
HOLD=" "
|
||||
TAB=" "
|
||||
TAB3=" "
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -215,127 +216,155 @@ __curl_err_handler() {
|
||||
}
|
||||
|
||||
### dev spinner ###
|
||||
SPINNER_ACTIVE=0
|
||||
SPINNER_PID=""
|
||||
SPINNER_MSG=""
|
||||
declare -A MSG_INFO_SHOWN=()
|
||||
SPINNER_PID=""
|
||||
SPINNER_ACTIVE=0
|
||||
SPINNER_MSG=""
|
||||
|
||||
# Trap cleanup on various signals
|
||||
trap 'cleanup_spinner' EXIT INT TERM HUP
|
||||
|
||||
# Cleans up spinner process on exit
|
||||
cleanup_spinner() {
|
||||
stop_spinner
|
||||
# Additional cleanup if needed
|
||||
}
|
||||
spinner_frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||
|
||||
# Ensure POSIX compatibility across Alpine and Debian/Ubuntu
|
||||
# === Spinner Start ===
|
||||
start_spinner() {
|
||||
local msg="${1:-Processing...}"
|
||||
local frames=(⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏)
|
||||
local msg="$1"
|
||||
local spin_i=0
|
||||
local interval=0.1
|
||||
|
||||
# Set message and clear current line
|
||||
SPINNER_MSG="$msg"
|
||||
printf "\r\e[2K" >&2
|
||||
|
||||
# Stop any existing spinner
|
||||
stop_spinner
|
||||
|
||||
# Set active flag
|
||||
SPINNER_MSG="$msg"
|
||||
SPINNER_ACTIVE=1
|
||||
|
||||
# Start spinner in background
|
||||
{
|
||||
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[@]}))
|
||||
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[@]}))
|
||||
sleep "$interval"
|
||||
done
|
||||
} &
|
||||
|
||||
SPINNER_PID=$!
|
||||
|
||||
# Disown to prevent getting "Terminated" messages
|
||||
disown "$SPINNER_PID" 2>/dev/null || true
|
||||
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 Stop (No wait!) ===
|
||||
stop_spinner() {
|
||||
# Check if spinner is active and PID exists
|
||||
if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "${SPINNER_PID}" ]]; then
|
||||
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
|
||||
# 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
|
||||
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
|
||||
fi
|
||||
|
||||
# Clear spinner line
|
||||
printf "\r\e[2K" >&2
|
||||
SPINNER_PID=""
|
||||
fi
|
||||
}
|
||||
|
||||
spinner_guard() {
|
||||
# Safely stop spinner if it's running
|
||||
if [[ "$SPINNER_ACTIVE" -eq 1 ]] && [[ -n "${SPINNER_PID}" ]]; then
|
||||
stop_spinner
|
||||
fi
|
||||
# === Cleanup Spinner on signals ===
|
||||
cleanup_spinner() {
|
||||
stop_spinner
|
||||
}
|
||||
|
||||
# === msg_info ===
|
||||
msg_info() {
|
||||
local msg="${1:-Information message}"
|
||||
|
||||
# Only show each message once unless reset
|
||||
if [[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]]; then
|
||||
return
|
||||
fi
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
if [ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]; then return; fi
|
||||
MSG_INFO_SHOWN["$msg"]=1
|
||||
|
||||
spinner_guard
|
||||
stop_spinner
|
||||
start_spinner "$msg"
|
||||
}
|
||||
|
||||
# === msg_ok ===
|
||||
msg_ok() {
|
||||
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
|
||||
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
|
||||
unset MSG_INFO_SHOWN["$msg"]
|
||||
}
|
||||
|
||||
# === msg_error ===
|
||||
msg_error() {
|
||||
local msg="${1:-An error occurred}"
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
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:-Warning}"
|
||||
local msg="$1"
|
||||
[ -z "$msg" ] && return
|
||||
stop_spinner
|
||||
printf "\r\e[2K%s %b\n" "${INFO}" "${YWB}${msg}" >&2
|
||||
|
||||
# Remove from shown messages to allow it to be shown again
|
||||
printf "\r\e[2K%s %b\n" "$INFO" "${YWB}${msg}${CL}" >&2
|
||||
unset MSG_INFO_SHOWN["$msg"]
|
||||
}
|
||||
|
||||
# Helper function to display a message with custom symbol and color
|
||||
# === msg_custom ===
|
||||
msg_custom() {
|
||||
local symbol="${1:-*}"
|
||||
local color="${2:-$CL}"
|
||||
local msg="${3:-Custom message}"
|
||||
local symbol="$1"
|
||||
local color="$2"
|
||||
local msg="$3"
|
||||
[ -z "$msg" ] && return
|
||||
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_ok "Network Connected: ${BL}$(hostname -I)"
|
||||
#msg_custom "${CM}" "${GN}" "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
|
||||
echo -e "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
|
||||
msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
|
||||
NEED_PG_INSTALL=true
|
||||
else
|
||||
echo -e "PostgreSQL not installed, proceeding with fresh install of $PG_VERSION"
|
||||
msg_info "Setup PostgreSQL $PG_VERSION"
|
||||
NEED_PG_INSTALL=true
|
||||
fi
|
||||
|
||||
@@ -123,10 +123,10 @@ 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"
|
||||
fi
|
||||
|
||||
msg_info "Stopping PostgreSQL service"
|
||||
systemctl stop postgresql || true
|
||||
msg_info "Stopping PostgreSQL service"
|
||||
systemctl stop postgresql
|
||||
fi
|
||||
|
||||
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 --now postgresql
|
||||
systemctl enable -q --now postgresql
|
||||
|
||||
if [[ -n "$CURRENT_PG_VERSION" ]]; then
|
||||
$STD msg_info "Restoring dumped data"
|
||||
@@ -167,13 +167,18 @@ install_mariadb() {
|
||||
|
||||
# grab dynamic latest LTS version
|
||||
if [[ "$MARIADB_VERSION" == "latest" ]]; then
|
||||
msg_info "Resolving latest MariaDB version"
|
||||
MARIADB_VERSION=$(curl -fsSL https://mariadb.org | grep -oP 'MariaDB \K10\.[0-9]+' | head -n1)
|
||||
$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)
|
||||
if [[ -z "$MARIADB_VERSION" ]]; then
|
||||
msg_error "Could not determine latest MariaDB version"
|
||||
msg_error "Could not determine latest GA MariaDB version"
|
||||
return 1
|
||||
fi
|
||||
msg_ok "Latest MariaDB version is $MARIADB_VERSION"
|
||||
$STD msg_ok "Latest GA MariaDB version is $MARIADB_VERSION"
|
||||
fi
|
||||
|
||||
local CURRENT_VERSION=""
|
||||
@@ -182,23 +187,23 @@ install_mariadb() {
|
||||
fi
|
||||
|
||||
if [[ "$CURRENT_VERSION" == "$MARIADB_VERSION" ]]; then
|
||||
msg_info "MariaDB $MARIADB_VERSION already installed, checking for upgrade"
|
||||
$STD msg_info "MariaDB $MARIADB_VERSION, upgrading"
|
||||
$STD apt-get update
|
||||
$STD apt-get install --only-upgrade -y mariadb-server mariadb-client
|
||||
msg_ok "MariaDB $MARIADB_VERSION upgraded if applicable"
|
||||
$STD msg_ok "MariaDB upgraded to $MARIADB_VERSION"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -n "$CURRENT_VERSION" ]]; then
|
||||
msg_info "Replacing MariaDB $CURRENT_VERSION with $MARIADB_VERSION (data will be preserved)"
|
||||
$STD msg_info "Replacing MariaDB $CURRENT_VERSION with $MARIADB_VERSION (data will be preserved)"
|
||||
$STD systemctl stop mariadb >/dev/null 2>&1 || true
|
||||
$STD apt-get purge -y 'mariadb*' || true
|
||||
rm -f /etc/apt/sources.list.d/mariadb.list /etc/apt/trusted.gpg.d/mariadb.gpg
|
||||
else
|
||||
msg_info "Installing MariaDB $MARIADB_VERSION"
|
||||
msg_info "Setup MariaDB $MARIADB_VERSION"
|
||||
fi
|
||||
|
||||
msg_info "Setting up MariaDB Repository"
|
||||
$STD 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
|
||||
|
||||
@@ -208,7 +213,7 @@ install_mariadb() {
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mariadb-server mariadb-client
|
||||
|
||||
msg_ok "Installed MariaDB $MARIADB_VERSION"
|
||||
msg_ok "Setup MariaDB $MARIADB_VERSION"
|
||||
}
|
||||
|
||||
install_mysql() {
|
||||
@@ -253,6 +258,9 @@ 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
|
||||
|
||||
@@ -279,11 +287,11 @@ install_php() {
|
||||
fi
|
||||
|
||||
if [[ "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
|
||||
$STD echo "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
|
||||
$STD msg_info "PHP $CURRENT_PHP detected, migrating to PHP $PHP_VERSION"
|
||||
if [[ ! -f /etc/apt/sources.list.d/php.list ]]; then
|
||||
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" \
|
||||
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${DISTRO_CODENAME} main" \
|
||||
>/etc/apt/sources.list.d/php.list
|
||||
$STD apt-get update
|
||||
fi
|
||||
@@ -329,12 +337,12 @@ install_php() {
|
||||
|
||||
for ini in "${PHP_INI_PATHS[@]}"; do
|
||||
if [[ -f "$ini" ]]; then
|
||||
msg_info "Patching $ini"
|
||||
$STD msg_info "Patching $ini"
|
||||
sed -i "s|^memory_limit = .*|memory_limit = ${PHP_MEMORY_LIMIT}|" "$ini"
|
||||
sed -i "s|^upload_max_filesize = .*|upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}|" "$ini"
|
||||
sed -i "s|^post_max_size = .*|post_max_size = ${PHP_POST_MAX_SIZE}|" "$ini"
|
||||
sed -i "s|^max_execution_time = .*|max_execution_time = ${PHP_MAX_EXECUTION_TIME}|" "$ini"
|
||||
msg_ok "Patched $ini"
|
||||
$STD msg_ok "Patched $ini"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -347,14 +355,14 @@ install_composer() {
|
||||
if [[ -x "$COMPOSER_BIN" ]]; then
|
||||
local CURRENT_VERSION
|
||||
CURRENT_VERSION=$("$COMPOSER_BIN" --version | awk '{print $3}')
|
||||
msg_info "Composer $CURRENT_VERSION found, updating to latest"
|
||||
$STD msg_info "Composer $CURRENT_VERSION found, updating to latest"
|
||||
else
|
||||
msg_info "Composer not found, installing latest version"
|
||||
msg_info "Setup Composer"
|
||||
fi
|
||||
|
||||
# Download and install latest composer
|
||||
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
|
||||
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer >/dev/null 2>&1
|
||||
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer &>/dev/null
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
msg_error "Failed to install Composer"
|
||||
@@ -913,3 +921,80 @@ 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