diff --git a/CODE-AUDIT.md b/.github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md similarity index 100% rename from CODE-AUDIT.md rename to .github/CONTRIBUTOR_AND_GUIDES/CODE-AUDIT.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md similarity index 100% rename from .github/CONTRIBUTING.md rename to .github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md diff --git a/USER_SUBMITTED_GUIDES.md b/.github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md similarity index 100% rename from USER_SUBMITTED_GUIDES.md rename to .github/CONTRIBUTOR_AND_GUIDES/USER_SUBMITTED_GUIDES.md diff --git a/.github/CONTRIBUTOR_GUIDE/ct/AppName.md b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md similarity index 94% rename from .github/CONTRIBUTOR_GUIDE/ct/AppName.md rename to .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md index 96d7add38..89421da2d 100644 --- a/.github/CONTRIBUTOR_GUIDE/ct/AppName.md +++ b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md @@ -119,18 +119,13 @@ var_unprivileged="1" ## 2.2 **📋 App output & base settings** ```bash -# App Output & Base Settings header_info "$APP" -base_settings ``` - - `header_info`: Generates ASCII header for APP -- `base_settings`: Allows overwriting variable values ## 2.3 **🛠 Core functions** ```bash -# Core variables color catch_errors @@ -171,7 +166,7 @@ if [[ ! -d /opt/snipe-it ]]; then ### 3.3 **Check version** -- Befoer updating, check if a new version exists. +- Before updating, check if a new version exists. - We use the `${APPLICATION}_version.txt` file created in `/opt` during the install to compare new versions against the currently installed version. Example with a Github Release: @@ -241,7 +236,7 @@ Example: ### 3.7 **No update function** -- In case you can not provide a update function use the following code to provide user feedback. +- In case you can not provide an update function use the following code to provide user feedback. ```bash function update_script() { @@ -252,7 +247,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "Ther is currently no automatic update function for ${APP}." + msg_error "There is currently no automatic update function for ${APP}." exit } ``` @@ -286,6 +281,6 @@ echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" - [ ] Metadata (author, license) is included at the top. - [ ] Variables follow naming conventions. - [ ] Update function exists. -- [ ] Update functions checks if app is installed an for new version. -- [ ] Update function up temporary files. +- [ ] Update functions checks if app is installed and for new version. +- [ ] Update function cleans up temporary files. - [ ] Script ends with a helpful message for the user to reach the application. diff --git a/.github/CONTRIBUTOR_GUIDE/ct/AppName.sh b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh similarity index 94% rename from .github/CONTRIBUTOR_GUIDE/ct/AppName.sh rename to .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh index bf28d113a..ff8d03c27 100644 --- a/.github/CONTRIBUTOR_GUIDE/ct/AppName.sh +++ b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) -# Copyright (c) 2021-2024 community-scripts ORG +# Copyright (c) 2021-2025 community-scripts ORG # Author: [YourUserName] # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: [SOURCE_URL] @@ -23,11 +23,7 @@ var_version="[VERSION]" var_unprivileged="[UNPRIVILEGED]" # 1 = unprivileged container, 0 = privileged container -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -46,8 +42,6 @@ function update_script() { # Crawling the new version and checking whether an update is required RELEASE=$(curl -fsSL [RELEASE_URL] | [PARSE_RELEASE_COMMAND]) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Updating $APP" - # Stopping Services msg_info "Stopping $APP" systemctl stop [SERVICE_NAME] @@ -66,7 +60,6 @@ function update_script() { # Starting Services msg_info "Starting $APP" systemctl start [SERVICE_NAME] - sleep 2 msg_ok "Started $APP" # Cleaning up diff --git a/.github/CONTRIBUTOR_GUIDE/install/AppName-install.md b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md similarity index 100% rename from .github/CONTRIBUTOR_GUIDE/install/AppName-install.md rename to .github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md diff --git a/.github/CONTRIBUTOR_GUIDE/install/AppName-install.sh b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh similarity index 93% rename from .github/CONTRIBUTOR_GUIDE/install/AppName-install.sh rename to .github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh index a1d0f8a2d..5b3d6833b 100644 --- a/.github/CONTRIBUTOR_GUIDE/install/AppName-install.sh +++ b/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 community-scripts ORG +# Copyright (c) 2021-2025 community-scripts ORG # Author: [YourUserName] -# License: MIT +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: [SOURCE_URL] # Import Functions und Setup @@ -80,7 +80,4 @@ msg_info "Cleaning up" rm -f ${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" - -motd_ssh -customize +msg_ok "Cleaned" \ No newline at end of file diff --git a/.github/CONTRIBUTOR_GUIDE/json/AppName.json b/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.json similarity index 94% rename from .github/CONTRIBUTOR_GUIDE/json/AppName.json rename to .github/CONTRIBUTOR_AND_GUIDES/json/AppName.json index 622f370a4..746ebd916 100644 --- a/.github/CONTRIBUTOR_GUIDE/json/AppName.json +++ b/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.json @@ -12,7 +12,7 @@ "documentation": null, "website": "LINK TO WEBSITE", "logo": "LINK TO LOGO", - "description": "Deescription of the app", + "description": "Description of the app", "install_methods": [ { "type": "default", diff --git a/.github/CONTRIBUTOR_GUIDE/json/AppName.md b/.github/CONTRIBUTOR_AND_GUIDES/json/AppName.md similarity index 100% rename from .github/CONTRIBUTOR_GUIDE/json/AppName.md rename to .github/CONTRIBUTOR_AND_GUIDES/json/AppName.md diff --git a/.github/DISCUSSION_TEMPLATE/request-script.yml b/.github/DISCUSSION_TEMPLATE/request-script.yml index aac84df60..44ed9b147 100644 --- a/.github/DISCUSSION_TEMPLATE/request-script.yml +++ b/.github/DISCUSSION_TEMPLATE/request-script.yml @@ -30,8 +30,6 @@ body: required: true - label: "I have searched existing [discussions](https://github.com/community-scripts/ProxmoxVE/discussions?discussions_q=) and found no duplicate requests." required: true - - label: "This is not a game-related request." - required: true - type: markdown attributes: value: "Thanks for submitting your request! The team will review it and reach out if we need more information." diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9d57ad874..a31d7104b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: "🐞 Script Issue Report" description: Report a specific issue with a script. For other inquiries, please use the Discussions section. - +labels: ["bug"] body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index e9a13bc4d..c38d4d6e9 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,7 +3,7 @@ contact_links: - name: 🤔 Questions and Help url: https://github.com/community-scripts/ProxmoxVE/discussions about: For suggestions or questions, please use the Discussions section. - - name: 🌟 Feature request + - name: 🌟 new Script request url: https://github.com/community-scripts/ProxmoxVE/discussions/new?category=request-script about: For feature/script requests, please use the Discussions section. - name: 💻 Discord diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000..7f065275f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: "✨ Feature Request" +description: "Suggest a new feature or enhancement." +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + # ✨ **Feature Request** + Have an idea for a new feature? Share your thoughts below! + + - type: input + id: feature_summary + attributes: + label: "🌟 Briefly describe the feature" + placeholder: "e.g., Add support for XYZ" + validations: + required: true + + - type: textarea + id: feature_description + attributes: + label: "📝 Detailed description" + placeholder: "Explain the feature in detail" + validations: + required: true + + - type: textarea + id: use_case + attributes: + label: "💡 Why is this useful?" + placeholder: "Describe the benefit of this feature" + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml new file mode 100644 index 000000000..bf5569298 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yml @@ -0,0 +1,25 @@ +name: "🛠️ Task / General Request" +description: "Request a general task, improvement, or refactor." +labels: ["task"] +body: + - type: markdown + attributes: + value: | + # 🛠️ **Task / General Request** + Request a task that isn't a bug or feature request. + + - type: input + id: task_summary + attributes: + label: "📌 Task summary" + placeholder: "e.g., Refactor XYZ" + validations: + required: true + + - type: textarea + id: task_details + attributes: + label: "📋 Task details" + placeholder: "Explain what needs to be done" + validations: + required: true diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 30e34b972..399004ee1 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -23,7 +23,7 @@ { "fileStatus": "modified", "includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"], - "excludeGlobs": ["misc/build.func", "misc/install.func"] + "excludeGlobs": ["misc/build.func", "misc/install.func", "misc/api.func"] } ], "delete script": [ @@ -51,13 +51,20 @@ { "fileStatus": null, "includeGlobs": ["*.md", ".github/**", "misc/*.func", "ct/create_lxc.sh"], + "excludeGlobs": ["misc/api.func"] + } + ], + "api": [ + { + "fileStatus": null, + "includeGlobs": ["api/**", "misc/api.func"], "excludeGlobs": [] } ], "high risk": [ { "fileStatus": null, - "includeGlobs": ["misc/build.func", "misc/install.func"], + "includeGlobs": ["misc/build.func", "misc/install.func", "ct/create_lxc.sh"], "excludeGlobs": [] } ] diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index 5da6b306a..8168251b6 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -1,30 +1,42 @@ [ - { - "title": "💥 Breaking Changes", - "labels": ["breaking change"] - }, - { - "title": "✨ New Scripts", - "labels": ["new script"] - }, - { - "title": "🚀 Updated Scripts", - "labels": ["update script"] - }, - { - "title": "🌐 Website", - "labels": ["website"] - }, - { - "title": "🐞 Bug Fixes", - "labels": ["bug fix"] - }, - { - "title": "🧰 Maintenance", - "labels": ["maintenance"] - }, - { - "title": "❔ Unlabelled", - "labels": [] - } + { + "title": "💥 Breaking Changes", + "labels": ["breaking change"] + }, + { + "title": "🆕 New Scripts", + "labels": ["new script"] + }, + { + "title": "🚀 Updated Scripts", + "labels": ["update script"] + }, + { + "title": "🐞 Bug Fixes (Updated Scripts)", + "labels": ["update script", "bugfix"] + }, + { + "title": "✨ Feature Updates (Updated Scripts)", + "labels": ["update script", "feature"] + }, + { + "title": "✨ New Features", + "labels": ["feature"] + }, + { + "title": "🌐 Website", + "labels": ["website"] + }, + { + "title": "📡 API", + "labels": ["api"] + }, + { + "title": "🧰 Maintenance", + "labels": ["maintenance"] + }, + { + "title": "❔ Unlabelled", + "labels": [] + } ] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7613cf4eb..11a90a774 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,28 +1,25 @@ -## ✍️ Description +## ✍️ Description + - - -- - - -- Related Issue: # -- Related PR: # -- Related Discussion: # -- - - +## 🔗 Related PR / Discussion / Issue +Link: # -## ✅ Prerequisites -The following steps must be completed for the pull request to be considered: -- [] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) -- [] Testing performed (I have thoroughly tested my changes and verified expected functionality.) -## 🛠️ Type of Change -Please check the relevant options: -- [] Bug fix (non-breaking change that resolves an issue) -- [] New feature (non-breaking change that adds functionality) -- [] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) -- [] New script (a fully functional and thoroughly tested script or set of scripts) +## ✅ Prerequisites +Before this PR can be reviewed, the following must be completed: +- [] **Self-review performed** – Code follows established patterns and conventions. +- [] **Testing performed** – Changes have been thoroughly tested and verified. ---- -## 📋 Additional Information (optional) -Provide any extra context or screenshots about the feature or fix here. +## 🛠️ Type of Change +Select all that apply: +- [] 🐞 **Bug fix** – Resolves an issue without breaking functionality. +- [] ✨ **New feature** – Adds new, non-breaking functionality. +- [] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. +- [] 🆕 **New script** – A fully functional and tested script or script set. + + +## 📋 Additional Information (optional) + diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 0a62c2dd5..5e447ea54 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -17,6 +17,13 @@ jobs: pull-requests: write steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + # Step 1: Checkout repository - name: Checkout repository uses: actions/checkout@v2 @@ -70,8 +77,28 @@ jobs: --head pr-update-app-files \ --base main \ --label "automated pr" + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + + - name: Approve pull request + if: env.changed == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi + + - name: Re-approve pull request after update + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi # Step 8: Output success message when no changes - name: No changes detected diff --git a/.github/workflows/backup/update_json_date.yml.bak b/.github/workflows/backup/update_json_date.yml.bak new file mode 100644 index 000000000..cb9bc8559 --- /dev/null +++ b/.github/workflows/backup/update_json_date.yml.bak @@ -0,0 +1,88 @@ +name: Auto Update JSON-Date + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + update-json-dates: + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + + steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Full history for proper detection + + - name: Set up Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Find JSON files with incorrect date_created + id: find_wrong_json + run: | + TODAY=$(date -u +"%Y-%m-%d") + > incorrect_json_files.txt + + for FILE in json/*.json; do + if [[ -f "$FILE" ]]; then + DATE_IN_JSON=$(jq -r '.date_created' "$FILE" 2>/dev/null || echo "") + + if [[ "$DATE_IN_JSON" != "$TODAY" ]]; then + echo "$FILE" >> incorrect_json_files.txt + fi + fi + done + + if [[ -s incorrect_json_files.txt ]]; then + echo "CHANGED=true" >> $GITHUB_ENV + else + echo "CHANGED=false" >> $GITHUB_ENV + fi + + - name: Run update script + if: env.CHANGED == 'true' + run: | + chmod +x .github/workflows/scripts/update-json.sh + while read -r FILE; do + .github/workflows/scripts/update-json.sh "$FILE" + done < incorrect_json_files.txt + + - name: Commit and create PR if changes exist + if: env.CHANGED == 'true' + run: | + git add json/*.json + git commit -m "Auto-update date_created in incorrect JSON files" + git checkout -b pr-fix-json-dates + git push origin pr-fix-json-dates --force + gh pr create --title "[core] Fix incorrect JSON date_created fields" \ + --body "This PR is auto-generated to fix incorrect `date_created` fields in JSON files." \ + --head pr-fix-json-dates \ + --base main \ + --label "automated pr" + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + + - name: Approve pull request + if: env.CHANGED == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "pr-fix-json-dates" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi diff --git a/.github/workflows/delete-json-branch.yml b/.github/workflows/delete-json-branch.yml new file mode 100644 index 000000000..e4cdcf24f --- /dev/null +++ b/.github/workflows/delete-json-branch.yml @@ -0,0 +1,28 @@ + +name: Delete JSON date PR Branch + +on: + pull_request: + types: [closed] + branches: + - main + +jobs: + delete_branch: + runs-on: ubuntu-latest + steps: + - name: Checkout the code + uses: actions/checkout@v3 + + - name: Delete PR Update Branch + if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'pr-update-json-') + run: | + PR_BRANCH="${{ github.event.pull_request.head.ref }}" + echo "Deleting branch $PR_BRANCH..." + + # Avoid deleting the default branch (e.g., main) + if [[ "$PR_BRANCH" != "main" ]]; then + git push origin --delete "$PR_BRANCH" + else + echo "Skipping deletion of the main branch" + fi \ No newline at end of file diff --git a/.github/workflows/script-test.yml b/.github/workflows/script-test.yml new file mode 100644 index 000000000..6b9e100eb --- /dev/null +++ b/.github/workflows/script-test.yml @@ -0,0 +1,159 @@ +name: Run Scripts on PVE Node for testing +permissions: + pull-requests: write +on: + pull_request_target: + branches: + - main + paths: + - 'install/**.sh' + - 'ct/**.sh' + +jobs: + run-install-script: + runs-on: pvenode + steps: + - name: Checkout PR branch (supports forks) + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + fetch-depth: 0 + + - name: Add Git safe directory + run: | + git config --global --add safe.directory /__w/ProxmoxVE/ProxmoxVE + + - name: Set up GH_TOKEN + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "GH_TOKEN=${GH_TOKEN}" >> $GITHUB_ENV + + - name: Get Changed Files + run: | + CHANGED_FILES=$(gh pr diff ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --name-only) + CHANGED_FILES=$(echo "$CHANGED_FILES" | tr '\n' ' ') + echo "Changed files: $CHANGED_FILES" + echo "SCRIPT=$CHANGED_FILES" >> $GITHUB_ENV + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get scripts + id: check-install-script + run: | + ALL_FILES=() + ADDED_FILES=() + for FILE in ${{ env.SCRIPT }}; do + if [[ $FILE =~ ^install/.*-install\.sh$ ]] || [[ $FILE =~ ^ct/.*\.sh$ ]]; then + STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') + if [[ ! " ${ADDED_FILES[@]} " =~ " $STRIPPED_NAME " ]]; then + ALL_FILES+=("$FILE") + ADDED_FILES+=("$STRIPPED_NAME") # Mark this base file as added (without the path) + fi + fi + done + ALL_FILES=$(echo "${ALL_FILES[@]}" | xargs) + echo "$ALL_FILES" + echo "ALL_FILES=$ALL_FILES" >> $GITHUB_ENV + + - name: Run scripts + id: run-install + continue-on-error: true + run: | + set +e + #run for each files in /ct + for FILE in ${{ env.ALL_FILES }}; do + STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') + echo "Running Test for: $STRIPPED_NAME" + if [[ $FILE =~ ^install/.*-install\.sh$ ]]; then + CT_SCRIPT="ct/$STRIPPED_NAME.sh" + if [[ ! -f $CT_SCRIPT ]]; then + echo "No CT script found for $STRIPPED_NAME" + ERROR_MSG="No CT script found for $FILE" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + continue + fi + echo "Found CT script for $STRIPPED_NAME" + chmod +x "$CT_SCRIPT" + RUNNING_FILE=$CT_SCRIPT + elif [[ $FILE =~ ^ct/.*\.sh$ ]]; then + INSTALL_SCRIPT="install/$STRIPPED_NAME-install.sh" + if [[ ! -f $INSTALL_SCRIPT ]]; then + echo "No install script found for $STRIPPED_NAME" + ERROR_MSG="No install script found for $FILE" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + continue + fi + echo "Found install script for $STRIPPED_NAME" + chmod +x "$INSTALL_SCRIPT" + RUNNING_FILE=$FILE + fi + git remote add community-scripts https://github.com/community-scripts/ProxmoxVE.git + git fetch community-scripts + rm -f .github/workflows/scripts/app-test/pr-build.func || true + rm -f .github/workflows/scripts/app-test/pr-install.func || true + rm -f .github/workflows/scripts/app-test/pr-alpine-install.func || true + rm -f .github/workflows/scripts/app-test/pr-create-lxc.sh || true + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-build.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-install.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-alpine-install.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-create-lxc.sh + chmod +x $RUNNING_FILE + chmod +x .github/workflows/scripts/app-test/pr-create-lxc.sh + chmod +x .github/workflows/scripts/app-test/pr-install.func + chmod +x .github/workflows/scripts/app-test/pr-alpine-install.func + chmod +x .github/workflows/scripts/app-test/pr-build.func + sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" + echo "Executing $RUNNING_FILE" + ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) + echo "Finished running $FILE" + if [ -n "$ERROR_MSG" ]; then + echo "ERROR in $STRIPPED_NAME: $ERROR_MSG" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + fi + done + set -e # Restore exit-on-error + + - name: Cleanup PVE Node + run: | + containers=$(pct list | tail -n +2 | awk '{print $0 " " $4}' | awk '{print $1}') + + for container_id in $containers; do + status=$(pct status $container_id | awk '{print $2}') + if [[ $status == "running" ]]; then + pct stop $container_id + pct destroy $container_id + fi + done + + - name: Post error comments + run: | + ERROR="false" + SEARCH_LINE=".github/workflows/scripts/app-test/pr-build.func: line 253:" + for FILE in ${{ env.ALL_FILES }}; do + STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') + if [[ ! -f result_$STRIPPED_NAME.log ]]; then + continue + fi + ERROR_MSG=$(cat result_$STRIPPED_NAME.log) + + if [ -n "$ERROR_MSG" ]; then + CLEANED_ERROR_MSG=$(echo "$ERROR_MSG" | sed "s|$SEARCH_LINE.*||") + echo "Posting error message for $FILE" + echo ${CLEANED_ERROR_MSG} + gh pr comment ${{ github.event.pull_request.number }} \ + --repo ${{ github.repository }} \ + --body ":warning: The script _**$FILE**_ failed with the following message:
${CLEANED_ERROR_MSG}
" + + + ERROR="true" + fi + done + echo "ERROR=$ERROR" >> $GITHUB_ENV + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Fail if error + if: ${{ env.ERROR == 'true' }} + run: exit 1 diff --git a/.github/workflows/scripts/app-test/pr-alpine-install.func b/.github/workflows/scripts/app-test/pr-alpine-install.func new file mode 100644 index 000000000..39a6a82fb --- /dev/null +++ b/.github/workflows/scripts/app-test/pr-alpine-install.func @@ -0,0 +1,88 @@ +#!/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 + +color() { + return +} +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + + +error_handler() { + local line_number="$1" + local command="$2" + SCRIPT_NAME=$(basename "$0") + local error_message="$SCRIPT_NAME: Failure in line $line_number while executing command $command" + echo -e "\n$error_message" + exit 0 +} +verb_ip6() { + STD="" + return +} + +msg_info() { + local msg="$1" + echo -ne "${msg}\n" +} + +msg_ok() { + local msg="$1" + echo -e "${msg}\n" +} + +msg_error() { + + local msg="$1" + echo -e "${msg}\n" +} + +RETRY_NUM=10 +RETRY_EVERY=3 +i=$RETRY_NUM + +setting_up_container() { + while [ $i -gt 0 ]; do + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then + break + fi + echo 1>&2 -en "No Network! " + sleep $RETRY_EVERY + i=$((i - 1)) + done + + if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then + echo 1>&2 -e "\n No Network After $RETRY_NUM Tries" + echo -e "Check Network Settings" + exit 1 + fi + msg_ok "Set up Container OS" + msg_ok "Network Connected: $(hostname -i)" +} + +network_check() { + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi + set -e +} + +update_os() { + msg_info "Updating Container OS" + apk update + apk upgrade + msg_ok "Updated Container OS" +} + +motd_ssh() { + return +} + +customize() { + return +} + + diff --git a/.github/workflows/scripts/app-test/pr-build.func b/.github/workflows/scripts/app-test/pr-build.func new file mode 100644 index 000000000..360c15ede --- /dev/null +++ b/.github/workflows/scripts/app-test/pr-build.func @@ -0,0 +1,260 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Michel Roegl-Brunner (michelroegl-brunner) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +variables() { + NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. + var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. +} + +NEXTID=$(pvesh get /cluster/nextid) +timezone=$(cat /etc/timezone) +header_info(){ + return +} + +base_settings() { + # Default Settings + CT_TYPE="1" + DISK_SIZE="4" + CORE_COUNT="1" + RAM_SIZE="1024" + VERBOSE="${1:-no}" + PW="" + CT_ID=$NEXTID + HN="Testing" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + SSH_AUTHORIZED_KEY="" + TAGS="community-script;" + + # Override default settings with variables from ct script + CT_TYPE=${var_unprivileged:-$CT_TYPE} + DISK_SIZE=${var_disk:-$DISK_SIZE} + CORE_COUNT=${var_cpu:-$CORE_COUNT} + RAM_SIZE=${var_ram:-$RAM_SIZE} + VERB=${var_verbose:-$VERBOSE} + TAGS="${TAGS}${var_tags:-}" + + # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts + if [ -z "$var_os" ]; then + var_os="debian" + fi + if [ -z "$var_version" ]; then + var_version="12" + fi +} + +color() { + # Colors + YW=$(echo "\033[33m") + YWB=$(echo "\033[93m") + BL=$(echo "\033[36m") + RD=$(echo "\033[01;31m") + BGN=$(echo "\033[4;92m") + GN=$(echo "\033[1;92m") + DGN=$(echo "\033[32m") + + # Formatting + CL=$(echo "\033[m") + UL=$(echo "\033[4m") + BOLD=$(echo "\033[1m") + BFR="\\r\\033[K" + HOLD=" " + TAB=" " + + # Icons + CM="${TAB}✔️${TAB}${CL}" + CROSS="${TAB}✖️${TAB}${CL}" + INFO="${TAB}💡${TAB}${CL}" + OS="${TAB}🖥️${TAB}${CL}" + OSVERSION="${TAB}🌟${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" + DISKSIZE="${TAB}💾${TAB}${CL}" + CPUCORE="${TAB}🧠${TAB}${CL}" + RAMSIZE="${TAB}🛠️${TAB}${CL}" + SEARCH="${TAB}🔍${TAB}${CL}" + VERIFYPW="${TAB}🔐${TAB}${CL}" + CONTAINERID="${TAB}🆔${TAB}${CL}" + HOSTNAME="${TAB}🏠${TAB}${CL}" + BRIDGE="${TAB}🌉${TAB}${CL}" + NETWORK="${TAB}📡${TAB}${CL}" + GATEWAY="${TAB}🌐${TAB}${CL}" + DISABLEIPV6="${TAB}🚫${TAB}${CL}" + DEFAULT="${TAB}⚙️${TAB}${CL}" + MACADDRESS="${TAB}🔗${TAB}${CL}" + VLANTAG="${TAB}🏷️${TAB}${CL}" + ROOTSSH="${TAB}🔑${TAB}${CL}" + CREATING="${TAB}🚀${TAB}${CL}" + ADVANCED="${TAB}🧩${TAB}${CL}" +} + +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +# This function handles errors +error_handler() { + local line_number="$1" + local command="$2" + SCRIPT_NAME=$(basename "$0") + local error_message="$SCRIPT_NAME: Failure in line $line_number while executing command $command" + echo -e "\n$error_message" + exit 100 +} + +msg_info() { + local msg="$1" + echo -ne "${msg}\n" +} + +msg_ok() { + local msg="$1" + echo -e "${msg}\n" +} + +msg_error() { + + local msg="$1" + echo -e "${msg}\n" +} +start(){ + base_settings + return +} + +build_container() { + # if [ "$VERB" == "yes" ]; then set -x; fi + + if [ "$CT_TYPE" == "1" ]; then + FEATURES="keyctl=1,nesting=1" + else + FEATURES="nesting=1" + fi + TEMP_DIR=$(mktemp -d) + pushd $TEMP_DIR >/dev/null + if [ "$var_os" == "alpine" ]; then + export FUNCTIONS_FILE_PATH="$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/.github/workflows/scripts/app-test/pr-alpine-install.func)" + else + export FUNCTIONS_FILE_PATH="$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/.github/workflows/scripts/app-test/pr-install.func)" + fi + + export CACHER="$APT_CACHER" + export CACHER_IP="$APT_CACHER_IP" + export tz="" + export DISABLEIPV6="$DISABLEIP6" + export APPLICATION="$APP" + export app="$NSAPP" + export PASSWORD="$PW" + export VERBOSE="$VERB" + export SSH_ROOT="${SSH}" + export SSH_AUTHORIZED_KEY + export CTID="$CT_ID" + export CTTYPE="$CT_TYPE" + export PCT_OSTYPE="$var_os" + export PCT_OSVERSION="$var_version" + export PCT_DISK_SIZE="$DISK_SIZE" + export tz="$timezone" + export PCT_OPTIONS=" + -features $FEATURES + -hostname $HN + -tags $TAGS + $SD + $NS + -net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU + -onboot 1 + -cores $CORE_COUNT + -memory $RAM_SIZE + -unprivileged $CT_TYPE + $PW + " + echo "Container ID: $CTID" + + + # This executes create_lxc.sh and creates the container and .conf file + bash /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/.github/workflows/scripts/app-test/pr-create-lxc.sh + + LXC_CONFIG=/etc/pve/lxc/${CTID}.conf + if [ "$CT_TYPE" == "0" ]; then + cat <>$LXC_CONFIG +# USB passthrough +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +lxc.cgroup2.devices.allow: c 188:* rwm +lxc.cgroup2.devices.allow: c 189:* rwm +lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir +lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file +EOF + fi + + if [ "$CT_TYPE" == "0" ]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +lxc.cgroup2.devices.allow: c 226:0 rwm +lxc.cgroup2.devices.allow: c 226:128 rwm +lxc.cgroup2.devices.allow: c 29:0 rwm +lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file +lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir +lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file +EOF + fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then + if [[ -e "/dev/dri/renderD128" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card0,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + else + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card1,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + fi + fi + fi + fi + # This starts the container and executes -install.sh + msg_info "Starting LXC Container" + pct start "$CTID" + msg_ok "Started LXC Container" + + if [[ ! -f "/root/actions-runner/_work/ProxmoxVE/ProxmoxVE/install/$var_install.sh" ]]; then + msg_error "No install script found for $APP" + exit 1 + fi + if [ "$var_os" == "alpine" ]; then + sleep 3 + pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories +http://dl-cdn.alpinelinux.org/alpine/latest-stable/main +http://dl-cdn.alpinelinux.org/alpine/latest-stable/community +EOF' + pct exec "$CTID" -- ash -c "apk add bash >/dev/null" + fi + lxc-attach -n "$CTID" -- bash -c "$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/install/$var_install.sh)" $var_install.sh + +} + +description(){ + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) + return +} diff --git a/.github/workflows/scripts/app-test/pr-create-lxc.sh b/.github/workflows/scripts/app-test/pr-create-lxc.sh new file mode 100644 index 000000000..6ca899cf4 --- /dev/null +++ b/.github/workflows/scripts/app-test/pr-create-lxc.sh @@ -0,0 +1,148 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Michel Roegl-Brunner (michelroegl-brunner) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +color() { + return +} +catch_errors() { + set -Eeuo pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + local error_message="Failure in line $line_number: exit code $exit_code: while executing command $command" + echo -e "\n$error_message" + exit 100 +} +verb_ip6() { + return +} + +msg_info() { + local msg="$1" + echo -ne "${msg}\n" +} + +msg_ok() { + local msg="$1" + echo -e "${msg}\n" +} + +msg_error() { + + local msg="$1" + echo -e "${msg}\n" +} + + +VALIDCT=$(pvesm status -content rootdir | awk 'NR>1') +if [ -z "$VALIDCT" ]; then + msg_error "Unable to detect a valid Container Storage location." + exit 1 +fi +VALIDTMP=$(pvesm status -content vztmpl | awk 'NR>1') +if [ -z "$VALIDTMP" ]; then + msg_error "Unable to detect a valid Template Storage location." + exit 1 +fi + +function select_storage() { + local CLASS=$1 + local CONTENT + local CONTENT_LABEL + case $CLASS in + container) + CONTENT='rootdir' + CONTENT_LABEL='Container' + ;; + template) + CONTENT='vztmpl' + CONTENT_LABEL='Container template' + ;; + *) false || { msg_error "Invalid storage class."; exit 201; };; + esac + + # This Queries all storage locations + local -a MENU + while read -r line; do + local TAG=$(echo $line | awk '{print $1}') + local TYPE=$(echo $line | awk '{printf "%-10s", $2}') + local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + local ITEM="Type: $TYPE Free: $FREE " + local OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + MENU+=("$TAG" "$ITEM" "OFF") + done < <(pvesm status -content $CONTENT | awk 'NR>1') + + # Select storage location + if [ $((${#MENU[@]}/3)) -eq 1 ]; then + printf ${MENU[0]} + else + msg_error "STORAGE ISSUES!" + exit 202 + fi +} + + + +[[ "${CTID:-}" ]] || { msg_error "You need to set 'CTID' variable."; exit 203; } +[[ "${PCT_OSTYPE:-}" ]] || { msg_error "You need to set 'PCT_OSTYPE' variable."; exit 204; } + +[ "$CTID" -ge "100" ] || { msg_error "ID cannot be less than 100."; exit 205; } + +if pct status $CTID &>/dev/null; then + echo -e "ID '$CTID' is already in use." + unset CTID + msg_error "Cannot use ID that is already in use." + exit 206 +fi + +TEMPLATE_STORAGE=$(select_storage template) || exit + +CONTAINER_STORAGE=$(select_storage container) || exit + +pveam update >/dev/null + + +TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} +mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) +[ ${#TEMPLATES[@]} -gt 0 ] || { msg_error "Unable to find a template when searching for '$TEMPLATE_SEARCH'."; exit 207; } +TEMPLATE="${TEMPLATES[-1]}" + +TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" + +if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE"; then + [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" + pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || + { msg_error "A problem occurred while downloading the LXC template."; exit 208; } +fi + + +grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >> /etc/subuid +grep -q "root:100000:65536" /etc/subgid || echo "root:100000:65536" >> /etc/subgid + +PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs "$CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}") + + + if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then + [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" + + + pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || + { msg_error "A problem occurred while re-downloading the LXC template."; exit 208; } + + + if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then + msg_error "A problem occurred while trying to create container after re-downloading template." + exit 200 + fi + fi + diff --git a/.github/workflows/scripts/app-test/pr-install.func b/.github/workflows/scripts/app-test/pr-install.func new file mode 100644 index 000000000..49195f365 --- /dev/null +++ b/.github/workflows/scripts/app-test/pr-install.func @@ -0,0 +1,95 @@ +#!/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 + +color() { + return +} + +SCRIPT_NAME="${BASH_SOURCE[0]:-unknown_script}" +catch_errors() { + set -Euoe pipefail + trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +} + +error_handler() { + local line_number="$1" + local command="$2" + local error_message="$SCRIPT_NAME: Failure in line $line_number while executing command '$command'" + echo -e "\n$error_message" + exit 300 +} + +verb_ip6() { + STD="silent" + silent() { + "$@" >/dev/null 2>&1 || error_handler "${BASH_LINENO[0]}" "$*" + } +} + +msg_info() { + local msg="$1" + echo -ne "${msg}\n" +} + +msg_ok() { + local msg="$1" + echo -e "${msg}\n" +} + +msg_error() { + + local msg="$1" + echo -e "${msg}\n" +} + RETRY_NUM=10 + RETRY_EVERY=3 +setting_up_container() { + sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen + locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1) + echo "LANG=${locale_line}" >/etc/default/locale + locale-gen >/dev/null + export LANG=${locale_line} + echo $tz >/etc/timezone + ln -sf /usr/share/zoneinfo/$tz /etc/localtime + + for ((i = RETRY_NUM; i > 0; i--)); do + if [ "$(hostname -I)" != "" ]; then + break + fi + echo 1>&2 -en "No Network! " + sleep $RETRY_EVERY + done + if [ "$(hostname -I)" = "" ]; then + echo 1>&2 -e "\nNo Network After $RETRY_NUM Tries" + echo -e "Check Network Settings" + exit 101 + fi + 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: $(hostname -I)" +} + +network_check() { + RESOLVEDIP=$(getent hosts github.com | awk '{ print $1 }') + if [[ -z "$RESOLVEDIP" ]]; then msg_error "DNS Lookup Failure"; else msg_ok "DNS Resolved github.com to $RESOLVEDIP"; fi + set -e +} + +update_os() { + msg_info "Updating Container OS" + apt-get update + apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + msg_ok "Updated Container OS" +} + +motd_ssh() { + return +} + +customize() { + return +} \ No newline at end of file diff --git a/.github/workflows/scripts/update-json.sh b/.github/workflows/scripts/update-json.sh new file mode 100644 index 000000000..b51df649f --- /dev/null +++ b/.github/workflows/scripts/update-json.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +FILE=$1 +TODAY=$(date -u +"%Y-%m-%d") + +if [[ -z "$FILE" ]]; then + echo "No file specified. Exiting." + exit 1 +fi + +if [[ ! -f "$FILE" ]]; then + echo "File $FILE not found. Exiting." + exit 1 +fi + +DATE_IN_JSON=$(jq -r '.date_created' "$FILE" 2>/dev/null || echo "") + +if [[ "$DATE_IN_JSON" != "$TODAY" ]]; then + jq --arg date "$TODAY" '.date_created = $date' "$FILE" > tmp.json && mv tmp.json "$FILE" +fi diff --git a/.github/workflows/update-json-date.yml b/.github/workflows/update-json-date.yml new file mode 100644 index 000000000..7e9c24973 --- /dev/null +++ b/.github/workflows/update-json-date.yml @@ -0,0 +1,131 @@ +name: Update JSON Date + +on: + push: + branches: + - main + paths: + - 'json/**.json' + workflow_dispatch: + +jobs: + update-app-files: + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + + steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Generate dynamic branch name + id: timestamp + run: echo "BRANCH_NAME=pr-update-json-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV + + - name: Set up GH_TOKEN + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "GH_TOKEN=${GH_TOKEN}" >> $GITHUB_ENV + + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 2 # Ensure we have the last two commits + + - name: Get Previous Commit + id: prev_commit + run: | + PREV_COMMIT=$(git rev-parse HEAD^) + echo "Previous commit: $PREV_COMMIT" + echo "prev_commit=$PREV_COMMIT" >> $GITHUB_ENV + + - name: Get Newly Added JSON Files + id: new_json_files + run: | + git diff --name-only --diff-filter=A ${{ env.prev_commit }} HEAD | grep '^json/.*\.json$' > new_files.txt || true + echo "New files detected:" + cat new_files.txt || echo "No new files." + + - name: Disable file mode changes + run: git config core.fileMode false + + - name: Set up Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Change JSON Date + id: change-json-date + run: | + current_date=$(date +"%Y-%m-%d") + while IFS= read -r file; do + # Skip empty lines + [[ -z "$file" ]] && continue + + if [[ -f "$file" ]]; then + echo "Processing $file..." + current_json_date=$(jq -r '.date_created // empty' "$file") + if [[ -z "$current_json_date" || "$current_json_date" != "$current_date" ]]; then + echo "Updating $file with date $current_date" + jq --arg date "$current_date" '.date_created = $date' "$file" > temp.json && mv temp.json "$file" + else + echo "Date in $file is already up to date." + fi + else + echo "Warning: File $file not found!" + fi + done < new_files.txt + rm new_files.txt + + - name: Check if there are any changes + run: | + echo "Checking for changes..." + git add -A # Untracked Dateien aufnehmen + git status + if git diff --cached --quiet; then + echo "No changes detected." + echo "changed=false" >> "$GITHUB_ENV" + else + echo "Changes detected:" + git diff --stat --cached + echo "changed=true" >> "$GITHUB_ENV" + fi + + # Step 7: Commit and create PR if changes exist + - name: Commit and create PR if changes exist + if: env.changed == 'true' + run: | + + + git commit -m "Update date in json" + git checkout -b ${{ env.BRANCH_NAME }} + git push origin ${{ env.BRANCH_NAME }} + + gh pr create --title "[core] update date in json" \ + --body "This PR is auto-generated by a GitHub Action to update the date in json." \ + --head ${{ env.BRANCH_NAME }} \ + --base main \ + --label "automated pr" + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + + - name: Approve pull request + if: env.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "${{ env.BRANCH_NAME }}" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi + + - name: No changes detected + if: env.changed == 'false' + run: echo "No changes to commit. Workflow completed successfully." diff --git a/.github/workflows/update_json_date.yml.bak b/.github/workflows/update_json_date.yml.bak deleted file mode 100644 index afaf8eda2..000000000 --- a/.github/workflows/update_json_date.yml.bak +++ /dev/null @@ -1,48 +0,0 @@ -name: Update JSON Date -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - list-files: - runs-on: ubuntu-latest - steps: - - name: Checkout PR Branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.ref }} - - - name: Fetch PR changes - run: | - git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git - git fetch fork ${{ github.event.pull_request.head.ref }}:pullreq - git checkout pullreq - - - name: Update JSON - id: changed-files - run: | - FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ') - echo "changed_files=${FILES}" - for FILE in $FILES; do - if [[ "$FILE" =~ /(.*)\.json ]]; then - NAME="${BASH_REMATCH[1]}" - else - echo "no new JSON in ${FILES}" - continue - fi - - JSON_FILE="json/${NAME}.json" - if [[ -f "$JSON_FILE" ]]; then - echo "Updating date_created in $JSON_FILE" - jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" - else - echo "JSON file $FILES not found" - fi - done - - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git diff --exit-code || git commit -am "Updating Dates in affected JSON files." - git push - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.editorconfig b/.vscode/.editorconfig similarity index 100% rename from .editorconfig rename to .vscode/.editorconfig diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..be834d99a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.func": "shellscript" + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d4eb65f81..2c8de4823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,541 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-02-23 + +### Changes + +### 🆕 New Scripts + +- New Script: Hev socks5 server [@miviro](https://github.com/miviro) ([#2454](https://github.com/community-scripts/ProxmoxVE/pull/2454)) +- New Script: bolt.diy [@tremor021](https://github.com/tremor021) ([#2528](https://github.com/community-scripts/ProxmoxVE/pull/2528)) + +### 🚀 Updated Scripts + +- Fix: Wireguard - Remove setting NAT as its already in PostUp/Down [@tremor021](https://github.com/tremor021) ([#2510](https://github.com/community-scripts/ProxmoxVE/pull/2510)) + +### 🌐 Website + +- Fix: Home Assistant Core - fixed wrong text in application description on website [@TMigue](https://github.com/TMigue) ([#2576](https://github.com/community-scripts/ProxmoxVE/pull/2576)) + +## 2025-02-22 + +### Changes + +### 🌐 Website + +- Fix a few broken icon links [@Snarkenfaugister](https://github.com/Snarkenfaugister) ([#2548](https://github.com/community-scripts/ProxmoxVE/pull/2548)) + +### 🧰 Maintenance + +- Fix: URL's in CONTRIBUTING.md [@bvdberg01](https://github.com/bvdberg01) ([#2552](https://github.com/community-scripts/ProxmoxVE/pull/2552)) + +## 2025-02-21 + +### Changes + +### 🚀 Updated Scripts + +- Add ZFS to Podman. Now it works on ZFS! [@jaminmc](https://github.com/jaminmc) ([#2526](https://github.com/community-scripts/ProxmoxVE/pull/2526)) +- Fix: Tianji - Downgrade Node [@MickLesk](https://github.com/MickLesk) ([#2530](https://github.com/community-scripts/ProxmoxVE/pull/2530)) + +### 🧰 Maintenance + +- [gh] General Cleanup & Moving Files / Folders [@MickLesk](https://github.com/MickLesk) ([#2532](https://github.com/community-scripts/ProxmoxVE/pull/2532)) + +## 2025-02-20 + +### Changes + +### 💥 Breaking Changes + +- Breaking: Actual Budget Script (HTTPS / DB Migration / New Structure) - Read Description [@MickLesk](https://github.com/MickLesk) ([#2496](https://github.com/community-scripts/ProxmoxVE/pull/2496)) +- Pihole & Unbound: Installation for Pihole V6 (read description) [@MickLesk](https://github.com/MickLesk) ([#2505](https://github.com/community-scripts/ProxmoxVE/pull/2505)) + +### ✨ New Scripts + +- New Script: Dolibarr [@tremor021](https://github.com/tremor021) ([#2502](https://github.com/community-scripts/ProxmoxVE/pull/2502)) + +### 🚀 Updated Scripts + +- Fix: Pingvin Share - Update not copying to correct directory [@tremor021](https://github.com/tremor021) ([#2521](https://github.com/community-scripts/ProxmoxVE/pull/2521)) +- WikiJS: Prepare for Using PostgreSQL [@MickLesk](https://github.com/MickLesk) ([#2516](https://github.com/community-scripts/ProxmoxVE/pull/2516)) + +### 🧰 Maintenance + +- [gh] better handling of labels [@MickLesk](https://github.com/MickLesk) ([#2517](https://github.com/community-scripts/ProxmoxVE/pull/2517)) + +## 2025-02-19 + +### Changes + +### 🚀 Updated Scripts + +- Fix: file replacement in Watcharr Update Script [@Clusters](https://github.com/Clusters) ([#2498](https://github.com/community-scripts/ProxmoxVE/pull/2498)) +- Fix: Kometa - fixed successful setup message and added info to json [@tremor021](https://github.com/tremor021) ([#2495](https://github.com/community-scripts/ProxmoxVE/pull/2495)) +- Fix: Actual Budget, add missing .env when updating [@MickLesk](https://github.com/MickLesk) ([#2494](https://github.com/community-scripts/ProxmoxVE/pull/2494)) + +## 2025-02-18 + +### Changes + +### ✨ New Scripts + +- New Script: Docmost [@MickLesk](https://github.com/MickLesk) ([#2472](https://github.com/community-scripts/ProxmoxVE/pull/2472)) + +### 🚀 Updated Scripts + +- Fix: SQL Server 2022 | GPG & Install [@MickLesk](https://github.com/MickLesk) ([#2476](https://github.com/community-scripts/ProxmoxVE/pull/2476)) +- Feature: PBS Bare Metal Installation - Allow Microcode [@MickLesk](https://github.com/MickLesk) ([#2477](https://github.com/community-scripts/ProxmoxVE/pull/2477)) +- Fix: MagicMirror force Node version and fix backups [@tremor021](https://github.com/tremor021) ([#2468](https://github.com/community-scripts/ProxmoxVE/pull/2468)) +- Update BunkerWeb scripts to latest NGINX and specs [@TheophileDiot](https://github.com/TheophileDiot) ([#2466](https://github.com/community-scripts/ProxmoxVE/pull/2466)) + +## 2025-02-17 + +### Changes + +### 💥 Breaking Changes + +- Zipline: Prepare for Version 4.0.0 [@MickLesk](https://github.com/MickLesk) ([#2455](https://github.com/community-scripts/ProxmoxVE/pull/2455)) + +### 🚀 Updated Scripts + +- Fix: Zipline increase SECRET to 42 chars [@V1d1o7](https://github.com/V1d1o7) ([#2444](https://github.com/community-scripts/ProxmoxVE/pull/2444)) + +## 2025-02-16 + +### Changes + +### 🚀 Updated Scripts + +- Fix: Typo in Ubuntu 24.10 VM Script [@PhoenixEmik](https://github.com/PhoenixEmik) ([#2430](https://github.com/community-scripts/ProxmoxVE/pull/2430)) +- Fix: Grist update no longer removes previous user data [@cfurrow](https://github.com/cfurrow) ([#2428](https://github.com/community-scripts/ProxmoxVE/pull/2428)) + +### 🌐 Website + +- Debian icon update [@bannert1337](https://github.com/bannert1337) ([#2433](https://github.com/community-scripts/ProxmoxVE/pull/2433)) +- Update Graylog icon [@bannert1337](https://github.com/bannert1337) ([#2434](https://github.com/community-scripts/ProxmoxVE/pull/2434)) + +## 2025-02-15 + +### Changes + +### 🚀 Updated Scripts + +- Setup cron in install/freshrss-install.sh [@zimmra](https://github.com/zimmra) ([#2412](https://github.com/community-scripts/ProxmoxVE/pull/2412)) +- Fix: Homarr update service files [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2416](https://github.com/community-scripts/ProxmoxVE/pull/2416)) +- Update MagicMirror install and update scripts [@tremor021](https://github.com/tremor021) ([#2409](https://github.com/community-scripts/ProxmoxVE/pull/2409)) + +### 🌐 Website + +- Fix RustDesk slug in json [@tremor021](https://github.com/tremor021) ([#2411](https://github.com/community-scripts/ProxmoxVE/pull/2411)) + +### 🧰 Maintenance + +- [GH] Update script-test Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2415](https://github.com/community-scripts/ProxmoxVE/pull/2415)) + +## 2025-02-14 + +### Changes + +### 🚀 Updated Scripts + +- Fix homarr [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2369](https://github.com/community-scripts/ProxmoxVE/pull/2369)) + +### 🌐 Website + +- RustDesk Server - Added configuration guide to json [@tremor021](https://github.com/tremor021) ([#2389](https://github.com/community-scripts/ProxmoxVE/pull/2389)) + +### 🧰 Maintenance + +- [gh] Update script-test.yml [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2399](https://github.com/community-scripts/ProxmoxVE/pull/2399)) +- [gh] Introducing new Issue Github Template Feature (Bug, Feature, Task) [@MickLesk](https://github.com/MickLesk) ([#2394](https://github.com/community-scripts/ProxmoxVE/pull/2394)) + +### 📡 API + +- [API]Add more enpoints to API [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2390](https://github.com/community-scripts/ProxmoxVE/pull/2390)) +- [API] Update api.func: Remove unwanted file creation [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2378](https://github.com/community-scripts/ProxmoxVE/pull/2378)) + +## 2025-02-13 + +### Changes + +### ✨ New Scripts + +- Re-Add: Pf2eTools [@MickLesk](https://github.com/MickLesk) ([#2336](https://github.com/community-scripts/ProxmoxVE/pull/2336)) +- New Script: Nx Witness [@MickLesk](https://github.com/MickLesk) ([#2350](https://github.com/community-scripts/ProxmoxVE/pull/2350)) +- New Script: RustDesk Server [@tremor021](https://github.com/tremor021) ([#2326](https://github.com/community-scripts/ProxmoxVE/pull/2326)) +- New Script: MinIO [@MickLesk](https://github.com/MickLesk) ([#2333](https://github.com/community-scripts/ProxmoxVE/pull/2333)) + +### 🚀 Updated Scripts + +- Missing ";" in ct/trilium.sh [@Scorpoon](https://github.com/Scorpoon) ([#2380](https://github.com/community-scripts/ProxmoxVE/pull/2380)) +- Fix: Element Synapse - Fixed server listening on both localhost and 0.0.0.0 [@tremor021](https://github.com/tremor021) ([#2376](https://github.com/community-scripts/ProxmoxVE/pull/2376)) +- [core] cleanup (remove # App Default Values) [@MickLesk](https://github.com/MickLesk) ([#2356](https://github.com/community-scripts/ProxmoxVE/pull/2356)) +- Fix: Kometa - Increase RAM and HDD resources [@tremor021](https://github.com/tremor021) ([#2367](https://github.com/community-scripts/ProxmoxVE/pull/2367)) +- [core] cleanup (remove base_settings & unneeded comments) [@MickLesk](https://github.com/MickLesk) ([#2351](https://github.com/community-scripts/ProxmoxVE/pull/2351)) +- Fix: Authentik Embedded Outpost Upgrade [@vidonnus](https://github.com/vidonnus) ([#2327](https://github.com/community-scripts/ProxmoxVE/pull/2327)) +- Fix HomeAsisstant LXC: Use the latest versions of runlike with --use-volume-id [@genehand](https://github.com/genehand) ([#2325](https://github.com/community-scripts/ProxmoxVE/pull/2325)) + +### 🌐 Website + +- Fix: Zoraxy - now shows application as updateable on the website [@tremor021](https://github.com/tremor021) ([#2352](https://github.com/community-scripts/ProxmoxVE/pull/2352)) +- Fix script category name text alignment in ScriptAccordion [@BramSuurdje](https://github.com/BramSuurdje) ([#2342](https://github.com/community-scripts/ProxmoxVE/pull/2342)) + +### 🧰 Maintenance + +- [gh] Remove unwanted output from script test workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2337](https://github.com/community-scripts/ProxmoxVE/pull/2337)) +- [gh] Workflow to change date on new json files [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2319](https://github.com/community-scripts/ProxmoxVE/pull/2319)) + +## 2025-02-12 + +### Changes + +### 💥 Breaking Changes + +- Frigate: Use Fixed Version 14 [@MickLesk](https://github.com/MickLesk) ([#2288](https://github.com/community-scripts/ProxmoxVE/pull/2288)) + +### ✨ New Scripts + +- New Script: Kometa [@tremor021](https://github.com/tremor021) ([#2281](https://github.com/community-scripts/ProxmoxVE/pull/2281)) +- New Script: Excalidraw [@tremor021](https://github.com/tremor021) ([#2285](https://github.com/community-scripts/ProxmoxVE/pull/2285)) +- New Script: Graylog [@tremor021](https://github.com/tremor021) ([#2270](https://github.com/community-scripts/ProxmoxVE/pull/2270)) +- New Script: TasmoCompiler [@tremor021](https://github.com/tremor021) ([#2235](https://github.com/community-scripts/ProxmoxVE/pull/2235)) +- New script: cross-seed [@jmatraszek](https://github.com/jmatraszek) ([#2186](https://github.com/community-scripts/ProxmoxVE/pull/2186)) + +### 🚀 Updated Scripts + +- FIX: Frigate - remove bad variable [@tremor021](https://github.com/tremor021) ([#2323](https://github.com/community-scripts/ProxmoxVE/pull/2323)) +- Fix: Kometa - Fix wrong web site address [@tremor021](https://github.com/tremor021) ([#2318](https://github.com/community-scripts/ProxmoxVE/pull/2318)) +- Fix: var_tags instead of TAGS in some CT's [@MickLesk](https://github.com/MickLesk) ([#2310](https://github.com/community-scripts/ProxmoxVE/pull/2310)) +- Update ubuntu2410-vm.sh: Fix typo in API call. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2305](https://github.com/community-scripts/ProxmoxVE/pull/2305)) +- Fix: Myspeed Installation (g++) [@MickLesk](https://github.com/MickLesk) ([#2308](https://github.com/community-scripts/ProxmoxVE/pull/2308)) +- Fix: Pingvin wrong variable used for version tracking [@alberanid](https://github.com/alberanid) ([#2302](https://github.com/community-scripts/ProxmoxVE/pull/2302)) +- Fix: SQL Server 2022 - remove unnecessary sudo [@tremor021](https://github.com/tremor021) ([#2282](https://github.com/community-scripts/ProxmoxVE/pull/2282)) +- fix: frigate pin version [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2296](https://github.com/community-scripts/ProxmoxVE/pull/2296)) +- Fix changedetection: Correct Browser install [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2277](https://github.com/community-scripts/ProxmoxVE/pull/2277)) +- Paperless-AI: add dependency "make" [@MickLesk](https://github.com/MickLesk) ([#2289](https://github.com/community-scripts/ProxmoxVE/pull/2289)) +- Fix: Typo OPNsense VM [@chpego](https://github.com/chpego) ([#2291](https://github.com/community-scripts/ProxmoxVE/pull/2291)) +- Fix: CraftyControler fix java default [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2286](https://github.com/community-scripts/ProxmoxVE/pull/2286)) + +### 🌐 Website + +- Fix: some jsons (debian instead Debian in OS) [@MickLesk](https://github.com/MickLesk) ([#2311](https://github.com/community-scripts/ProxmoxVE/pull/2311)) +- Website: Add After-Install Note for Ubuntu VM 22.04/24.04/24.10 and Debian VM [@MickLesk](https://github.com/MickLesk) ([#2307](https://github.com/community-scripts/ProxmoxVE/pull/2307)) +- Fix: duplicate 'VM' name in opnsense-vm.json [@nayzm](https://github.com/nayzm) ([#2293](https://github.com/community-scripts/ProxmoxVE/pull/2293)) + +## 2025-02-11 + +### Changes + +### ✨ New Scripts + +- New Script: Opnsense VM [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2097](https://github.com/community-scripts/ProxmoxVE/pull/2097)) +- New Script: Watcharr [@tremor021](https://github.com/tremor021) ([#2243](https://github.com/community-scripts/ProxmoxVE/pull/2243)) +- New Script: Suwayomi-Server [@tremor021](https://github.com/tremor021) ([#2139](https://github.com/community-scripts/ProxmoxVE/pull/2139)) + +### 🚀 Updated Scripts + +- Fix Photoprism: Add defaults.yml for CLI Tool [@MickLesk](https://github.com/MickLesk) ([#2261](https://github.com/community-scripts/ProxmoxVE/pull/2261)) +- Update Checkmk: include Patch versions in Release grepping [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2264](https://github.com/community-scripts/ProxmoxVE/pull/2264)) +- Fix: Apache Guacamole Version Crawling - only latest Version [@MickLesk](https://github.com/MickLesk) ([#2258](https://github.com/community-scripts/ProxmoxVE/pull/2258)) + +### 🌐 Website + +- Update Komodo icon [@bannert1337](https://github.com/bannert1337) ([#2263](https://github.com/community-scripts/ProxmoxVE/pull/2263)) + +### 🧰 Maintenance + +- Add Workflow to test Scripts [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2269](https://github.com/community-scripts/ProxmoxVE/pull/2269)) + +## 2025-02-10 + +### Changes + +### 💥 Breaking Changes + +- [Fix] Filebrowser - Add Static Path for DB [@MickLesk](https://github.com/MickLesk) ([#2207](https://github.com/community-scripts/ProxmoxVE/pull/2207)) + +### ✨ New Scripts + +- New Script: Prometheus Paperless-NGX Exporter [@andygrunwald](https://github.com/andygrunwald) ([#2153](https://github.com/community-scripts/ProxmoxVE/pull/2153)) +- New Script: Proxmox Mail Gateway [@thost96](https://github.com/thost96) ([#1906](https://github.com/community-scripts/ProxmoxVE/pull/1906)) +- New Script: FreshRSS [@bvdberg01](https://github.com/bvdberg01) ([#2226](https://github.com/community-scripts/ProxmoxVE/pull/2226)) +- New Script: Zitadel [@dave-yap](https://github.com/dave-yap) ([#2141](https://github.com/community-scripts/ProxmoxVE/pull/2141)) + +### 🚀 Updated Scripts + +- Feature: Automatic Deletion of choosen LXC's (lxc-delete.sh) [@MickLesk](https://github.com/MickLesk) ([#2228](https://github.com/community-scripts/ProxmoxVE/pull/2228)) +- Quickfix: Crafty-Controller remove unnecessary \ [@MickLesk](https://github.com/MickLesk) ([#2233](https://github.com/community-scripts/ProxmoxVE/pull/2233)) +- Fix: Crafty-Controller java versions and set default [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2199](https://github.com/community-scripts/ProxmoxVE/pull/2199)) +- Feature: Add optional Port for Filebrowser [@MickLesk](https://github.com/MickLesk) ([#2224](https://github.com/community-scripts/ProxmoxVE/pull/2224)) +- [core] Prevent double spinner [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2203](https://github.com/community-scripts/ProxmoxVE/pull/2203)) + +### 🌐 Website + +- Website: Fix Zitadel Logo & Created-Date [@MickLesk](https://github.com/MickLesk) ([#2217](https://github.com/community-scripts/ProxmoxVE/pull/2217)) +- Fixed URL typo zerotier-one.json [@Divaksh](https://github.com/Divaksh) ([#2206](https://github.com/community-scripts/ProxmoxVE/pull/2206)) +- evcc.json Clarify the config file location [@mvdw](https://github.com/mvdw) ([#2193](https://github.com/community-scripts/ProxmoxVE/pull/2193)) + +### 🧰 Maintenance + +- [gh]: Improve Workflows, Templates, Handling [@MickLesk](https://github.com/MickLesk) ([#2214](https://github.com/community-scripts/ProxmoxVE/pull/2214)) +- [core] Fix app-header workflow and add API [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2204](https://github.com/community-scripts/ProxmoxVE/pull/2204)) +- Fix: "read -p" does not support color formatting [@PhoenixEmik](https://github.com/PhoenixEmik) ([#2191](https://github.com/community-scripts/ProxmoxVE/pull/2191)) +- [API] Add API to vms [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2021](https://github.com/community-scripts/ProxmoxVE/pull/2021)) + +## 2025-02-09 + +### Changed + +### ✨ New Scripts + +- New Script: pbs_microcode.sh [@DonPablo1010](https://github.com/DonPablo1010) ([#2166](https://github.com/community-scripts/ProxmoxVE/pull/2166)) + +### 🚀 Updated Scripts + +- Keep the same hass_config volume for Home Assistant [@genehand](https://github.com/genehand) ([#2160](https://github.com/community-scripts/ProxmoxVE/pull/2160)) + +### 🌐 Website + +- Website: Set new Logo for Paperless-AI [@MickLesk](https://github.com/MickLesk) ([#2194](https://github.com/community-scripts/ProxmoxVE/pull/2194)) +- Fix: Barcode Buddy Logo & Title [@MickLesk](https://github.com/MickLesk) ([#2183](https://github.com/community-scripts/ProxmoxVE/pull/2183)) + +## 2025-02-08 + +### Changed + +### ✨ New Scripts + +- New script: Barcode Buddy [@bvdberg01](https://github.com/bvdberg01) ([#2167](https://github.com/community-scripts/ProxmoxVE/pull/2167)) + +### 🚀 Updated Scripts + +- Fix: Actualbudget - salvage the `.migrate` file when upgrading [@bourquep](https://github.com/bourquep) ([#2173](https://github.com/community-scripts/ProxmoxVE/pull/2173)) + +### 🌐 Website + +- Update cosmos.json description [@BramSuurdje](https://github.com/BramSuurdje) ([#2162](https://github.com/community-scripts/ProxmoxVE/pull/2162)) + +### 🧰 Maintenance + +- fix typos in CONTRIBUTOR_GUIDE [@thomashondema](https://github.com/thomashondema) ([#2174](https://github.com/community-scripts/ProxmoxVE/pull/2174)) + +## 2025-02-07 - 10.000 ⭐ + +### Changed + +### 💥 Breaking Changes + +- [core]: Enhance LXC template handling and improve error recovery [@MickLesk](https://github.com/MickLesk) ([#2128](https://github.com/community-scripts/ProxmoxVE/pull/2128)) + +### ✨ New Scripts + +- New Script: Cosmos [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2120](https://github.com/community-scripts/ProxmoxVE/pull/2120)) +- New Script: SearXNG [@MickLesk](https://github.com/MickLesk) ([#2123](https://github.com/community-scripts/ProxmoxVE/pull/2123)) + +### 🚀 Updated Scripts + +- Fix: Trillium Update Function & Harmonize Installation [@MickLesk](https://github.com/MickLesk) ([#2148](https://github.com/community-scripts/ProxmoxVE/pull/2148)) +- Fix: Zerotier-One fixed missing dependency [@tremor021](https://github.com/tremor021) ([#2147](https://github.com/community-scripts/ProxmoxVE/pull/2147)) +- Fix: Openwrt Version checking [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2137](https://github.com/community-scripts/ProxmoxVE/pull/2137)) +- Fix: PeaNUT Increase HDD & RAM Size [@MickLesk](https://github.com/MickLesk) ([#2127](https://github.com/community-scripts/ProxmoxVE/pull/2127)) + +### 🌐 Website + +- Fix: Zerotier json had a bad script path [@tremor021](https://github.com/tremor021) ([#2144](https://github.com/community-scripts/ProxmoxVE/pull/2144)) +- Fix: Cosmos logo doesnt display on website [@MickLesk](https://github.com/MickLesk) ([#2132](https://github.com/community-scripts/ProxmoxVE/pull/2132)) +- Fix JSON-Editor [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2121](https://github.com/community-scripts/ProxmoxVE/pull/2121)) + +### 🧰 Maintenance + +- [gh]: Following the trend - add star-history in readme [@MickLesk](https://github.com/MickLesk) ([#2135](https://github.com/community-scripts/ProxmoxVE/pull/2135)) + +## 2025-02-06 + +### Changed + +### ✨ New Scripts + +- New Script: Duplicati [@tremor021](https://github.com/tremor021) ([#2052](https://github.com/community-scripts/ProxmoxVE/pull/2052)) +- New Script: Paperless-AI [@MickLesk](https://github.com/MickLesk) ([#2093](https://github.com/community-scripts/ProxmoxVE/pull/2093)) +- New Script: Apache Tika [@andygrunwald](https://github.com/andygrunwald) ([#2079](https://github.com/community-scripts/ProxmoxVE/pull/2079)) + +### 🚀 Updated Scripts + +- Fix: Alpine IT-Tools Update [@MickLesk](https://github.com/MickLesk) ([#2067](https://github.com/community-scripts/ProxmoxVE/pull/2067)) +- Fix: Pocket-ID Change link to GH Repo [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2082](https://github.com/community-scripts/ProxmoxVE/pull/2082)) + +### 🌐 Website + +- Refactor JSON generator buttons layout for better alignment and consistency [@BramSuurdje](https://github.com/BramSuurdje) ([#2106](https://github.com/community-scripts/ProxmoxVE/pull/2106)) +- Website: Refactor Footer for improved layout and styling consistency [@BramSuurdje](https://github.com/BramSuurdje) ([#2107](https://github.com/community-scripts/ProxmoxVE/pull/2107)) +- Website: Update Footer for Json-Editor & Api [@MickLesk](https://github.com/MickLesk) ([#2100](https://github.com/community-scripts/ProxmoxVE/pull/2100)) +- Website: Add Download for json-editor [@MickLesk](https://github.com/MickLesk) ([#2099](https://github.com/community-scripts/ProxmoxVE/pull/2099)) +- Radicale: Provide additional information about configuration [@tremor021](https://github.com/tremor021) ([#2072](https://github.com/community-scripts/ProxmoxVE/pull/2072)) + +## 2025-02-05 + +### Changed + +### ✨ New Scripts + +- New Script: Zerotier Controller [@tremor021](https://github.com/tremor021) ([#1928](https://github.com/community-scripts/ProxmoxVE/pull/1928)) +- New Script: Radicale [@tremor021](https://github.com/tremor021) ([#1941](https://github.com/community-scripts/ProxmoxVE/pull/1941)) +- New Script: seelf [@tremor021](https://github.com/tremor021) ([#2023](https://github.com/community-scripts/ProxmoxVE/pull/2023)) +- New Script: Crafty-Controller [@CrazyWolf13](https://github.com/CrazyWolf13) ([#1926](https://github.com/community-scripts/ProxmoxVE/pull/1926)) +- New script: Koillection [@bvdberg01](https://github.com/bvdberg01) ([#2031](https://github.com/community-scripts/ProxmoxVE/pull/2031)) + +### 🚀 Updated Scripts + +- Bugfix: Jellyseerr pnpm Version [@vidonnus](https://github.com/vidonnus) ([#2033](https://github.com/community-scripts/ProxmoxVE/pull/2033)) +- Radicale: Fixed missing htpasswd flag [@tremor021](https://github.com/tremor021) ([#2065](https://github.com/community-scripts/ProxmoxVE/pull/2065)) +- [API] Update build.func / Improve error messages #2 [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2050](https://github.com/community-scripts/ProxmoxVE/pull/2050)) +- [API] Update create-lxc.sh / Improve error messages #1 [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2049](https://github.com/community-scripts/ProxmoxVE/pull/2049)) +- Feature: Element Synapse: add option to enter server name during LXC installation [@tremor021](https://github.com/tremor021) ([#2038](https://github.com/community-scripts/ProxmoxVE/pull/2038)) + +### 🌐 Website + +- Paperless NGX: Mark it as updateable [@andygrunwald](https://github.com/andygrunwald) ([#2070](https://github.com/community-scripts/ProxmoxVE/pull/2070)) +- Bump vitest from 2.1.6 to 2.1.9 in /frontend [@dependabot[bot]](https://github.com/dependabot[bot]) ([#2042](https://github.com/community-scripts/ProxmoxVE/pull/2042)) + +### 🧰 Maintenance + +- [API] Add API backend code [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2040](https://github.com/community-scripts/ProxmoxVE/pull/2040)) +- Update auto-update-app-headers.yml: Enable auto approval [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2057](https://github.com/community-scripts/ProxmoxVE/pull/2057)) + +## 2025-02-04 + +### Changed + +### 💥 Breaking Changes + +- Rename & Optimize: Proxmox Backup Server (Renaming & Update fix) [@thost96](https://github.com/thost96) ([#2012](https://github.com/community-scripts/ProxmoxVE/pull/2012)) + +### 🚀 Updated Scripts + +- Fix: Authentik - Remove deprecated GO-Remove in Footer [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2020](https://github.com/community-scripts/ProxmoxVE/pull/2020)) +- Fix: Authentik Fix wrong HDD Size [@thost96](https://github.com/thost96) ([#2001](https://github.com/community-scripts/ProxmoxVE/pull/2001)) +- Fix: Tandoor - node Version [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2010](https://github.com/community-scripts/ProxmoxVE/pull/2010)) +- Fix actual update - missing hidden files, downloaded release cleanup [@maciejmatczak](https://github.com/maciejmatczak) ([#2027](https://github.com/community-scripts/ProxmoxVE/pull/2027)) +- Fix Script: post-pmg-install.sh [@thost96](https://github.com/thost96) ([#2022](https://github.com/community-scripts/ProxmoxVE/pull/2022)) +- Fix Tianji: Add heap-space value for nodejs [@MickLesk](https://github.com/MickLesk) ([#2011](https://github.com/community-scripts/ProxmoxVE/pull/2011)) +- Fix: Ghost LXC - Use Node20 [@MickLesk](https://github.com/MickLesk) ([#2006](https://github.com/community-scripts/ProxmoxVE/pull/2006)) + +### 🌐 Website + +- [API] Massive update to api (remove many, optimize website for users) [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1990](https://github.com/community-scripts/ProxmoxVE/pull/1990)) + +### 🧰 Maintenance + +- Fix header comments on contributor templates [@tremor021](https://github.com/tremor021) ([#2029](https://github.com/community-scripts/ProxmoxVE/pull/2029)) +- [Fix]: Headername of Proxmox-Datacenter-Manager not in CamelCase [@MickLesk](https://github.com/MickLesk) ([#2017](https://github.com/community-scripts/ProxmoxVE/pull/2017)) +- [Fix] Header breaks at long title - add width for figlet github action [@MickLesk](https://github.com/MickLesk) ([#2015](https://github.com/community-scripts/ProxmoxVE/pull/2015)) + +## 2025-02-03 + +### Changed + +### ✨ New Scripts + +- New Script: Element Synapse [@tremor021](https://github.com/tremor021) ([#1955](https://github.com/community-scripts/ProxmoxVE/pull/1955)) +- New Script: Privatebin [@opastorello](https://github.com/opastorello) ([#1925](https://github.com/community-scripts/ProxmoxVE/pull/1925)) + +### 🚀 Updated Scripts + +- Fix: Monica Install with nodejs [@MickLesk](https://github.com/MickLesk) ([#1996](https://github.com/community-scripts/ProxmoxVE/pull/1996)) +- Element Synapse sed fix [@tremor021](https://github.com/tremor021) ([#1994](https://github.com/community-scripts/ProxmoxVE/pull/1994)) +- Fix Hoarder corepack install/update error [@vhsdream](https://github.com/vhsdream) ([#1957](https://github.com/community-scripts/ProxmoxVE/pull/1957)) +- [Security & Maintenance] Update NodeJS Repo to 22 for new Installs [@MickLesk](https://github.com/MickLesk) ([#1984](https://github.com/community-scripts/ProxmoxVE/pull/1984)) +- [Standardization]: Same Setup for GoLang on all LXC's & Clear Tarball [@MickLesk](https://github.com/MickLesk) ([#1977](https://github.com/community-scripts/ProxmoxVE/pull/1977)) +- Feature: urbackupserver Include fuse&nesting features during install [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1968](https://github.com/community-scripts/ProxmoxVE/pull/1968)) +- Fix: MSSQL-Server: Better gpg handling [@MickLesk](https://github.com/MickLesk) ([#1962](https://github.com/community-scripts/ProxmoxVE/pull/1962)) +- Fix: Grist ran into a heap space during the update [@MickLesk](https://github.com/MickLesk) ([#1964](https://github.com/community-scripts/ProxmoxVE/pull/1964)) +- Fix: FS-Trim Cancel / Error-Button [@MickLesk](https://github.com/MickLesk) ([#1965](https://github.com/community-scripts/ProxmoxVE/pull/1965)) +- Fix: Increase HDD Space for Hoarder [@MickLesk](https://github.com/MickLesk) ([#1970](https://github.com/community-scripts/ProxmoxVE/pull/1970)) +- Feature: Clean Orphan LVM without CEPH [@MickLesk](https://github.com/MickLesk) ([#1974](https://github.com/community-scripts/ProxmoxVE/pull/1974)) +- [Standardization] Fix Spelling for "Setup Python3" [@MickLesk](https://github.com/MickLesk) ([#1975](https://github.com/community-scripts/ProxmoxVE/pull/1975)) + +### 🌐 Website + +- [Website] update data/page.tsx [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1969](https://github.com/community-scripts/ProxmoxVE/pull/1969)) +- Prometheus Proxmox VE Exporter: Set correct website slug [@andygrunwald](https://github.com/andygrunwald) ([#1961](https://github.com/community-scripts/ProxmoxVE/pull/1961)) + +### 🧰 Maintenance + +- [API] Remove Hostname, Verbose, SSH and TAGS [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1967](https://github.com/community-scripts/ProxmoxVE/pull/1967)) + +## 2025-02-02 + +### Changed + +### 🚀 Updated Scripts + +- Prometheus PVE Exporter: Add `--default-timeout=300` to pip install commands [@andygrunwald](https://github.com/andygrunwald) ([#1950](https://github.com/community-scripts/ProxmoxVE/pull/1950)) +- fix z2m update function to 2.1.0 [@MickLesk](https://github.com/MickLesk) ([#1938](https://github.com/community-scripts/ProxmoxVE/pull/1938)) + +### 🧰 Maintenance + +- VSCode: Add Shellscript Syntax highlighting for *.func files [@andygrunwald](https://github.com/andygrunwald) ([#1948](https://github.com/community-scripts/ProxmoxVE/pull/1948)) + +## 2025-02-01 + +### Changed + +### 💥 Breaking Changes + +- [DCMA] Delete scripts 5etools and pf2etools - Copyright abuse [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1922](https://github.com/community-scripts/ProxmoxVE/pull/1922)) + +### ✨ New Scripts + +- New script: Baïkal [@bvdberg01](https://github.com/bvdberg01) ([#1913](https://github.com/community-scripts/ProxmoxVE/pull/1913)) + +### 🚀 Updated Scripts + +- Bug fix: Paymenter [@opastorello](https://github.com/opastorello) ([#1917](https://github.com/community-scripts/ProxmoxVE/pull/1917)) + +## 2025-01-31 + +### Changed + +### ✨ New Scripts + +- New Script: Paymenter [@opastorello](https://github.com/opastorello) ([#1827](https://github.com/community-scripts/ProxmoxVE/pull/1827)) + +### 🚀 Updated Scripts + +- [Fix] Alpine-IT-Tools, add missing ssh package for root ssh access [@CrazyWolf13](https://github.com/CrazyWolf13) ([#1891](https://github.com/community-scripts/ProxmoxVE/pull/1891)) +- [Fix] Change Download of Trilium after there change the tag/release logic [@MickLesk](https://github.com/MickLesk) ([#1892](https://github.com/community-scripts/ProxmoxVE/pull/1892)) + +### 🌐 Website + +- [Website] Enhance DataFetcher with better UI components and add reactive data fetching intervals [@BramSuurdje](https://github.com/BramSuurdje) ([#1902](https://github.com/community-scripts/ProxmoxVE/pull/1902)) +- [Website] Update /data/page.tsx [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1900](https://github.com/community-scripts/ProxmoxVE/pull/1900)) + +## 2025-01-30 + +### Changed + +### ✨ New Scripts + +- New Script: IT-Tools [@nicedevil007](https://github.com/nicedevil007) ([#1862](https://github.com/community-scripts/ProxmoxVE/pull/1862)) +- New Script: Mattermost [@Dracentis](https://github.com/Dracentis) ([#1856](https://github.com/community-scripts/ProxmoxVE/pull/1856)) + +### 🚀 Updated Scripts + +- Optimize PVE Manager Version-Check [@MickLesk](https://github.com/MickLesk) ([#1866](https://github.com/community-scripts/ProxmoxVE/pull/1866)) + +### 🌐 Website + +- [API] Update build.func to set the status message correct [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1878](https://github.com/community-scripts/ProxmoxVE/pull/1878)) +- [Website] Update /data/page.tsx [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1876](https://github.com/community-scripts/ProxmoxVE/pull/1876)) +- Fix IT-Tools Website Entry (Default | Alpine) [@MickLesk](https://github.com/MickLesk) ([#1869](https://github.com/community-scripts/ProxmoxVE/pull/1869)) +- fix: remove rounded styles from command primitive [@steveiliop56](https://github.com/steveiliop56) ([#1840](https://github.com/community-scripts/ProxmoxVE/pull/1840)) + +### 🧰 Maintenance + +- [API] Update build.func: add function to see if a script failed or not [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1874](https://github.com/community-scripts/ProxmoxVE/pull/1874)) + ## 2025-01-29 ### Changed diff --git a/api/.env.example b/api/.env.example new file mode 100644 index 000000000..fc7bdbb59 --- /dev/null +++ b/api/.env.example @@ -0,0 +1,5 @@ +MONGO_USER= +MONGO_PASSWORD= +MONGO_IP= +MONGO_PORT= +MONGO_DATABASE= \ No newline at end of file diff --git a/api/go.mod b/api/go.mod new file mode 100644 index 000000000..0297b1a4f --- /dev/null +++ b/api/go.mod @@ -0,0 +1,32 @@ +module proxmox-api + +go 1.23.2 + +require go.mongodb.org/mongo-driver v1.17.2 + +require ( + filippo.io/edwards25519 v1.1.0 // indirect + github.com/go-sql-driver/mysql v1.8.1 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/gorilla/mux v1.8.1 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.7.2 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/joho/godotenv v1.5.1 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/montanaflynn/stats v0.7.1 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/scram v1.1.2 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect + github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect + golang.org/x/crypto v0.32.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/text v0.21.0 // indirect + gorm.io/driver/mysql v1.5.7 // indirect + gorm.io/driver/postgres v1.5.11 // indirect + gorm.io/gorm v1.25.12 // indirect +) diff --git a/api/go.sum b/api/go.sum new file mode 100644 index 000000000..ea649ff6b --- /dev/null +++ b/api/go.sum @@ -0,0 +1,83 @@ +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.2 h1:mLoDLV6sonKlvjIEsV56SkWNCnuNv531l94GaIzO+XI= +github.com/jackc/pgx/v5 v5.7.2/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= +github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= +github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.mongodb.org/mongo-driver v1.17.2 h1:gvZyk8352qSfzyZ2UMWcpDpMSGEr1eqE4T793SqyhzM= +go.mongodb.org/mongo-driver v1.17.2/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= +golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo= +gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= +gorm.io/driver/postgres v1.5.11 h1:ubBVAfbKEUld/twyKZ0IYn9rSQh448EdelLYk9Mv314= +gorm.io/driver/postgres v1.5.11/go.mod h1:DX3GReXH+3FPWGrrgffdvCk3DQ1dwDPdmbenSkweRGI= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8= +gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= diff --git a/api/main.go b/api/main.go new file mode 100644 index 000000000..0227bf11e --- /dev/null +++ b/api/main.go @@ -0,0 +1,450 @@ +// Copyright (c) 2021-2025 community-scripts ORG +// Author: Michel Roegl-Brunner (michelroegl-brunner) +// License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +package main + +import ( + "context" + "encoding/json" + "fmt" + "log" + "net/http" + "os" + "strconv" + "time" + + "github.com/gorilla/mux" + "github.com/joho/godotenv" + "github.com/rs/cors" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" +) + +var client *mongo.Client +var collection *mongo.Collection + +func loadEnv() { + if err := godotenv.Load(); err != nil { + log.Fatal("Error loading .env file") + } +} + +// DataModel represents a single document in MongoDB +type DataModel struct { + ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` + CT_TYPE uint `json:"ct_type" bson:"ct_type"` + DISK_SIZE float32 `json:"disk_size" bson:"disk_size"` + CORE_COUNT uint `json:"core_count" bson:"core_count"` + RAM_SIZE uint `json:"ram_size" bson:"ram_size"` + OS_TYPE string `json:"os_type" bson:"os_type"` + OS_VERSION string `json:"os_version" bson:"os_version"` + DISABLEIP6 string `json:"disableip6" bson:"disableip6"` + NSAPP string `json:"nsapp" bson:"nsapp"` + METHOD string `json:"method" bson:"method"` + CreatedAt time.Time `json:"created_at" bson:"created_at"` + PVEVERSION string `json:"pve_version" bson:"pve_version"` + STATUS string `json:"status" bson:"status"` + RANDOM_ID string `json:"random_id" bson:"random_id"` + TYPE string `json:"type" bson:"type"` + ERROR string `json:"error" bson:"error"` +} + +type StatusModel struct { + RANDOM_ID string `json:"random_id" bson:"random_id"` + ERROR string `json:"error" bson:"error"` + STATUS string `json:"status" bson:"status"` +} + +type CountResponse struct { + TotalEntries int64 `json:"total_entries"` + StatusCount map[string]int64 `json:"status_count"` + NSAPPCount map[string]int64 `json:"nsapp_count"` +} + +// ConnectDatabase initializes the MongoDB connection +func ConnectDatabase() { + loadEnv() + + mongoURI := fmt.Sprintf("mongodb://%s:%s@%s:%s", + os.Getenv("MONGO_USER"), + os.Getenv("MONGO_PASSWORD"), + os.Getenv("MONGO_IP"), + os.Getenv("MONGO_PORT")) + + database := os.Getenv("MONGO_DATABASE") + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + var err error + client, err = mongo.Connect(ctx, options.Client().ApplyURI(mongoURI)) + if err != nil { + log.Fatal("Failed to connect to MongoDB!", err) + } + collection = client.Database(database).Collection("data_models") + fmt.Println("Connected to MongoDB on 10.10.10.18") +} + +// UploadJSON handles API requests and stores data as a document in MongoDB +func UploadJSON(w http.ResponseWriter, r *http.Request) { + var input DataModel + + if err := json.NewDecoder(r.Body).Decode(&input); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + input.CreatedAt = time.Now() + + _, err := collection.InsertOne(context.Background(), input) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + log.Println("Received data:", input) + w.WriteHeader(http.StatusCreated) + json.NewEncoder(w).Encode(map[string]string{"message": "Data saved successfully"}) +} + +// UpdateStatus updates the status of a record based on RANDOM_ID +func UpdateStatus(w http.ResponseWriter, r *http.Request) { + var input StatusModel + + if err := json.NewDecoder(r.Body).Decode(&input); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + filter := bson.M{"random_id": input.RANDOM_ID} + update := bson.M{"$set": bson.M{"status": input.STATUS, "error": input.ERROR}} + + _, err := collection.UpdateOne(context.Background(), filter, update) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + log.Println("Updated data:", input) + w.WriteHeader(http.StatusOK) + json.NewEncoder(w).Encode(map[string]string{"message": "Record updated successfully"}) +} + +// GetDataJSON fetches all data from MongoDB +func GetDataJSON(w http.ResponseWriter, r *http.Request) { + var records []DataModel + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + cursor, err := collection.Find(ctx, bson.M{}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + records = append(records, record) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(records) +} +func GetPaginatedData(w http.ResponseWriter, r *http.Request) { + page, _ := strconv.Atoi(r.URL.Query().Get("page")) + limit, _ := strconv.Atoi(r.URL.Query().Get("limit")) + if page < 1 { + page = 1 + } + if limit < 1 { + limit = 10 + } + skip := (page - 1) * limit + var records []DataModel + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + options := options.Find().SetSkip(int64(skip)).SetLimit(int64(limit)) + cursor, err := collection.Find(ctx, bson.M{}, options) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + records = append(records, record) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(records) +} + +func GetSummary(w http.ResponseWriter, r *http.Request) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + totalCount, err := collection.CountDocuments(ctx, bson.M{}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + statusCount := make(map[string]int64) + nsappCount := make(map[string]int64) + + pipeline := []bson.M{ + {"$group": bson.M{"_id": "$status", "count": bson.M{"$sum": 1}}}, + } + cursor, err := collection.Aggregate(ctx, pipeline) + if err == nil { + for cursor.Next(ctx) { + var result struct { + ID string `bson:"_id"` + Count int64 `bson:"count"` + } + if err := cursor.Decode(&result); err == nil { + statusCount[result.ID] = result.Count + } + } + } + + pipeline = []bson.M{ + {"$group": bson.M{"_id": "$nsapp", "count": bson.M{"$sum": 1}}}, + } + cursor, err = collection.Aggregate(ctx, pipeline) + if err == nil { + for cursor.Next(ctx) { + var result struct { + ID string `bson:"_id"` + Count int64 `bson:"count"` + } + if err := cursor.Decode(&result); err == nil { + nsappCount[result.ID] = result.Count + } + } + } + + response := CountResponse{ + TotalEntries: totalCount, + StatusCount: statusCount, + NSAPPCount: nsappCount, + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(response) +} + +func GetByNsapp(w http.ResponseWriter, r *http.Request) { + nsapp := r.URL.Query().Get("nsapp") + var records []DataModel + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + cursor, err := collection.Find(ctx, bson.M{"nsapp": nsapp}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + records = append(records, record) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(records) +} + +func GetByDateRange(w http.ResponseWriter, r *http.Request) { + + startDate := r.URL.Query().Get("start_date") + endDate := r.URL.Query().Get("end_date") + + if startDate == "" || endDate == "" { + http.Error(w, "Both start_date and end_date are required", http.StatusBadRequest) + return + } + + start, err := time.Parse("2006-01-02T15:04:05.999999+00:00", startDate+"T00:00:00+00:00") + if err != nil { + http.Error(w, "Invalid start_date format", http.StatusBadRequest) + return + } + + end, err := time.Parse("2006-01-02T15:04:05.999999+00:00", endDate+"T23:59:59+00:00") + if err != nil { + http.Error(w, "Invalid end_date format", http.StatusBadRequest) + return + } + + var records []DataModel + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + cursor, err := collection.Find(ctx, bson.M{ + "created_at": bson.M{ + "$gte": start, + "$lte": end, + }, + }) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + records = append(records, record) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(records) +} +func GetByStatus(w http.ResponseWriter, r *http.Request) { + status := r.URL.Query().Get("status") + var records []DataModel + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + cursor, err := collection.Find(ctx, bson.M{"status": status}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + records = append(records, record) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(records) +} + +func GetByOS(w http.ResponseWriter, r *http.Request) { + osType := r.URL.Query().Get("os_type") + osVersion := r.URL.Query().Get("os_version") + var records []DataModel + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + cursor, err := collection.Find(ctx, bson.M{"os_type": osType, "os_version": osVersion}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + records = append(records, record) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(records) +} + +func GetErrors(w http.ResponseWriter, r *http.Request) { + errorCount := make(map[string]int) + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + cursor, err := collection.Find(ctx, bson.M{"error": bson.M{"$ne": ""}}) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer cursor.Close(ctx) + + for cursor.Next(ctx) { + var record DataModel + if err := cursor.Decode(&record); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + if record.ERROR != "" { + errorCount[record.ERROR]++ + } + } + + type ErrorCountResponse struct { + Error string `json:"error"` + Count int `json:"count"` + } + + var errorCounts []ErrorCountResponse + for err, count := range errorCount { + errorCounts = append(errorCounts, ErrorCountResponse{ + Error: err, + Count: count, + }) + } + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(struct { + ErrorCounts []ErrorCountResponse `json:"error_counts"` + }{ + ErrorCounts: errorCounts, + }) +} + +func main() { + ConnectDatabase() + + router := mux.NewRouter() + router.HandleFunc("/upload", UploadJSON).Methods("POST") + router.HandleFunc("/upload/updatestatus", UpdateStatus).Methods("POST") + router.HandleFunc("/data/json", GetDataJSON).Methods("GET") + router.HandleFunc("/data/paginated", GetPaginatedData).Methods("GET") + router.HandleFunc("/data/summary", GetSummary).Methods("GET") + router.HandleFunc("/data/nsapp", GetByNsapp).Methods("GET") + router.HandleFunc("/data/date", GetByDateRange).Methods("GET") + router.HandleFunc("/data/status", GetByStatus).Methods("GET") + router.HandleFunc("/data/os", GetByOS).Methods("GET") + router.HandleFunc("/data/errors", GetErrors).Methods("GET") + + c := cors.New(cors.Options{ + AllowedOrigins: []string{"*"}, + AllowedMethods: []string{"GET", "POST"}, + AllowedHeaders: []string{"Content-Type", "Authorization"}, + AllowCredentials: true, + }) + + handler := c.Handler(router) + + fmt.Println("Server running on port 8080") + log.Fatal(http.ListenAndServe(":8080", handler)) +} diff --git a/ct/2fauth.sh b/ct/2fauth.sh index b17b26e80..503f2f917 100644 --- a/ct/2fauth.sh +++ b/ct/2fauth.sh @@ -5,9 +5,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://docs.2fauth.app/ -# App Default Values APP="2FAuth" -TAGS="2fa;authenticator" +var_tags="2fa;authenticator" var_cpu="1" var_ram="512" var_disk="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 75a01044f..e3675fe13 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://actualbudget.org/ -# App Default Values APP="Actual Budget" var_tags="finance" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -31,43 +26,91 @@ function update_script() { if [[ ! -d /opt/actualbudget ]]; then msg_error "No ${APP} Installation Found!" - exit + exit 1 fi - - RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + + RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | \ + grep "tag_name" | awk -F '"' '{print substr($4, 2)}') + if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then msg_info "Stopping ${APP}" systemctl stop actualbudget msg_ok "${APP} Stopped" - + msg_info "Updating ${APP} to ${RELEASE}" cd /tmp - wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz + wget -q "https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz" + mv /opt/actualbudget /opt/actualbudget_bak - mkdir -p /opt/actualbudget/ - tar -xzf v${RELEASE}.tar.gz >/dev/null 2>&1 - mv *ctual-server-*/* /opt/actualbudget - rm -rf /opt/actualbudget/.env - mv /opt/actualbudget_bak/.env /opt/actualbudget - mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files + tar -xzf "v${RELEASE}.tar.gz" &>/dev/null + mv *ctual-server-* /opt/actualbudget + + mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config} + for dir in server-files .migrate user-files migrations; do + if [[ -d /opt/actualbudget_bak/$dir ]]; then + mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ 2>/dev/null || true + fi + done + if [[ -f /opt/actualbudget-data/migrate/.migrations ]]; then + sed -i 's/null/1732656575219/g' /opt/actualbudget-data/migrate/.migrations + sed -i 's/null/1732656575220/g' /opt/actualbudget-data/migrate/.migrations + fi + if [[ -f /opt/actualbudget/server-files/account.sqlite ]] && [[ ! -f /opt/actualbudget-data/server-files/account.sqlite ]]; then + mv /opt/actualbudget/server-files/account.sqlite /opt/actualbudget-data/server-files/account.sqlite + fi + + if [[ -f /opt/actualbudget_bak/.env ]]; then + mv /opt/actualbudget_bak/.env /opt/actualbudget-data/.env + else + cat < /opt/actualbudget-data/.env +ACTUAL_UPLOAD_DIR=/opt/actualbudget-data/upload +ACTUAL_DATA_DIR=/opt/actualbudget-data +ACTUAL_SERVER_FILES_DIR=/opt/actualbudget-data/server-files +ACTUAL_USER_FILES=/opt/actualbudget-data/user-files +PORT=5006 +ACTUAL_TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1/32,::1/128,fc00::/7" +ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key +ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt +EOF + fi cd /opt/actualbudget yarn install &>/dev/null - echo "${RELEASE}" >/opt/actualbudget_version.txt + echo "${RELEASE}" > /opt/actualbudget_version.txt msg_ok "Updated ${APP}" - + msg_info "Starting ${APP}" + cat < /etc/systemd/system/actualbudget.service +[Unit] +Description=Actual Budget Service +After=network.target + +[Service] +Type=simple +User=root +Group=root +WorkingDirectory=/opt/actualbudget +EnvironmentFile=/opt/actualbudget-data/.env +ExecStart=/usr/bin/yarn start +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF + + systemctl daemon-reload systemctl start actualbudget msg_ok "Started ${APP}" - + msg_info "Cleaning Up" rm -rf /opt/actualbudget_bak - rm -rf /tmp/actual-server.tar.gz + rm -rf "/tmp/v${RELEASE}.tar.gz" msg_ok "Cleaned" msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi - exit + exit 0 } start @@ -77,4 +120,4 @@ 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}:5006${CL}" +echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:5006${CL}" diff --git a/ct/adguard.sh b/ct/adguard.sh index ae04a8325..b33676d01 100644 --- a/ct/adguard.sh +++ b/ct/adguard.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://adguard.com/ -# App Default Values APP="Adguard" var_tags="adblock" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/adventurelog.sh b/ct/adventurelog.sh index 03d6704ad..0b05d6055 100644 --- a/ct/adventurelog.sh +++ b/ct/adventurelog.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://adventurelog.app/ -# App Default Values APP="AdventureLog" var_tags="traveling" var_disk="7" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index a05baec4d..23f5a7695 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.ispyconnect.com/ -# App Default Values APP="AgentDVR" var_tags="dvr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="22.04" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/alpine-docker.sh b/ct/alpine-docker.sh index ce4d1f7f1..50ee8fbb4 100644 --- a/ct/alpine-docker.sh +++ b/ct/alpine-docker.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://www.docker.com/ -# App Default Values APP="Alpine-Docker" var_tags="docker;alpine" var_cpu="1" @@ -14,11 +14,7 @@ var_os="alpine" var_version="3.21" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/alpine-grafana.sh b/ct/alpine-grafana.sh index d921a29fc..70f209df5 100644 --- a/ct/alpine-grafana.sh +++ b/ct/alpine-grafana.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://grafana.com/ -# App Default Values APP="Alpine-Grafana" var_tags="alpine;monitoring" var_cpu="1" @@ -14,11 +14,7 @@ var_os="alpine" var_version="3.21" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/alpine-it-tools.sh b/ct/alpine-it-tools.sh new file mode 100644 index 000000000..d24f267f6 --- /dev/null +++ b/ct/alpine-it-tools.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: nicedevil007 (NiceDevil) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://it-tools.tech/ + +APP="Alpine-IT-Tools" +var_tags="alpine;development" +var_cpu="1" +var_ram="256" +var_disk="0.2" +var_os="alpine" +var_version="3.21" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + +if [ ! -d /usr/share/nginx/html ]; then + msg_error "No ${APP} Installation Found!" + exit 1 +fi + +RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4) +if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ] || [ ! -f /opt/${APP}_version.txt ]; then + DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" + msg_info "Updating ${APP} LXC" + curl -fsSL -o it-tools.zip "$DOWNLOAD_URL" + mkdir -p /usr/share/nginx/html + rm -rf /usr/share/nginx/html/* + unzip -q it-tools.zip -d /tmp/it-tools + cp -r /tmp/it-tools/dist/* /usr/share/nginx/html + rm -rf /tmp/it-tools + rm -f it-tools.zip + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi + +exit 0 +} + +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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/ct/alpine-nextcloud.sh b/ct/alpine-nextcloud.sh index 4e03088c2..0335cea69 100644 --- a/ct/alpine-nextcloud.sh +++ b/ct/alpine-nextcloud.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://nextcloud.com/ -# App Default Values APP="Alpine-Nextcloud" var_tags="alpine;cloud" var_cpu="2" @@ -14,11 +14,7 @@ var_os="alpine" var_version="3.21" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors diff --git a/ct/alpine-vaultwarden.sh b/ct/alpine-vaultwarden.sh index 447a6d228..b70401595 100644 --- a/ct/alpine-vaultwarden.sh +++ b/ct/alpine-vaultwarden.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://github.com/dani-garcia/vaultwarden -# App Default Values APP="Alpine-Vaultwarden" var_tags="alpine;vault" var_cpu="1" @@ -14,11 +14,7 @@ var_os="alpine" var_version="3.21" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/alpine-zigbee2mqtt.sh b/ct/alpine-zigbee2mqtt.sh index 54f75980c..ab84bf98f 100644 --- a/ct/alpine-zigbee2mqtt.sh +++ b/ct/alpine-zigbee2mqtt.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://www.zigbee2mqtt.io/ -# App Default Values APP="Alpine-Zigbee2MQTT" var_tags="alpine;zigbee;mqtt;smarthome" var_disk="0.3" @@ -14,11 +14,7 @@ var_os="alpine" var_version="3.21" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/alpine.sh b/ct/alpine.sh index f6d93aef8..e6b7a4167 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2024 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://alpinelinux.org/ -# App Default Values APP="Alpine" var_tags="os;alpine" var_cpu="1" @@ -14,11 +14,7 @@ var_os="alpine" var_version="3.21" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/apache-cassandra.sh b/ct/apache-cassandra.sh index a094cbf57..0a11f2201 100644 --- a/ct/apache-cassandra.sh +++ b/ct/apache-cassandra.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://cassandra.apache.org/_/index.html -# App Default Values APP="Apache-Cassandra" var_tags="database;NoSQL" var_cpu="1" @@ -16,11 +15,7 @@ var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/apache-couchdb.sh b/ct/apache-couchdb.sh index 4ef45a44d..e6e6e168e 100644 --- a/ct/apache-couchdb.sh +++ b/ct/apache-couchdb.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://couchdb.apache.org/ -# App Default Values APP="Apache-CouchDB" var_tags="database" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/apache-guacamole.sh b/ct/apache-guacamole.sh index 36f8698b8..9379aa876 100644 --- a/ct/apache-guacamole.sh +++ b/ct/apache-guacamole.sh @@ -5,9 +5,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/refs/heads/ # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://guacamole.apache.org/ -#App Default Values APP="Apache-Guacamole" -TAGS="webserver;remote" +var_tags="webserver;remote" var_disk="4" var_cpu="1" var_ram="2048" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/apache-tika.sh b/ct/apache-tika.sh new file mode 100755 index 000000000..98dbf266e --- /dev/null +++ b/ct/apache-tika.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Andy Grunwald (andygrunwald) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/apache/tika/ + +APP="Apache-Tika" +var_tags="document" +var_cpu="1" +var_ram="2048" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/systemd/system/apache-tika.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE="$(wget -qO- https://dlcdn.apache.org/tika/ | grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1)" + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP}" + systemctl stop apache-tika + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt/apache-tika + wget -q "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar" + mv --force tika-server-standard.jar tika-server-standard-prev-version.jar + mv tika-server-standard-${RELEASE}.jar tika-server-standard.jar + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to v${RELEASE}" + + msg_info "Starting ${APP}" + systemctl start apache-tika + msg_ok "Started ${APP}" + msg_info "Cleaning Up" + rm -rf /opt/apache-tika/tika-server-standard-prev-version.jar + msg_ok "Cleanup Completed" + 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}:9998${CL}" \ No newline at end of file diff --git a/ct/apt-cacher-ng.sh b/ct/apt-cacher-ng.sh index 0278de87e..eb91296cc 100644 --- a/ct/apt-cacher-ng.sh +++ b/ct/apt-cacher-ng.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://wiki.debian.org/AptCacherNg -# App Default Values APP="Apt-Cacher-NG" var_tags="caching" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/archivebox.sh b/ct/archivebox.sh index 1fa9f8d27..e9f3c1bb8 100644 --- a/ct/archivebox.sh +++ b/ct/archivebox.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://archivebox.io/ -# App Default Values APP="ArchiveBox" var_tags="archive;bookmark" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/aria2.sh b/ct/aria2.sh index 6fc653715..1b9029769 100644 --- a/ct/aria2.sh +++ b/ct/aria2.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://aria2.github.io/ -# App Default Values APP="Aria2" var_tags="download-utility" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/audiobookshelf.sh b/ct/audiobookshelf.sh index 41a22b2fa..f252d028e 100644 --- a/ct/audiobookshelf.sh +++ b/ct/audiobookshelf.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.audiobookshelf.org/ -# App Default Values APP="audiobookshelf" var_tags="podcast;audiobook" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/authentik.sh b/ct/authentik.sh index 8bc76917d..77f0ddb8d 100644 --- a/ct/authentik.sh +++ b/ct/authentik.sh @@ -3,22 +3,18 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 community-scripts ORG # Author: remz1337 # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://goauthentik.io/ -# App Default Values APP="Authentik" var_tags="identity-provider" -var_disk="15" +var_disk="12" var_cpu="6" var_ram="8192" var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -51,6 +47,13 @@ function update_script() { npm run build &>/dev/null msg_ok "Built ${APP} website" + msg_info "Building ${APP} server" + cd /opt/authentik + go mod download + go build -o /go/authentik ./cmd/server + go build -o /opt/authentik/authentik-server /opt/authentik/cmd/server/ + msg_ok "Built ${APP} server" + msg_info "Installing Python Dependencies" cd /opt/authentik poetry install --only=main --no-ansi --no-interaction --no-root &>/dev/null diff --git a/ct/autobrr.sh b/ct/autobrr.sh index 88484500a..421526bc0 100644 --- a/ct/autobrr.sh +++ b/ct/autobrr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://autobrr.com/ -# App Default Values APP="Autobrr" var_tags="arr;" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/baikal.sh b/ct/baikal.sh new file mode 100644 index 000000000..c9bac41e0 --- /dev/null +++ b/ct/baikal.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://sabre.io/baikal/ + +APP="Baikal" +var_tags="Dav" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/baikal ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop apache2 + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + wget -q "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip" + mv /opt/baikal /opt/baikal-backup + unzip -o -q "baikal-${RELEASE}.zip" + cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/ + cp -r /opt/baikal-backup/Specific/ /opt/baikal/ + chown -R www-data:www-data /opt/baikal/ + chmod -R 755 /opt/baikal/ + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + systemctl start apache2 + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -rf "/opt/baikal-${RELEASE}.zip" + rm -rf /opt/baikal-backup + 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}${CL}" diff --git a/ct/barcode-buddy.sh b/ct/barcode-buddy.sh new file mode 100644 index 000000000..3b6d36e0a --- /dev/null +++ b/ct/barcode-buddy.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Forceu/barcodebuddy + +APP="Barcode-Buddy" +var_tags="grocery;household" +var_cpu="1" +var_ram="512" +var_disk="3" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/barcodebuddy ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/Forceu/barcodebuddy/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 apache2 + systemctl stop barcodebuddy + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + mv /opt/barcodebuddy/ /opt/barcodebuddy-backup + wget -q "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip" + unzip -q "v${RELEASE}.zip" + mv "/opt/barcodebuddy-${RELEASE}" /opt/barcodebuddy + cp -r /opt/barcodebuddy-backup/data/. /opt/barcodebuddy/data + chown -R www-data:www-data /opt/barcodebuddy/data + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + systemctl start apache2 + systemctl start barcodebuddy + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -r "/opt/v${RELEASE}.zip" + rm -r /opt/barcodebuddy-backup + 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}${CL}" diff --git a/ct/bazarr.sh b/ct/bazarr.sh index d0e85b86d..1802d72a2 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.bazarr.media/ -# App Default Values APP="Bazarr" var_tags="arr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors diff --git a/ct/beszel.sh b/ct/beszel.sh index b0b87e1d8..c159800be 100644 --- a/ct/beszel.sh +++ b/ct/beszel.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://beszel.dev/ -# App Default Values APP="Beszel" var_tags="monitoring" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/blocky.sh b/ct/blocky.sh index 94349b20c..667e52433 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://0xerr0r.github.io/blocky/latest/ -# App Default Values APP="Blocky" var_tags="adblock" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors diff --git a/ct/boltdiy.sh b/ct/boltdiy.sh new file mode 100644 index 000000000..931eed883 --- /dev/null +++ b/ct/boltdiy.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/stackblitz-labs/bolt.diy/ + +APP="boltdiy" +TAGS="code;ai" +var_cpu="2" +var_ram="3072" +var_disk="6" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/bolt.diy ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/boltdiy_version.txt)" ]] || [[ ! -f /opt/boltdiy_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop boltdiy + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + temp_dir=$(mktemp -d) + temp_file=$(mktemp) + cd $temp_dir + wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + tar xzf $temp_file + cp -rf bolt.diy-${RELEASE}/* /opt/bolt.diy + cd /opt/bolt.diy + $STD pnpm install + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start boltdiy + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf $temp_file + rm -rf $temp_dir + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/boltdiy_version.txt + msg_ok "Update Successful" + 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}:5173${CL}" diff --git a/ct/bookstack.sh b/ct/bookstack.sh index 2c3e89df0..dbd21336b 100644 --- a/ct/bookstack.sh +++ b/ct/bookstack.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/BookStackApp/BookStack -# App Default Values APP="Bookstack" var_tags="organizer" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/bunkerweb.sh b/ct/bunkerweb.sh index a294fc5c7..b8c9da4cc 100644 --- a/ct/bunkerweb.sh +++ b/ct/bunkerweb.sh @@ -5,21 +5,16 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.bunkerweb.io/ -# App Default Values APP="BunkerWeb" var_tags="webserver" var_cpu="2" -var_ram="1024" +var_ram="4096" var_disk="4" var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors @@ -39,7 +34,7 @@ Pin: version ${RELEASE} Pin-Priority: 1001 EOF apt-get update - apt-get install -y nginx=1.26.2* + apt-get install -y nginx=1.26.3* apt-get install -y bunkerweb=${RELEASE} echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" diff --git a/ct/caddy.sh b/ct/caddy.sh index 03974eb23..d7993fa94 100644 --- a/ct/caddy.sh +++ b/ct/caddy.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://caddyserver.com/ -# App Default Values APP="Caddy" var_tags="webserver" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index 7768681b2..91c61d1d5 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/janeczku/calibre-web -# App Default Values APP="Calibre-Web" var_tags="eBook" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/casaos.sh b/ct/casaos.sh index 1b198ec49..3da5f3147 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://casaos.io/ -# App Default Values APP="CasaOS" var_tags="cloud" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 5563e5edf..f4714018d 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://changedetection.io/ -# App Default Values APP="Change Detection" var_tags="monitoring;crawler" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/channels.sh b/ct/channels.sh index 72e726186..01f315d43 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://getchannels.com/dvr-server/ -# App Default Values APP="Channels" var_tags="dvr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/checkmk.sh b/ct/checkmk.sh index f22e5edce..af006c041 100644 --- a/ct/checkmk.sh +++ b/ct/checkmk.sh @@ -15,8 +15,6 @@ var_version="12" var_unprivileged="1" header_info "$APP" -base_settings - variables color catch_errors @@ -29,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }') + RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -v '\-rc' | sort -V | tail -n 1) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to v${RELEASE}" omd stop monitoring &>/dev/null diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index bb1cf48cf..2b499f10b 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.cloudflare.com/ -# App Default Values APP="Cloudflared" var_tags="network;cloudflare" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/cockpit.sh b/ct/cockpit.sh index 98c93f5a9..ee0e03cb8 100644 --- a/ct/cockpit.sh +++ b/ct/cockpit.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://cockpit-project.org/ -# App Default Values APP="Cockpit" var_tags="monitoring;network" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/commafeed.sh b/ct/commafeed.sh index b371e488d..dbb0f868c 100644 --- a/ct/commafeed.sh +++ b/ct/commafeed.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.commafeed.com/#/welcome -# App Default Values APP="CommaFeed" var_tags="rss-reader" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/cosmos.sh b/ct/cosmos.sh new file mode 100644 index 000000000..381a50b9d --- /dev/null +++ b/ct/cosmos.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Michel Roegl-Brunner (michelroegl-brunner) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://https://cosmos-cloud.io/ + +APP="cosmos" +var_tags="os,docker" +var_cpu="2" +var_ram="2048" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/cosmos ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_ok "${APP} updates itself automatically!" +} + +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}${CL}" diff --git a/ct/crafty-controller.sh b/ct/crafty-controller.sh new file mode 100644 index 000000000..336a3d8f2 --- /dev/null +++ b/ct/crafty-controller.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://gitlab.com/crafty-controller/crafty-4 + +APP="Crafty-Controller" +var_tags="gaming" +var_cpu="2" +var_ram="4096" +var_disk="16" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/crafty-controller ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -s "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//') + if [[ ! -f /opt/crafty-controller_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/crafty-controller_version.txt)" ]]; then + + msg_info "Stopping Crafty-Controller" + systemctl stop crafty-controller + msg_ok "Stopped Crafty-Controller" + + msg_info "Creating Backup of config" + cp -a /opt/crafty-controller/crafty/crafty-4/app/config/. /opt/crafty-controller/backup + rm /opt/crafty-controller/backup/version.json + rm /opt/crafty-controller/backup/credits.json + rm /opt/crafty-controller/backup/logging.json + rm /opt/crafty-controller/backup/default.json.example + rm /opt/crafty-controller/backup/motd_format.json + msg_ok "Backup Created" + + msg_info "Updating Crafty-Controller to v${RELEASE}" + wget -q "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" + unzip -q crafty-4-v${RELEASE}.zip + cp -a crafty-4-v${RELEASE}/. /opt/crafty-controller/crafty/crafty-4/ + rm -rf crafty-4-v${RELEASE} + cd /opt/crafty-controller/crafty/crafty-4 + sudo -u crafty bash -c ' + source /opt/crafty-controller/crafty/.venv/bin/activate + pip3 install --no-cache-dir -r requirements.txt + ' &>/dev/null + echo "${RELEASE}" >"/opt/crafty-controller_version.txt" + msg_ok "Updated Crafty-Controller to v${RELEASE}" + + msg_info "Restoring Backup of config" + cp -a /opt/crafty-controller/backup/. /opt/crafty-controller/crafty/crafty-4/app/config + rm -rf /opt/crafty-controller/backup + chown -R crafty:crafty /opt/crafty-controller/ + msg_ok "Backup Restored" + + msg_info "Starting Crafty-Controller" + systemctl start crafty-controller + msg_ok "Started Crafty-Controller" + + msg_ok "Updated Successfully" + exit + else + msg_ok "No update required. Crafty-Controller is already at v${RELEASE}." + fi +} + + +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}https://${IP}:8443${CL}" diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index f0a2ffd2f..7883847a7 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -42,6 +42,7 @@ function error_handler() { local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" + exit 200 } # This function displays a spinner. @@ -111,7 +112,7 @@ function select_storage() { CONTENT='vztmpl' CONTENT_LABEL='Container template' ;; - *) false || exit "Invalid storage class." ;; + *) false || { msg_error "Invalid storage class."; exit 201; }; esac # This Queries all storage locations @@ -137,7 +138,7 @@ function select_storage() { STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted." + "${MENU[@]}" 3>&1 1>&2 2>&3) || { msg_error "Menu aborted."; exit 202; } if [ $? -ne 0 ]; then echo -e "${CROSS}${RD} Menu aborted by user.${CL}" exit 0 @@ -147,17 +148,18 @@ function select_storage() { fi } # Test if required variables are set -[[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable." -[[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable." +[[ "${CTID:-}" ]] || { msg_error "You need to set 'CTID' variable."; exit 203; } +[[ "${PCT_OSTYPE:-}" ]] || { msg_error "You need to set 'PCT_OSTYPE' variable."; exit 204; } # Test if ID is valid -[ "$CTID" -ge "100" ] || exit "ID cannot be less than 100." +[ "$CTID" -ge "100" ] || { msg_error "ID cannot be less than 100."; exit 205; } # Test if ID is in use if pct status $CTID &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID - exit "Cannot use ID that is already in use." + msg_error "Cannot use ID that is already in use." + exit 206 fi # Get template storage @@ -224,15 +226,27 @@ else fi fi +# Check and fix subuid/subgid +grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >> /etc/subuid +grep -q "root:100000:65536" /etc/subgid || echo "root:100000:65536" >> /etc/subgid + # Combine all options -DEFAULT_PCT_OPTIONS=( - -arch $(dpkg --print-architecture)) - PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) -[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs $CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}) +[[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs "$CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}") -# Create container +# Create container with template integrity check msg_info "Creating LXC Container" -pct create $CTID ${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE} ${PCT_OPTIONS[@]} >/dev/null || - exit "A problem occured while trying to create container." + if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then + [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" + + msg_ok "Template integrity check completed" + pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || + { msg_error "A problem occurred while re-downloading the LXC template."; exit 208; } + + msg_ok "Re-downloaded LXC Template" + if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then + msg_error "A problem occurred while trying to create container after re-downloading template." + exit 200 + fi + fi msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 3974a72ed..54663ae9e 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://cronicle.net/ -# App Default Values APP="Cronicle" var_tags="task-scheduler" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -73,7 +68,7 @@ function update_script() { msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/ct/cross-seed.sh b/ct/cross-seed.sh new file mode 100644 index 000000000..1cb34a39a --- /dev/null +++ b/ct/cross-seed.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Jakub Matraszek (jmatraszek) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.cross-seed.org + +APP="cross-seed" +var_tags="arr" +var_cpu="1" +var_ram="1024" +var_disk="2" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if command -v cross-seed &> /dev/null; then + current_version=$(cross-seed --version) + latest_version=$(npm show cross-seed version) + if [ "$current_version" != "$latest_version" ]; then + msg_info "Updating ${APP} from version v${current_version} to v${latest_version}" + npm install -g cross-seed@latest &> /dev/null + systemctl restart cross-seed + msg_ok "Updated Successfully" + else + msg_ok "${APP} is already at v${current_version}" + fi + else + msg_error "No ${APP} Installation Found!" + exit + 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 cross-seed API using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:2468${CL}" diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 895525f48..ae2fb6a2e 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://daemonsync.me/ -# App Default Values APP="Daemon Sync" var_tags="sync" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/dashy.sh b/ct/dashy.sh index b3bfbd5f4..4ad34cce5 100644 --- a/ct/dashy.sh +++ b/ct/dashy.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://dashy.to/ -# App Default Values APP="Dashy" var_tags="dashboard" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/debian.sh b/ct/debian.sh index 385dd13c7..f4c3d6bff 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.debian.org/ -# App Default Values APP="Debian" var_tags="os" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/deconz.sh b/ct/deconz.sh index 846055e13..3d1d0dbec 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.phoscon.de/en/conbee2/software#deconz -# App Default Values APP="deCONZ" var_tags="zigbee" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/deluge.sh b/ct/deluge.sh index 895352c8d..038ed996d 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.deluge-torrent.org/ -# App Default Values APP="Deluge" var_tags="torrent" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/docker.sh b/ct/docker.sh index 656d72842..e21e9e0ff 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.docker.com/ -# App Default Values APP="Docker" var_tags="docker" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/dockge.sh b/ct/dockge.sh index 6a4b81e39..d3b77466d 100644 --- a/ct/dockge.sh +++ b/ct/dockge.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://dockge.kuma.pet/ -# App Default Values APP="Dockge" var_tags="docker" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/docmost.sh b/ct/docmost.sh new file mode 100644 index 000000000..75e1f9363 --- /dev/null +++ b/ct/docmost.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://docmost.com/ + +APP="Docmost" +var_tags="documents" +var_cpu="3" +var_ram="3072" +var_disk="7" +var_os="debian" +var_version="12" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/docmost ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/docmost/docmost/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 docmost + msg_ok "${APP} Stopped" + + msg_info "Updating ${APP} to v${RELEASE}" + cp /opt/docmost/.env /opt/ + rm -rf /opt/docmost + temp_file=$(mktemp) + wget -q "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" + tar -xzf "$temp_file" + mv docmost-${RELEASE} /opt/docmost + cd /opt/docmost + mv /opt/.env /opt/docmost/.env + pnpm install --force &>/dev/null + pnpm build &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting ${APP}" + systemctl start docmost + msg_ok "Started ${APP}" + + 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 ${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/dolibarr.sh b/ct/dolibarr.sh new file mode 100644 index 000000000..ab8ef73ea --- /dev/null +++ b/ct/dolibarr.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/Dolibarr/dolibarr/ + +APP="Dolibarr" +var_tags="erp;accounting" +var_cpu="1" +var_ram="2048" +var_disk="6" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /usr/share/dolibarr ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "To update ${APP}, use the applications web interface." + 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}/dolibarr/install${CL}" diff --git a/ct/dotnetaspwebapi.sh b/ct/dotnetaspwebapi.sh index 1df6e1b27..667cb5b18 100644 --- a/ct/dotnetaspwebapi.sh +++ b/ct/dotnetaspwebapi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu -# App Default Values APP="Dotnet ASP Web API" var_tags="web" var_cpu="1" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="24.04" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/duplicati.sh b/ct/duplicati.sh new file mode 100644 index 000000000..845b012b1 --- /dev/null +++ b/ct/duplicati.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/duplicati/duplicati/ + +APP="Duplicati" +var_tags="backup" +var_cpu="1" +var_ram="1024" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /usr/bin/duplicati-server ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop duplicati + msg_ok "Stopped $APP" + msg_info "Updating $APP to v${RELEASE}" + wget -q "https://github.com/duplicati/duplicati/releases/download/v${RELEASE}/duplicati-${RELEASE}-linux-x64-gui.deb" + $STD dpkg -i duplicati-${RELEASE}-linux-x64-gui.deb + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start duplicati + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf ~/duplicati-${RELEASE}-linux-x64-gui.deb + msg_ok "Cleanup Completed" + + msg_ok "Update Successful" + 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}:8200${CL}" diff --git a/ct/elementsynapse.sh b/ct/elementsynapse.sh new file mode 100644 index 000000000..d1b482be5 --- /dev/null +++ b/ct/elementsynapse.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/element-hq/synapse + +APP="Element Synapse" +var_tags="server" +var_cpu="1" +var_ram="1024" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /etc/matrix-synapse ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated $APP LXC" + 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}:8008${CL}" \ No newline at end of file diff --git a/ct/emby.sh b/ct/emby.sh index 2482bbd2c..eaa02bde7 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://emby.media/ -# App Default Values APP="Emby" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="22.04" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/emqx.sh b/ct/emqx.sh index cb7087354..08026b790 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.emqx.com/en -# App Default Values APP="EMQX" var_tags="mqtt" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/ersatztv.sh b/ct/ersatztv.sh index c07db2a4f..eedfe9f11 100644 --- a/ct/ersatztv.sh +++ b/ct/ersatztv.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://ersatztv.org/ -# App Default Values APP="ErsatzTV" var_tags="iptv" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/esphome.sh b/ct/esphome.sh index 847e9933b..5c451f662 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://esphome.io/ -# App Default Values APP="ESPHome" var_tags="automation" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/evcc.sh b/ct/evcc.sh index 01cac47b3..df9ff5797 100644 --- a/ct/evcc.sh +++ b/ct/evcc.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://evcc.io/en/ -# App Default Values APP="evcc" var_tags="solar;ev;automation" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/excalidraw.sh b/ct/excalidraw.sh new file mode 100644 index 000000000..d0ff3a27a --- /dev/null +++ b/ct/excalidraw.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/excalidraw/excalidraw + +APP="Excalidraw" +TAGS="diagrams" +var_cpu="2" +var_ram="3072" +var_disk="6" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/excalidraw ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -s https://api.github.com/repos/excalidraw/excalidraw/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/excalidraw_version.txt)" ]] || [[ ! -f /opt/excalidraw_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop excalidraw + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + cd /tmp + temp_file=$(mktemp) + wget -q "https://github.com/excalidraw/excalidraw/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + tar xzf $temp_file + rm -rf /opt/excalidraw + mv excalidraw-${RELEASE} /opt/excalidraw + cd /opt/excalidraw + yarn &> /dev/null + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start excalidraw + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf $temp_file + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/excalidraw_version.txt + msg_ok "Update Successful" + 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}:3000${CL}" diff --git a/ct/fenrus.sh b/ct/fenrus.sh index c031d7c29..a22e164ea 100644 --- a/ct/fenrus.sh +++ b/ct/fenrus.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/revenz/Fenrus -# App Default Values APP="Fenrus" var_tags="dashboard" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/fhem.sh b/ct/fhem.sh index 67e88918f..aa87bb3dc 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://fhem.de/ -# App Default Values APP="FHEM" var_tags="automation" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/firefly.sh b/ct/firefly.sh index 5ee9524e7..efb5f8109 100644 --- a/ct/firefly.sh +++ b/ct/firefly.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://firefly-iii.org/ -# App Default Values APP="Firefly" var_tags="finance" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/flaresolverr.sh b/ct/flaresolverr.sh index c5f6f2fc7..d4f0ed8b3 100644 --- a/ct/flaresolverr.sh +++ b/ct/flaresolverr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/FlareSolverr/FlareSolverr -# App Default Values APP="FlareSolverr" var_tags="proxy" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index 4d651b6b7..aed68964f 100644 --- a/ct/flowiseai.sh +++ b/ct/flowiseai.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://flowiseai.com/ -# App Default Values APP="FlowiseAI" var_tags="low-code" var_disk="10" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/forgejo.sh b/ct/forgejo.sh index a4fe9260b..ce7280fc1 100644 --- a/ct/forgejo.sh +++ b/ct/forgejo.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://forgejo.org/ -# App Default Values APP="Forgejo" var_tags="git" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/freshrss.sh b/ct/freshrss.sh new file mode 100644 index 000000000..ef7d11d29 --- /dev/null +++ b/ct/freshrss.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/FreshRSS/FreshRSS + +APP="FreshRSS" +var_tags="RSS" +var_cpu="2" +var_ram="1024" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/freshrss ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "FreshRSS should be updated via the user interface." + 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}${CL}" diff --git a/ct/frigate.sh b/ct/frigate.sh index f694eafca..dcb9b3fd3 100644 --- a/ct/frigate.sh +++ b/ct/frigate.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://frigate.video/ -# App Default Values APP="Frigate" var_tags="nvr" var_cpu="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="11" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/ghost.sh b/ct/ghost.sh index abd90d830..7a496b85f 100644 --- a/ct/ghost.sh +++ b/ct/ghost.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://ghost.org/ -# App Default Values APP="Ghost" var_tags="cms;blog" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/gitea.sh b/ct/gitea.sh index 9f2dca6ce..39bdc75aa 100644 --- a/ct/gitea.sh +++ b/ct/gitea.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://about.gitea.com/ -# App Default Values APP="Gitea" var_tags="git" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/glance.sh b/ct/glance.sh index d5eb9ed00..ef6a90579 100644 --- a/ct/glance.sh +++ b/ct/glance.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/glanceapp/glance -# App Default Values APP="Glance" var_tags="dashboard" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/glpi.sh b/ct/glpi.sh index 6847a009f..a25dba350 100644 --- a/ct/glpi.sh +++ b/ct/glpi.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG -# Author: tteck (tteckster) -# License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Author: Nícolas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.glpi-project.org/ -# App Default Values APP="GLPI" var_tags="asset-management;foss" var_cpu="2" @@ -14,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/go2rtc.sh b/ct/go2rtc.sh index 6cf07bba9..6d78cb3a7 100644 --- a/ct/go2rtc.sh +++ b/ct/go2rtc.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/AlexxIT/go2rtc -# App Default Values APP="go2rtc" var_tags="recorder;video" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/gokapi.sh b/ct/gokapi.sh index b7c5c9b7b..868e9a36a 100644 --- a/ct/gokapi.sh +++ b/ct/gokapi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Forceu/Gokapi -# App Default Values APP="Gokapi" var_tags="file;sharing" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/gotify.sh b/ct/gotify.sh index 3bc74b0aa..5b5fc1204 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://gotify.net/ -# App Default Values APP="Gotify" var_tags="notification" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/grafana.sh b/ct/grafana.sh index f81cc79ed..0cdd0712a 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://grafana.com/ -# App Default Values APP="Grafana" var_tags="monitoring;visualization" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/graylog.sh b/ct/graylog.sh new file mode 100644 index 000000000..ffed4bf22 --- /dev/null +++ b/ct/graylog.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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://graylog.org/ + +APP="Graylog" +TAGS="logging" +var_cpu="2" +var_ram="8192" +var_disk="30" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /etc/graylog ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping $APP" + systemctl stop graylog-datanode + systemctl stop graylog-server + msg_ok "Stopped $APP" + + msg_info "Updating $APP" + apt-get update &> /dev/null + apt-get upgrade -y &> /dev/null + msg_ok "Updated $APP" + + msg_info "Starting $APP" + systemctl start graylog-datanode + systemctl start graylog-server + msg_ok "Started $APP" + + msg_ok "Update Successful" + 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}:9000${CL}" diff --git a/ct/grist.sh b/ct/grist.sh index 837495097..f361552e4 100644 --- a/ct/grist.sh +++ b/ct/grist.sh @@ -4,21 +4,16 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE -# App Default Values APP="Grist" var_tags="database;spreadsheet" -var_cpu="1" -var_ram="2048" -var_disk="4" +var_cpu="2" +var_ram="3072" +var_disk="6" var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -41,18 +36,36 @@ function update_script() { msg_ok "Stopped ${APP} Service" msg_info "Updating ${APP} to v${RELEASE}" + cd /opt rm -rf grist_bak mv grist grist_bak wget -q https://github.com/gristlabs/grist-core/archive/refs/tags/v${RELEASE}.zip unzip -q v$RELEASE.zip mv grist-core-${RELEASE} grist - cp -n /opt/grist_bak/.env /opt/grist/.env + + mkdir -p grist/docs + + cp -n grist_bak/.env grist/.env || true + cp -r grist_bak/docs/* grist/docs/ || true + cp grist_bak/grist-sessions.db grist/grist-sessions.db || true + cp grist_bak/landing.db grist/landing.db || true + cd grist + msg_info "Installing Dependencies" yarn install >/dev/null 2>&1 + msg_ok "Installed Dependencies" + + msg_info "Building" yarn run build:prod >/dev/null 2>&1 + msg_ok "Done building" + + msg_info "Installing Python" yarn run install:python >/dev/null 2>&1 + msg_ok "Installed Python" + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to v${RELEASE}" msg_info "Starting ${APP} Service" diff --git a/ct/grocy.sh b/ct/grocy.sh index 85b2aa197..31ec35ca6 100644 --- a/ct/grocy.sh +++ b/ct/grocy.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://grocy.info/ -# App Default Values APP="grocy" var_tags="grocery;household" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/headers/5etools b/ct/headers/5etools deleted file mode 100644 index 1556067f1..000000000 --- a/ct/headers/5etools +++ /dev/null @@ -1,6 +0,0 @@ - ______ __ __ - / ____/__ / /_____ ____ / /____ - /___ \/ _ \/ __/ __ \/ __ \/ / ___/ - ____/ / __/ /_/ /_/ / /_/ / (__ ) -/_____/\___/\__/\____/\____/_/____/ - diff --git a/ct/headers/alpine-it-tools b/ct/headers/alpine-it-tools new file mode 100644 index 000000000..8db223998 --- /dev/null +++ b/ct/headers/alpine-it-tools @@ -0,0 +1,6 @@ + ___ __ _ __________ ______ __ + / | / /___ (_)___ ___ / _/_ __/ /_ __/___ ____ / /____ + / /| | / / __ \/ / __ \/ _ \______ / / / /_____/ / / __ \/ __ \/ / ___/ + / ___ |/ / /_/ / / / / / __/_____// / / /_____/ / / /_/ / /_/ / (__ ) +/_/ |_/_/ .___/_/_/ /_/\___/ /___/ /_/ /_/ \____/\____/_/____/ + /_/ diff --git a/ct/headers/alpine-nextcloud b/ct/headers/alpine-nextcloud index b27eb0cad..908459ba6 100644 --- a/ct/headers/alpine-nextcloud +++ b/ct/headers/alpine-nextcloud @@ -1,12 +1,6 @@ - ___ __ _ _ __ __ __ - / | / /___ (_)___ ___ / | / /__ _ __/ /______/ /___ __ __ - / /| | / / __ \/ / __ \/ _ \______/ |/ / _ \| |/_/ __/ ___/ / __ \/ / / / - / ___ |/ / /_/ / / / / / __/_____/ /| / __/> < / ____/ / / /_/ /> < / ____/ / / /_/ /> < | |/ |/ / / /_/ / / / __(__ |__ ) +/_/ |_/_/|_| |__/|__/_/\__/_/ /_/\___/____/____/ + diff --git a/ct/headers/paperless-ai b/ct/headers/paperless-ai new file mode 100644 index 000000000..ff10489a5 --- /dev/null +++ b/ct/headers/paperless-ai @@ -0,0 +1,6 @@ + ____ __ ___ ____ + / __ \____ _____ ___ _____/ /__ __________ / | / _/ + / /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/_____/ /| | / / + / ____/ /_/ / /_/ / __/ / / / __(__ |__ )_____/ ___ |_/ / +/_/ \__,_/ .___/\___/_/ /_/\___/____/____/ /_/ |_/___/ + /_/ diff --git a/ct/headers/paymenter b/ct/headers/paymenter new file mode 100644 index 000000000..50749ac1a --- /dev/null +++ b/ct/headers/paymenter @@ -0,0 +1,6 @@ + ____ __ + / __ \____ ___ ______ ___ ___ ____ / /____ _____ + / /_/ / __ `/ / / / __ `__ \/ _ \/ __ \/ __/ _ \/ ___/ + / ____/ /_/ / /_/ / / / / / / __/ / / / /_/ __/ / +/_/ \__,_/\__, /_/ /_/ /_/\___/_/ /_/\__/\___/_/ + /____/ diff --git a/ct/headers/pbs b/ct/headers/pbs deleted file mode 100644 index 785d90a83..000000000 --- a/ct/headers/pbs +++ /dev/null @@ -1,6 +0,0 @@ - ____ ____ _____ - / __ \/ __ ) ___/ - / /_/ / __ \__ \ - / ____/ /_/ /__/ / -/_/ /_____/____/ - diff --git a/ct/headers/podman-homeassistant b/ct/headers/podman-homeassistant index c1241da46..5d749f564 100644 --- a/ct/headers/podman-homeassistant +++ b/ct/headers/podman-homeassistant @@ -1,12 +1,6 @@ - ____ __ __ __ - / __ \____ ____/ /___ ___ ____ _____ / / / /___ ____ ___ ___ - / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \______/ /_/ / __ \/ __ `__ \/ _ \ - / ____/ /_/ / /_/ / / / / / / /_/ / / / /_____/ __ / /_/ / / / / / / __/ -/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ /_/ /_/\____/_/ /_/ /_/\___/ - - ___ _ __ __ - / | __________(_)____/ /_____ _____ / /_ - / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ - / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ -/_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ - + ____ __ __ __ ___ _ __ __ + / __ \____ ____/ /___ ___ ____ _____ / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_ + / /_/ / __ \/ __ / __ `__ \/ __ `/ __ \______/ /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/ + / ____/ /_/ / /_/ / / / / / / /_/ / / / /_____/ __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_ +/_/ \____/\__,_/_/ /_/ /_/\__,_/_/ /_/ /_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/ + diff --git a/ct/headers/privatebin b/ct/headers/privatebin new file mode 100644 index 000000000..3aa5b5e07 --- /dev/null +++ b/ct/headers/privatebin @@ -0,0 +1,6 @@ + ____ _ __ ____ _ + / __ \_____(_) ______ _/ /____ / __ )(_)___ + / /_/ / ___/ / | / / __ `/ __/ _ \/ __ / / __ \ + / ____/ / / /| |/ / /_/ / /_/ __/ /_/ / / / / / +/_/ /_/ /_/ |___/\__,_/\__/\___/_____/_/_/ /_/ + diff --git a/ct/headers/prometheus-alertmanager b/ct/headers/prometheus-alertmanager index 43a4876bd..41b1bd786 100644 --- a/ct/headers/prometheus-alertmanager +++ b/ct/headers/prometheus-alertmanager @@ -1,12 +1,6 @@ - ____ __ __ ___ __ - / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / | / / - / /_/ / ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/_____/ /| | / / - / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ )_____/ ___ |/ / -/_/ /_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ /_/ |_/_/ - - __ - ___ _____/ /_____ ___ ____ _____ ____ _____ ____ _____ - / _ \/ ___/ __/ __ `__ \/ __ `/ __ \/ __ `/ __ `/ _ \/ ___/ -/ __/ / / /_/ / / / / / /_/ / / / / /_/ / /_/ / __/ / -\___/_/ \__/_/ /_/ /_/\__,_/_/ /_/\__,_/\__, /\___/_/ - /____/ + ____ __ __ ___ __ __ + / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / | / /__ _____/ /_____ ___ ____ _____ ____ _____ ____ _____ + / /_/ / ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/_____/ /| | / / _ \/ ___/ __/ __ `__ \/ __ `/ __ \/ __ `/ __ `/ _ \/ ___/ + / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ )_____/ ___ |/ / __/ / / /_/ / / / / / /_/ / / / / /_/ / /_/ / __/ / +/_/ /_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ /_/ |_/_/\___/_/ \__/_/ /_/ /_/\__,_/_/ /_/\__,_/\__, /\___/_/ + /____/ diff --git a/ct/headers/prometheus-paperless-ngx-exporter b/ct/headers/prometheus-paperless-ngx-exporter new file mode 100644 index 000000000..b0f56e64b --- /dev/null +++ b/ct/headers/prometheus-paperless-ngx-exporter @@ -0,0 +1,6 @@ + ____ __ __ ____ __ _ _________ __ ______ __ + / __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / __ \____ _____ ___ _____/ /__ __________ / | / / ____/ |/ / / ____/ ______ ____ _____/ /____ _____ + / /_/ / ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/_____/ /_/ / __ `/ __ \/ _ \/ ___/ / _ \/ ___/ ___/_____/ |/ / / __ | /_____/ __/ | |/_/ __ \/ __ \/ ___/ __/ _ \/ ___/ + / ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ )_____/ ____/ /_/ / /_/ / __/ / / / __(__ |__ )_____/ /| / /_/ // /_____/ /____> /opt/${APP}_version.txt + msg_ok "Update Successful" + 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 with a SOCKS5 client using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}:1080${CL}" +echo -e "${INFO}${YW} and the credentials stored at /root/hev.creds${CL}" \ No newline at end of file diff --git a/ct/hivemq.sh b/ct/hivemq.sh index e12ca23fd..4a07b02bb 100644 --- a/ct/hivemq.sh +++ b/ct/hivemq.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.hivemq.com/ -# App Default Values APP="HiveMQ" var_tags="mqtt" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/hoarder.sh b/ct/hoarder.sh index 4dd931bd1..739bf59aa 100644 --- a/ct/hoarder.sh +++ b/ct/hoarder.sh @@ -5,21 +5,16 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://hoarder.app/ -# App Default Values APP="Hoarder" var_tags="bookmark" var_cpu="2" var_ram="4096" -var_disk="8" +var_disk="10" var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -39,6 +34,9 @@ function update_script() { systemctl stop hoarder-web hoarder-workers hoarder-browser msg_ok "Stopped Services" msg_info "Updating ${APP} to v${RELEASE}" + if [[ $(corepack -v) < "0.31.0" ]]; then + npm install -g corepack@0.31.0 &>/dev/null + fi cd /opt if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then mkdir -p /etc/hoarder diff --git a/ct/homarr.sh b/ct/homarr.sh index f13c45e23..fb6a3e8e9 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func) # Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) | Co-Author: MickLesk (Canbiz) +# Author: tteck (tteckster) | Co-Author: MickLesk (Canbiz) | Co-Author: CrazyWolf13 # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://homarr.dev/ -# App Default Values APP="Homarr" var_tags="arr;dashboard" var_cpu="2" @@ -15,11 +14,8 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings -# Core variables color catch_errors @@ -38,11 +34,48 @@ if [[ -f /opt/homarr/database/db.sqlite ]]; then msg_error " - https://github.com/community-scripts/ProxmoxVE/discussions/1551" msg_error " - https://homarr.dev/docs/getting-started/after-the-installation/#importing-a-zip-from-version-before-100" exit 1 +fi +if [[ ! -f /opt/run_homarr.sh ]]; then + msg_info "Detected outdated and missing service files" + msg_error "Warning - The port of homarr changed from 3000 to 7575" + apt-get install -y nginx gettext openssl gpg &>/dev/null + sed -i '/^NODE_ENV=/d' /opt/homarr/.env && echo "NODE_ENV='production'" >> /opt/homarr/.env + sed -i '/^DB_DIALECT=/d' /opt/homarr/.env && echo "DB_DIALECT='sqlite'" >> /opt/homarr/.env + cat <<'EOF' >/opt/run_homarr.sh +#!/bin/bash +export DB_DIALECT='sqlite' +export AUTH_SECRET=$(openssl rand -base64 32) +node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT +export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+') +envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf +nginx -g 'daemon off;' & +redis-server /opt/homarr/packages/redis/redis.conf & +node apps/tasks/tasks.cjs & +node apps/websocket/wssServer.cjs & +node apps/nextjs/server.js & PID=$! +wait $PID +EOF + chmod +x /opt/run_homarr.sh + rm /etc/systemd/system/homarr.service + cat </etc/systemd/system/homarr.service +[Unit] +Description=Homarr Service +After=network.target +[Service] +Type=exec +WorkingDirectory=/opt/homarr +EnvironmentFile=-/opt/homarr/.env +ExecStart=/opt/run_homarr.sh +[Install] +WantedBy=multi-user.target +EOF + msg_ok "Updated Services" + systemctl daemon-reload fi RELEASE=$(curl -s https://api.github.com/repos/homarr-labs/homarr/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 Services" + msg_info "Stopping Services (Patience)" systemctl stop homarr msg_ok "Services Stopped" @@ -51,7 +84,7 @@ fi cp /opt/homarr/.env /opt/homarr-data-backup/.env msg_ok "Backup Data" - msg_info "Updating ${APP} to v${RELEASE}" + msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)" wget -q "https://github.com/homarr-labs/homarr/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip rm -rf v${RELEASE}.zip @@ -60,9 +93,23 @@ fi mv /opt/homarr-data-backup/.env /opt/homarr/.env cd /opt/homarr pnpm install &>/dev/null - pnpm run db:migration:sqlite:run &>/dev/null pnpm build &>/dev/null - mkdir build + cp /opt/homarr/apps/nextjs/next.config.ts . + cp /opt/homarr/apps/nextjs/package.json . + cp -r /opt/homarr/packages/db/migrations /opt/homarr_db/migrations + cp -r /opt/homarr/apps/nextjs/.next/standalone/* /opt/homarr + mkdir -p /appdata/redis + cp /opt/homarr/packages/redis/redis.conf /opt/homarr/redis.conf + rm /etc/nginx/nginx.conf + mkdir -p /etc/nginx/templates + cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf + + mkdir -p /opt/homarr/apps/cli + cp /opt/homarr/packages/cli/cli.cjs /opt/homarr/apps/cli/cli.cjs + echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' > /usr/bin/homarr + chmod +x /usr/bin/homarr + + mkdir /opt/homarr/build cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" @@ -84,4 +131,4 @@ 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}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7575${CL}" diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index 34f72cb09..78a8ac6f3 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.home-assistant.io/ -# App Default Values APP="Home Assistant-Core" var_tags="automation;smarthome" var_cpu="2" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="24.10" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 46e0de7c8..f9fbeecf5 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.home-assistant.io/ -# App Default Values APP="Home Assistant" var_tags="automation;smarthome" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -48,8 +43,9 @@ function update_script() { docker pull "${CONTAINER_IMAGE}" LATEST_IMAGE="$(docker inspect --format "{{.Id}}" --type image "${CONTAINER_IMAGE}")" if [[ "${RUNNING_IMAGE}" != "${LATEST_IMAGE}" ]]; then + pip install -U runlike echo "Updating ${container} image ${CONTAINER_IMAGE}" - DOCKER_COMMAND="$(runlike "${container}")" + DOCKER_COMMAND="$(runlike --use-volume-id "${container}")" docker rm --force "${container}" eval ${DOCKER_COMMAND} fi @@ -113,4 +109,4 @@ 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}HA: http://${IP}:8123${CL}" -echo -e "${TAB}${GATEWAY}${BGN}Portainer: http://${IP}:9443${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}Portainer: http://${IP}:9443${CL}" diff --git a/ct/homebox.sh b/ct/homebox.sh index c81cfe530..a9806c2ad 100644 --- a/ct/homebox.sh +++ b/ct/homebox.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://homebox.software/en/ -# App Default Values APP="HomeBox" var_tags="inventory;household" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/homebridge.sh b/ct/homebridge.sh index f0d7fa25d..abe603c81 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://homebridge.io/ -# App Default Values APP="Homebridge" var_tags="smarthome;homekit" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/homepage.sh b/ct/homepage.sh index b42d9c125..6adce7d1a 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://gethomepage.dev/ -# App Default Values APP="Homepage" var_tags="dashboard" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/homer.sh b/ct/homer.sh index 2077c030d..09f9a931b 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/bastienwirtz/homer -# App Default Values APP="Homer" var_tags="dashboard" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/hyperhdr.sh b/ct/hyperhdr.sh index f019bc4c0..33c6216fe 100644 --- a/ct/hyperhdr.sh +++ b/ct/hyperhdr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.hyperhdr.eu/ -# App Default Values APP="HyperHDR" var_tags="ambient-lightning" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/hyperion.sh b/ct/hyperion.sh index a6684c2ad..776e883bd 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://hyperion-project.org/forum/ -# App Default Values APP="Hyperion" var_tags="ambient-lightning" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/influxdb.sh b/ct/influxdb.sh index fdeafbc6d..c3c88dbfa 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.influxdata.com/ -# App Default Values APP="InfluxDB" var_tags="database" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/inspircd.sh b/ct/inspircd.sh index 8b23a237a..c187d0f51 100644 --- a/ct/inspircd.sh +++ b/ct/inspircd.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.inspircd.org/ -# App Default Values APP="InspIRCd" var_tags="IRC" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/iobroker.sh b/ct/iobroker.sh index e00e01da0..5951b0b19 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.iobroker.net/#en/intro -# App Default Values APP="ioBroker" var_tags="automtation" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/iventoy.sh b/ct/iventoy.sh index 29282483a..2895e4cc6 100644 --- a/ct/iventoy.sh +++ b/ct/iventoy.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.iventoy.com/en/index.html -# App Default Values APP="iVentoy" var_tags="pxe-tool" var_disk="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/jackett.sh b/ct/jackett.sh index 0d078c2c5..93fabd3c0 100644 --- a/ct/jackett.sh +++ b/ct/jackett.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Jackett/Jackett -# App Default Values APP="Jackett" var_tags="torrent" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index 8862e5de7..11a1ade62 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://jellyfin.org/ -# App Default Values APP="Jellyfin" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="22.04" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index f7ab1b31a..396f2bfb3 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://docs.jellyseerr.dev/ -# App Default Values APP="Jellyseerr" var_tags="media" var_cpu="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors @@ -50,17 +45,23 @@ function update_script() { msg_ok "Cleaning up" fi - if ! command -v pnpm &> /dev/null; then - msg_error "pnpm not found. Installing..." - npm install -g pnpm &>/dev/null + cd /opt/jellyseerr + output=$(git pull --no-rebase) + + pnpm_current=$(pnpm --version 2>/dev/null) + pnpm_desired=$(grep -Po '"pnpm":\s*"\K[^"]+' /opt/jellyseerr/package.json) + + if [ -z "$pnpm_current" ]; then + msg_error "pnpm not found. Installing version $pnpm_desired..." + npm install -g pnpm@"$pnpm_desired" &>/dev/null + elif ! node -e "const semver = require('semver'); process.exit(semver.satisfies('$pnpm_current', '$pnpm_desired') ? 0 : 1)" ; then + msg_error "Updating pnpm from version $pnpm_current to $pnpm_desired..." + npm install -g pnpm@"$pnpm_desired" &>/dev/null else - msg_ok "pnpm is already installed." + msg_ok "pnpm is already installed and satisfies version $pnpm_desired." fi msg_info "Updating $APP" - cd /opt/jellyseerr - output=$(git pull --no-rebase) - if echo "$output" | grep -q "Already up to date."; then msg_ok "$APP is already up to date." exit @@ -102,4 +103,4 @@ 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}:5055${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5055${CL}" diff --git a/ct/jenkins.sh b/ct/jenkins.sh index 9fda8d71e..391b70619 100644 --- a/ct/jenkins.sh +++ b/ct/jenkins.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.jenkins.io/ -# App Default Values APP="Jenkins" var_tags="automation" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/kavita.sh b/ct/kavita.sh index 9a4f38e78..866f722d2 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.kavitareader.com/ -# App Default Values APP="Kavita" var_tags="reader" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 91cb38683..09a44e49a 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.keycloak.org/ -# App Default Values APP="Keycloak" var_tags="access-management" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/kimai.sh b/ct/kimai.sh index 2e4f72aff..06313043b 100644 --- a/ct/kimai.sh +++ b/ct/kimai.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.kimai.org/ -# App Default Values APP="Kimai" var_tags="time-tracking" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/koillection.sh b/ct/koillection.sh new file mode 100644 index 000000000..64dfde90d --- /dev/null +++ b/ct/koillection.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://koillection.github.io/ + +APP="Koillection" +var_tags="network" +var_cpu="2" +var_ram="1024" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/koillection ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/benjaminjonard/koillection/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop apache2 + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + mv /opt/koillection/ /opt/koillection-backup + wget -q "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip" + unzip -q "${RELEASE}.zip" + mv "/opt/koillection-${RELEASE}" /opt/koillection + cd /opt/koillection + cp -r /opt/koillection-backup/.env.local /opt/koillection + cp -r /opt/koillection-backup/public/uploads/. /opt/koillection/public/uploads/ + export COMPOSER_ALLOW_SUPERUSER=1 + composer install --no-dev -o --no-interaction --classmap-authoritative &>/dev/null + php bin/console doctrine:migrations:migrate --no-interaction &>/dev/null + php bin/console app:translations:dump &>/dev/null + cd assets/ + yarn install &>/dev/null + yarn build &>/dev/null + chown -R www-data:www-data /opt/koillection/public/uploads + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + systemctl start apache2 + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -r "/opt/${RELEASE}.zip" + rm -r /opt/koillection-backup + 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}${CL}" diff --git a/ct/kometa.sh b/ct/kometa.sh new file mode 100644 index 000000000..76d4adba3 --- /dev/null +++ b/ct/kometa.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/Kometa-Team/Kometa + +APP="Kometa" +TAGS="media;streaming" +var_cpu="2" +var_ram="4096" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f "/opt/kometa/kometa.py" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/kometa_version.txt)" ]] || [[ ! -f /opt/kometa_version.txt ]]; then + msg_info "Updating $APP" + msg_info "Stopping $APP" + systemctl stop kometa + msg_ok "Stopped $APP" + + msg_info "Updating $APP to ${RELEASE}" + cd /tmp + temp_file=$(mktemp) + RELEASE=$(curl -s https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + wget -q "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" + tar -xzf "$temp_file" + cp /opt/kometa/config/config.yml /opt + rm -rf /opt/kometa + mv Kometa-${RELEASE} /opt/kometa + cd /opt/kometa + rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED + pip install -r requirements.txt --ignore-installed &> /dev/null + mkdir -p config/assets + cp /opt/config.yml config/config.yml + echo "${RELEASE}" >/opt/kometa_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Starting $APP" + systemctl start kometa + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -f $temp_file + msg_ok "Cleanup Completed" + + msg_ok "Update Successful" + 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 the LXC at following IP address:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}${CL}" \ No newline at end of file diff --git a/ct/komga.sh b/ct/komga.sh index df9accc6f..2f04c7758 100644 --- a/ct/komga.sh +++ b/ct/komga.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://komga.org/ -# App Default Values APP="Komga" var_tags="media;eBook;comic" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/komodo.sh b/ct/komodo.sh index ad267e9d4..d2069a282 100644 --- a/ct/komodo.sh +++ b/ct/komodo.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://komo.do -# App Default Values APP="Komodo" var_tags="docker" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/kubo.sh b/ct/kubo.sh index 09ac7268d..2d387becd 100644 --- a/ct/kubo.sh +++ b/ct/kubo.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/ipfs/kubo -# App Default Values APP="Kubo" var_tags="sharing" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/lazylibrarian.sh b/ct/lazylibrarian.sh index d83db6a17..030831d4e 100644 --- a/ct/lazylibrarian.sh +++ b/ct/lazylibrarian.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://gitlab.com/LazyLibrarian/LazyLibrarian -# App Default Values APP="LazyLibrarian" var_tags="eBook" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/lidarr.sh b/ct/lidarr.sh index e80af78fc..da0a39214 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://lidarr.audio/ -# App Default Values APP="Lidarr" var_tags="arr;torrent;usenet" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 4745aefa4..3c862bb5a 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://linkwarden.app/ -# App Default Values APP="Linkwarden" var_tags="bookmark" var_cpu="2" @@ -14,11 +13,7 @@ var_disk="12" var_os="ubuntu" var_version="22.04" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/listmonk.sh b/ct/listmonk.sh index 6258e2cb1..9a1c0c156 100644 --- a/ct/listmonk.sh +++ b/ct/listmonk.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://listmonk.app/ -# App Default Values APP="listmonk" var_tags="newsletter" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/lldap.sh b/ct/lldap.sh index c0393ebb8..5103569c6 100644 --- a/ct/lldap.sh +++ b/ct/lldap.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/lldap/lldap -# App Default Values APP="lldap" var_tags="ldap" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/lubelogger.sh b/ct/lubelogger.sh index 3bc3019e2..08954784d 100644 --- a/ct/lubelogger.sh +++ b/ct/lubelogger.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://lubelogger.com/ -# App Default Values APP="LubeLogger" var_tags="vehicle;car" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/mafl.sh b/ct/mafl.sh index d6171fc36..f293bb48f 100644 --- a/ct/mafl.sh +++ b/ct/mafl.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://mafl.hywax.space/ -# App Default Values APP="Mafl" var_tags="dashboard" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 896f58092..3cbe6bf05 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://magicmirror.builders/ -# App Default Values APP="MagicMirror" var_tags="smarthome" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -32,18 +27,48 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then - if ! command -v npm >/dev/null 2>&1; then - echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 - echo "Installed NPM..." + RELEASE=$(curl -s https://api.github.com/repos/MagicMirrorOrg/MagicMirror/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]]; then touch /opt/${APP}_version.txt; fi + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop magicmirror + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + $STD apt-get update + $STD apt-get upgrade -y + rm -rf /opt/magicmirror-backup + mkdir /opt/magicmirror-backup + cp /opt/magicmirror/config/config.js /opt/magicmirror-backup + if [[ -f /opt/magicmirror/css/custom.css ]]; then + cp /opt/magicmirror/css/custom.css /opt/magicmirror-backup fi + cp -r /opt/magicmirror/modules /opt/magicmirror-backup + temp_file=$(mktemp) + wget -q "https://github.com/MagicMirrorOrg/MagicMirror/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" + tar -xzf "$temp_file" + rm -rf /opt/magicmirror + mv MagicMirror-${RELEASE} /opt/magicmirror + cd /opt/magicmirror + npm run install-mm &> /dev/null + cp /opt/magicmirror-backup/config.js /opt/magicmirror/config/ + if [[ -f /opt/magicmirror-backup/custom.css ]]; then + cp /opt/magicmirror-backup/custom.css /opt/magicmirror/css/ + fi + echo "${RELEASE}" >"/opt/${APP}_version.txt" + msg_ok "Updated ${APP} to v${RELEASE}" + + msg_info "Starting Service" + systemctl start magicmirror + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -f $temp_file + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}." fi - msg_info "Updating ${APP} LXC" - cd /opt/magicmirror - git pull &>/dev/null - npm install --only=prod --omit=dev &>/dev/null - msg_ok "Updated Successfully" exit } @@ -54,4 +79,4 @@ 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}:8080${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/ct/mariadb.sh b/ct/mariadb.sh index 1c4ca9a73..d1db6d030 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://mariadb.org/ -# App Default Values APP="MariaDB" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/matterbridge.sh b/ct/matterbridge.sh index 537de6eea..d130b7c6a 100644 --- a/ct/matterbridge.sh +++ b/ct/matterbridge.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Luligu/matterbridge -# App Default Values APP="Matterbridge" var_tags="matter;smarthome" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/mattermost.sh b/ct/mattermost.sh new file mode 100644 index 000000000..485962870 --- /dev/null +++ b/ct/mattermost.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Kaedon Cleland-Host (dracentis) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://mattermost.com/ + +APP="Mattermost" +var_tags="collaboration" +var_cpu="1" +var_ram="2048" +var_disk="8" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/apt/sources.list.d/mattermost.list ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + 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}:8065${CL}" diff --git a/ct/mediamtx.sh b/ct/mediamtx.sh index a13899e4e..05d3bfebb 100644 --- a/ct/mediamtx.sh +++ b/ct/mediamtx.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/bluenviron/mediamtx -# App Default Values APP="MediaMTX" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/medusa.sh b/ct/medusa.sh index 47abd2dc4..a6babad50 100644 --- a/ct/medusa.sh +++ b/ct/medusa.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/pymedusa/Medusa.git -# App Default Values APP="Medusa" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/memos.sh b/ct/memos.sh index 7fd9ccfae..ef854296e 100644 --- a/ct/memos.sh +++ b/ct/memos.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.usememos.com/ -# App Default Values APP="Memos" var_tags="notes" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index db64a1e80..77b6fb0d9 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://meshcentral.com/ -# App Default Values APP="MeshCentral" var_tags="remote-management" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/metube.sh b/ct/metube.sh index f25e4019b..45c9666f9 100644 --- a/ct/metube.sh +++ b/ct/metube.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/alexta69/metube -# App Default Values APP="MeTube" var_tags="media;youtube" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/minio.sh b/ct/minio.sh new file mode 100644 index 000000000..754fd9f20 --- /dev/null +++ b/ct/minio.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/minio/minio + +APP="MinIO" +var_tags="object-storage" +var_cpu="1" +var_ram="1024" +var_disk="5" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /usr/local/bin/minio ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP}" + systemctl stop minio + msg_ok "${APP} Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + mv /usr/local/bin/minio /usr/local/bin/minio_bak + wget -q https://dl.min.io/server/minio/release/linux-amd64/minio + mv minio /usr/local/bin/ + chmod +x /usr/local/bin/minio + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting ${APP}" + systemctl start minio + msg_ok "Started ${APP}" + + msg_info "Cleaning up" + rm -f /usr/local/bin/minio_bak + msg_ok "Cleaned" + + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9000${CL}" diff --git a/ct/mongodb.sh b/ct/mongodb.sh index 6d95029eb..5a3bbe3e3 100644 --- a/ct/mongodb.sh +++ b/ct/mongodb.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.mongodb.com/de-de -# App Default Values APP="MongoDB" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/monica.sh b/ct/monica.sh index cb9785875..3a43f7e1a 100644 --- a/ct/monica.sh +++ b/ct/monica.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://www.monicahq.com/ -# App Default Values APP="Monica" var_tags="network" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 504df9663..2b114a1d2 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/motioneye-project/motioneye -# App Default Values APP="Motioneye" var_tags="nvr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 9ad7e552c..302fea243 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://mosquitto.org/ -# App Default Values APP="MQTT" var_tags="mqtt" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/mylar3.sh b/ct/mylar3.sh index 745777b47..d957659a7 100644 --- a/ct/mylar3.sh +++ b/ct/mylar3.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/mylar3/mylar3 -# App Default Values APP="Mylar3" var_tags="torrent;downloader;comic" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/myspeed.sh b/ct/myspeed.sh index 0fd540c87..80fb0e01e 100644 --- a/ct/myspeed.sh +++ b/ct/myspeed.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://myspeed.dev/ -# App Default Values APP="MySpeed" var_tags="tracking" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/mysql.sh b/ct/mysql.sh index 41aeca215..a0e063c64 100644 --- a/ct/mysql.sh +++ b/ct/mysql.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.mysql.com/ -# App Default Values APP="MySQL" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/n8n.sh b/ct/n8n.sh index ee008f90a..9a75b2a2b 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://n8n.io/ -# App Default Values APP="n8n" var_tags="automation" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/navidrome.sh b/ct/navidrome.sh index d78f34777..a3577541a 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.navidrome.org/ -# App Default Values APP="Navidrome" var_tags="music" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/neo4j.sh b/ct/neo4j.sh index 9a2a3aba7..80164322d 100644 --- a/ct/neo4j.sh +++ b/ct/neo4j.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://neo4j.com/product/neo4j-graph-database/ -# App Default Values APP="Neo4j" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/netbox.sh b/ct/netbox.sh index 4f5af80e7..240657fb6 100644 --- a/ct/netbox.sh +++ b/ct/netbox.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://netboxlabs.com/ -# App Default Values APP="NetBox" var_tags="network" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index be19dd84b..f2bd834d0 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.turnkeylinux.org/nextcloud -# App Default Values APP="NextCloudPi" var_tags="cloud" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/nextpvr.sh b/ct/nextpvr.sh index a2963c03f..99b5656c3 100644 --- a/ct/nextpvr.sh +++ b/ct/nextpvr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://nextpvr.com/ -# App Default Values APP="NextPVR" var_tags="pvr" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index 4925fcda9..717a4d95e 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://nginxproxymanager.com/ -# App Default Values APP="Nginx Proxy Manager" var_tags="proxy" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors diff --git a/ct/nocodb.sh b/ct/nocodb.sh index e6d8c771f..28a2d303a 100644 --- a/ct/nocodb.sh +++ b/ct/nocodb.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.nocodb.com/ -# App Default Values APP="NocoDB" var_tags="noCode" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/node-red.sh b/ct/node-red.sh index 6c8d86870..0bde53d89 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://nodered.org/ -# App Default Values APP="Node-Red" var_tags="automation" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/nodebb.sh b/ct/nodebb.sh index a327a02b8..7317abe7f 100644 --- a/ct/nodebb.sh +++ b/ct/nodebb.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # Copyright (c) 2021-2025 community-scripts ORG # Author: MickLesk (Canbiz) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://nodebb.org/ -# App Default Values APP="NodeBB" var_tags="forum" var_disk="10" diff --git a/ct/notifiarr.sh b/ct/notifiarr.sh index 221867f63..de9f241f2 100644 --- a/ct/notifiarr.sh +++ b/ct/notifiarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://notifiarr.com/ -# App Default Values APP="Notifiarr" var_tags="arr" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/ntfy.sh b/ct/ntfy.sh index 290a3ef1a..324fcc2ac 100644 --- a/ct/ntfy.sh +++ b/ct/ntfy.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://ntfy.sh/ -# App Default Values APP="ntfy" var_tags="notification" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/nxwitness.sh b/ct/nxwitness.sh new file mode 100644 index 000000000..35fb307a8 --- /dev/null +++ b/ct/nxwitness.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://nxvms.com/download/releases/linux + +APP="NxWitness" +var_tags="nvr" +var_cpu="2" +var_ram="2048" +var_disk="8" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="0" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/systemd/system/networkoptix-mediaserver.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + BASE_URL="https://updates.networkoptix.com/default/index.html" + RELEASE=$(curl -s "$BASE_URL" | grep -oP '(?<=)[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(?=)' | head -n 1) + DETAIL_PAGE=$(curl -s "$BASE_URL#note_$RELEASE") + DOWNLOAD_URL=$(echo "$DETAIL_PAGE" | grep -oP "https://updates.networkoptix.com/default/$RELEASE/linux/nxwitness-server-[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-linux_x64\.deb" | head -n 1) + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP}" + systemctl stop networkoptix-root-tool networkoptix-mediaserver + msg_ok "${APP} Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /tmp + wget -q "$DOWNLOAD_URL" -O "nxwitness-server-$RELEASE-linux_x64.deb" + export DEBIAN_FRONTEND=noninteractive + export DEBCONF_NOWARNINGS=yes + dpkg -i nxwitness-server-$RELEASE-linux_x64.deb >/dev/null 2>&1 + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting ${APP}" + systemctl start networkoptix-root-tool networkoptix-mediaserver + msg_ok "Started ${APP}" + + msg_info "Cleaning up" + rm -f /tmp/nxwitness-server-$RELEASE-linux_x64.deb + msg_ok "Cleaned" + + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7001/${CL}" diff --git a/ct/nzbget.sh b/ct/nzbget.sh index a60e3bc4b..2413dd34c 100644 --- a/ct/nzbget.sh +++ b/ct/nzbget.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://nzbget.com/ -# App Default Values APP="NZBGet" var_tags="usenet;downloader" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/octoprint.sh b/ct/octoprint.sh index 18a868a51..2a453c070 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://octoprint.org/ -# App Default Values APP="OctoPrint" var_tags="3d-printing" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/ollama.sh b/ct/ollama.sh index f6e2fe126..03de9be5d 100644 --- a/ct/ollama.sh +++ b/ct/ollama.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://ollama.com/ -# App Default Values APP="Ollama" var_tags="ai" var_cpu="4" @@ -14,11 +13,7 @@ var_disk="24" var_os="ubuntu" var_version="22.04" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/omada.sh b/ct/omada.sh index f17fd4c82..29268da20 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.tp-link.com/us/support/download/omada-software-controller/ -# App Default Values APP="Omada" var_tags="tp-link;controller" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/ombi.sh b/ct/ombi.sh index 4dd0bc3f4..46fb0c55d 100644 --- a/ct/ombi.sh +++ b/ct/ombi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://ombi.io/ -# App Default Values APP="Ombi" var_tags="media" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/omv.sh b/ct/omv.sh index db123974c..b8636f69b 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.openmediavault.org/ -# App Default Values APP="OMV" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/onedev.sh b/ct/onedev.sh index 62f0784c0..4b095a8c2 100644 --- a/ct/onedev.sh +++ b/ct/onedev.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://onedev.io/ -# App Default Values APP="OneDev" var_tags="git" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/opengist.sh b/ct/opengist.sh index 796a0ae35..56d130f77 100644 --- a/ct/opengist.sh +++ b/ct/opengist.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://opengist.io/ -# App Default Values APP="Opengist" var_tags="development" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/openhab.sh b/ct/openhab.sh index 64723af8d..52335d7f8 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.openhab.org/ -# App Default Values APP="openHAB" var_tags="automation" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/openobserve.sh b/ct/openobserve.sh index 93bfc5477..5ccf7a863 100644 --- a/ct/openobserve.sh +++ b/ct/openobserve.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://openobserve.ai/ -# App Default Values APP="OpenObserve" var_tags="monitoring" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/openwebui.sh b/ct/openwebui.sh index f4ea170f3..96efd35d1 100644 --- a/ct/openwebui.sh +++ b/ct/openwebui.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://openwebui.com/ -# App Default Values APP="Open WebUI" var_tags="ai;interface" var_cpu="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 7bfebb444..74f9dd523 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://overseerr.dev/ -# App Default Values APP="Overseerr" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/owncast.sh b/ct/owncast.sh index fa798d78d..7ac45b0c9 100644 --- a/ct/owncast.sh +++ b/ct/owncast.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://owncast.online/ -# App Default Values APP="Owncast" var_tags="broadcasting" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pairdrop.sh b/ct/pairdrop.sh index 79e2552a5..63eb913d7 100644 --- a/ct/pairdrop.sh +++ b/ct/pairdrop.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://pairdrop.net/ -# App Default Values APP="PairDrop" var_tags="sharing" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/paperless-ai.sh b/ct/paperless-ai.sh new file mode 100644 index 000000000..c4e02d1d5 --- /dev/null +++ b/ct/paperless-ai.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/clusterzx/paperless-ai + +APP="Paperless-AI" +var_tags="ai;document" +var_cpu="2" +var_ram="2048" +var_disk="5" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/paperless-ai ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/clusterzx/paperless-ai/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop paperless-ai + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + cd /opt + mv /opt/paperless-ai /opt/paperless-ai_bak + wget -q "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip" + unzip -q v${RELEASE}.zip + mv paperless-ai-${RELEASE} /opt/paperless-ai + mkdir -p /opt/paperless-ai/data + cp -a /opt/paperless-ai_bak/data/. /opt/paperless-ai/data/ + cd /opt/paperless-ai + npm install &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start paperless-ai + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf /opt/v${RELEASE}.zip + rm -rf /opt/paperless-ai_bak + msg_ok "Cleanup Completed" + msg_ok "Update Successful" + 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}:3000${CL}" diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 33652513a..7bde9b7e5 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://docs.paperless-ngx.com/ -# App Default Values APP="Paperless-ngx" var_tags="document;management" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/part-db.sh b/ct/part-db.sh index 2b683a3ef..542642bb4 100644 --- a/ct/part-db.sh +++ b/ct/part-db.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://docs.part-db.de/ -# App Default Values APP="Part-DB" var_tags="inventory;parts" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/paymenter.sh b/ct/paymenter.sh new file mode 100644 index 000000000..fbdf78466 --- /dev/null +++ b/ct/paymenter.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Nícolas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.paymenter.org + +APP="Paymenter" +var_tags="hosting;ecommerce;marketplace;" +var_cpu="2" +var_ram="1024" +var_disk="5" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/paymenter ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating ${APP} to ${RELEASE}" + echo "${RELEASE}" >/opt/${APP}_version.txt + cd /opt/paymenter + php artisan p:upgrade --no-interaction &>/dev/null + 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}:80${CL}" diff --git a/ct/peanut.sh b/ct/peanut.sh index 833dc9427..eabec1d95 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -5,21 +5,16 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Brandawg93/PeaNUT/ -# App Default Values APP="PeaNUT" var_tags="network;ups;" var_cpu="2" -var_ram="2048" -var_disk="4" +var_ram="3072" +var_disk="7" var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/petio.sh b/ct/petio.sh index d78d54f4b..22be7222f 100644 --- a/ct/petio.sh +++ b/ct/petio.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://petio.tv/ -# App Default Values APP="Petio" var_tags="media" var_cpu="2" @@ -14,11 +13,7 @@ var_disk="4" var_os="ubuntu" var_version="20.04" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pf2etools.sh b/ct/pf2etools.sh index 9d2adcc88..c5d1ab3ae 100644 --- a/ct/pf2etools.sh +++ b/ct/pf2etools.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://pf2etools.com/ -# App Default Values APP="Pf2eTools" var_tags="wiki" var_cpu="1" @@ -15,60 +14,49 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources + header_info + check_container_storage + check_container_resources - # Check if installation is present | -f for file, -d for folder - if [[ ! -d "/opt/${APP}" ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - - RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f "/opt/${APP}_version.txt" ]]; then - # Crawling the new version and checking whether an update is required - msg_info "Updating System" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null - msg_ok "Updated System" - - # Execute Update - msg_info "Updating ${APP}" - cd /opt - wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" - unzip -q ${RELEASE}.zip - rm -rf "/opt/${APP}" - mv ${APP}-${RELEASE:1} /opt/${APP} - cd /opt/Pf2eTools - $STD npm install - $STD npm run build - echo "${RELEASE}" >"/opt/${APP}_version.txt" - msg_ok "Updated ${APP}" - - chown -R www-data: "/opt/${APP}" - chmod -R 755 "/opt/${APP}" - - # Cleaning up - msg_info "Cleaning Up" - rm -rf /opt/${RELEASE}.zip - $STD apt-get -y autoremove - $STD apt-get -y autoclean - msg_ok "Cleanup Completed" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi + if [[ ! -d "/opt/${APP}" ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + + RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f "/opt/${APP}_version.txt" ]]; then + msg_info "Updating System" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated System" + + msg_info "Updating ${APP}" + cd /opt + wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" + unzip -q ${RELEASE}.zip + rm -rf "/opt/${APP}" + mv ${APP}-${RELEASE:1} /opt/${APP} + cd /opt/Pf2eTools + npm install &>/dev/null + npm run build &>/dev/null + chown -R www-data: "/opt/${APP}" + chmod -R 755 "/opt/${APP}" + echo "${RELEASE}" >"/opt/${APP}_version.txt" + msg_ok "Updated ${APP}" + + msg_info "Cleaning Up" + rm -rf /opt/${RELEASE}.zip + msg_ok "Cleanup Completed" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit } start diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 7781012b2..d9631d65d 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.photoprism.app/ -# App Default Values APP="PhotoPrism" var_tags="media;photo" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/phpipam.sh b/ct/phpipam.sh index 40786a956..c1b85f940 100644 --- a/ct/phpipam.sh +++ b/ct/phpipam.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://phpipam.net/ -# App Default Values APP="phpIPAM" var_tags="network" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pialert.sh b/ct/pialert.sh index ede7d5c1b..27ecb891b 100644 --- a/ct/pialert.sh +++ b/ct/pialert.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/leiweibau/Pi.Alert/ -# App Default Values APP="PiAlert" var_tags="network" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pihole.sh b/ct/pihole.sh index e33f5a00f..f94224f8c 100644 --- a/ct/pihole.sh +++ b/ct/pihole.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://pi-hole.net/ -# App Default Values APP="Pihole" var_tags="adblock" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 9d7e2ed20..6b1487a11 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://stonith404.github.io/pingvin-share/introduction -# App Default Values APP="Pingvin" var_tags="sharing" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -34,7 +29,7 @@ function update_script() { fi RELEASE=$(curl -s https://api.github.com/repos/stonith404/pingvin-share/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ ! -f /opt/$pingvin_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/pingvin_version.txt)" ]]; then + if [[ ! -f /opt/pingvin_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/pingvin_version.txt)" ]]; then msg_info "Stopping Pingvin Share" systemctl stop pm2-root.service @@ -44,7 +39,7 @@ function update_script() { cd /opt wget -q "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip - mv pingvin-share-${RELEASE} /opt/pingvin-share + cp -rf pingvin-share-${RELEASE}/* /opt/pingvin-share cd /opt/pingvin-share cd backend npm install &>/dev/null @@ -54,6 +49,7 @@ function update_script() { npm run build &>/dev/null echo "${RELEASE}" >"/opt/pingvin_version.txt" rm -rf /opt/v${RELEASE}.zip + rm -rf /opt/pingvin-share-${RELEASE} msg_ok "Updated Pingvin Share to v${RELEASE}" msg_info "Starting Pingvin Share" diff --git a/ct/plex.sh b/ct/plex.sh index d88d8db18..7f6fbaee3 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.plex.tv/ -# App Default Values APP="Plex" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="22.04" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pocketbase.sh b/ct/pocketbase.sh index a3ac56aa2..48a08a0d2 100644 --- a/ct/pocketbase.sh +++ b/ct/pocketbase.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://pocketbase.io/ -# App Default Values APP="Pocketbase" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pocketid.sh b/ct/pocketid.sh index 5e717f6f8..d4d20b6e5 100755 --- a/ct/pocketid.sh +++ b/ct/pocketid.sh @@ -3,11 +3,10 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # Copyright (c) 2021-2025 community-scripts ORG # Author: Snarkenfaugister # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/stonith404/pocket-id +# Source: https://github.com/pocket-id/pocket-id -# App Default Values APP="PocketID" -TAGS="identity-provider" +var_tags="identity-provider" var_cpu="2" var_ram="2048" var_disk="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -34,7 +29,7 @@ function update_script() { exit fi - RELEASE=$(curl -fsSL https://api.github.com/repos/stonith404/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + RELEASE=$(curl -fsSL https://api.github.com/repos/pocket-id/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Updating $APP" @@ -50,7 +45,7 @@ function update_script() { cp /opt/pocket-id/backend/.env /opt/backend.env cp /opt/pocket-id/frontend/.env /opt/frontend.env rm -r /opt/pocket-id - wget -q "https://github.com/stonith404/pocket-id/archive/refs/tags/v${RELEASE}.zip" + wget -q "https://github.com/pocket-id/pocket-id/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv pocket-id-${RELEASE} /opt/pocket-id mv /opt/data /opt/pocket-id/backend/data diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 63a9175a5..f09fa6cd0 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -3,8 +3,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://www.home-assistant.io/ -# App Default Values APP="Podman-Home Assistant" var_tags="podman;smarthome" var_cpu="2" @@ -14,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors diff --git a/ct/podman.sh b/ct/podman.sh index b10fd1eaf..5d4fce123 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://podman.io/ -# App Default Values APP="Podman" var_tags="container;kubernetes" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 071f9c1ba..d07f34751 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.postgresql.org/ -# App Default Values APP="PostgreSQL" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/privatebin.sh b/ct/privatebin.sh new file mode 100644 index 000000000..d44d99897 --- /dev/null +++ b/ct/privatebin.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Nícolas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://privatebin.info/ + +APP="PrivateBin" +var_tags="paste;secure" +var_cpu="1" +var_ram="1024" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/privatebin ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/PrivateBin/PrivateBin/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating ${APP} to v${RELEASE}" + echo "${RELEASE}" >/opt/${APP}_version.txt + cp -f /opt/privatebin/cfg/conf.php /tmp/privatebin_conf.bak + wget -q "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" + unzip -q ${RELEASE}.zip + rm -rf /opt/privatebin/* + mv PrivateBin-${RELEASE}/* /opt/privatebin/ + mv /tmp/privatebin_conf.bak /opt/privatebin/cfg/conf.php + chown -R www-data:www-data /opt/privatebin + chmod -R 0755 /opt/privatebin/data + echo "${RELEASE}" >/opt/${APP}_version.txt + rm -rf ${RELEASE}.zip PrivateBin-${RELEASE} + systemctl reload nginx php8.2-fpm + msg_ok "Updated ${APP} to v${RELEASE}" + 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}https://${IP}${CL}" diff --git a/ct/projectsend.sh b/ct/projectsend.sh index f2e845662..bf8e3d91b 100644 --- a/ct/projectsend.sh +++ b/ct/projectsend.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://www.projectsend.org/ -# App Default Values APP="ProjectSend" var_tags="media" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/prometheus-alertmanager.sh b/ct/prometheus-alertmanager.sh index 826e8a144..c6c7009b3 100755 --- a/ct/prometheus-alertmanager.sh +++ b/ct/prometheus-alertmanager.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://prometheus.io/ -# App Default Values APP="Prometheus-Alertmanager" var_tags="monitoring;alerting" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/prometheus-paperless-ngx-exporter.sh b/ct/prometheus-paperless-ngx-exporter.sh new file mode 100755 index 000000000..e01a79e70 --- /dev/null +++ b/ct/prometheus-paperless-ngx-exporter.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Andy Grunwald (andygrunwald) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/hansmi/prometheus-paperless-exporter + +APP="Prometheus-Paperless-NGX-Exporter" +var_tags="monitoring;alerting" +var_cpu="1" +var_ram="256" +var_disk="2" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/systemd/system/prometheus-paperless-ngx-exporter.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/hansmi/prometheus-paperless-exporter/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 prometheus-paperless-ngx-exporter + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + wget -q https://github.com/hansmi/prometheus-paperless-exporter/releases/download/v${RELEASE}/prometheus-paperless-exporter_${RELEASE}_linux_amd64.tar.gz + tar -xf prometheus-paperless-exporter_${RELEASE}_linux_amd64.tar.gz + cp -rf prometheus-paperless-exporter_${RELEASE}_linux_amd64/prometheus-paperless-exporter /usr/local/bin/ + rm -rf prometheus-paperless-exporter_${RELEASE}_linux_amd64/ prometheus-paperless-exporter_${RELEASE}_linux_amd64.tar.gz + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to v${RELEASE}" + + msg_info "Starting ${APP}" + systemctl start prometheus-paperless-ngx-exporter + msg_ok "Started ${APP}" + 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}:8081/metrics${CL}" \ No newline at end of file diff --git a/ct/prometheus-pve-exporter.sh b/ct/prometheus-pve-exporter.sh index 198e42806..69b10a582 100644 --- a/ct/prometheus-pve-exporter.sh +++ b/ct/prometheus-pve-exporter.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/prometheus-pve/prometheus-pve-exporter -# App Default Values APP="Prometheus-PVE-Exporter" var_tags="monitoring" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -37,7 +32,7 @@ function update_script() { msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" - pip install prometheus-pve-exporter --upgrade --root-user-action=ignore &>/dev/null + pip install prometheus-pve-exporter --default-timeout=300 --upgrade --root-user-action=ignore &>/dev/null msg_ok "Updated ${APP}" msg_info "Starting ${APP}" diff --git a/ct/prometheus.sh b/ct/prometheus.sh index e8f872a90..bee687517 100644 --- a/ct/prometheus.sh +++ b/ct/prometheus.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://prometheus.io/ -# App Default Values APP="Prometheus" var_tags="monitoring" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index 14b1c06bc..c8719c92f 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://prowlarr.com/ -# App Default Values APP="Prowlarr" var_tags="arr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/pbs.sh b/ct/proxmox-backup-server.sh similarity index 52% rename from ct/pbs.sh rename to ct/proxmox-backup-server.sh index 26f27ccd3..fc4199d87 100644 --- a/ct/pbs.sh +++ b/ct/proxmox-backup-server.sh @@ -3,20 +3,9 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://www.proxmox.com/en/proxmox-backup-server -function header_info { -clear -cat <<"EOF" - ____ ____ __ _____ - / __ \_________ _ ______ ___ ____ _ __ / __ )____ ______/ /____ ______ / ___/___ ______ _____ _____ - / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ / __ / __ `/ ___/ //_/ / / / __ \ \__ \/ _ \/ ___/ | / / _ \/ ___/ - / ____/ / / /_/ /> < / /_/ / /_/ / /__/ ,< / /_/ / /_/ / ___/ / __/ / | |/ / __/ / -/_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| /_____/\__,_/\___/_/|_|\__,_/ .___/ /____/\___/_/ |___/\___/_/ - /_/ -EOF -} -header_info -APP="PBS" +APP="Proxmox-Backup-Server" var_tags="backup" var_cpu="2" var_ram="2048" @@ -25,10 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings -base_settings - -# Core +header_info "$APP" variables color catch_errors @@ -37,7 +23,7 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + if [[ ! -e /usr/sbin/proxmox-backup-manager ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null diff --git a/ct/proxmox-datacenter-manager.sh b/ct/proxmox-datacenter-manager.sh index 2d2a7ca69..4d2cab0fc 100644 --- a/ct/proxmox-datacenter-manager.sh +++ b/ct/proxmox-datacenter-manager.sh @@ -5,8 +5,7 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: Proxmox Server Solution GmbH -# App Default Values -APP="proxmox-datacenter-manager" +APP="Proxmox-Datacenter-Manager" var_tags="datacenter" var_cpu="2" var_ram="2048" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/proxmox-mail-gateway.sh b/ct/proxmox-mail-gateway.sh new file mode 100644 index 000000000..654bbc4b1 --- /dev/null +++ b/ct/proxmox-mail-gateway.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: thost96 (thost96) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.proxmox.com/en/products/proxmox-mail-gateway + +APP="Proxmox-Mail-Gateway" +var_tags="mail" +var_cpu="2" +var_ram="4096" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -e /usr/bin/pmgproxy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + msg_info "Updating ${APP}" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated ${APP}" + 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}https://${IP}:8006/${CL}" diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index 0d089a659..2cf6bf5a9 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/FunkeyFlo/ps5-mqtt/ -# App Default Values APP="PS5-MQTT" var_tags="smarthome;automation" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 734a946ba..94a4f645f 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.qbittorrent.org/ -# App Default Values APP="qBittorrent" var_tags="torrent" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/rabbitmq.sh b/ct/rabbitmq.sh index 6e027ed8f..8b6fb156f 100644 --- a/ct/rabbitmq.sh +++ b/ct/rabbitmq.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.rabbitmq.com/ -# App Default Values APP="RabbitMQ" var_tags="mqtt" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/radarr.sh b/ct/radarr.sh index ef68ae21a..6920406f3 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://radarr.video/ -# App Default Values APP="Radarr" var_tags="arr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/radicale.sh b/ct/radicale.sh new file mode 100644 index 000000000..5589abbf9 --- /dev/null +++ b/ct/radicale.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://radicale.org/ + +APP="Radicale" +var_tags="calendar" +var_cpu="1" +var_ram="512" +var_disk="2" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/radicale ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Updating ${APP}" + python3 -m venv /opt/radicale + source /opt/radicale/bin/activate + python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz + msg_ok "Updated ${APP}" + + msg_info "Starting Service" + systemctl enable -q --now radicale + msg_ok "Started Service" + + 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}:5232${CL}" \ No newline at end of file diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 55b29577c..ecb83e633 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/rogerfar/rdt-client -# App Default Values APP="RDTClient" var_tags="torrent" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/readarr.sh b/ct/readarr.sh index 3a91bdc84..6a5adf414 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://readarr.com/ -# App Default Values APP="Readarr" var_tags="media;comic;eBook" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/readeck.sh b/ct/readeck.sh index e86ecc194..b2562cf97 100644 --- a/ct/readeck.sh +++ b/ct/readeck.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://readeck.org/en/ -# App Default Values APP="Readeck" var_tags="bookmark" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/recyclarr.sh b/ct/recyclarr.sh index ff0ded33e..0b5f8cc92 100644 --- a/ct/recyclarr.sh +++ b/ct/recyclarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://recyclarr.dev/wiki/ -# App Default Values APP="Recyclarr" var_tags="arr" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/redis.sh b/ct/redis.sh index e735a969c..a9eb8e4c9 100644 --- a/ct/redis.sh +++ b/ct/redis.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://redis.io/ -# App Default Values APP="Redis" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index f45be6b1a..791a64934 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/deepch/RTSPtoWeb -# App Default Values APP="RTSPtoWeb" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/runtipi.sh b/ct/runtipi.sh index 483ff71a1..d25f4dd4f 100644 --- a/ct/runtipi.sh +++ b/ct/runtipi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://runtipi.io/ -# App Default Values APP="Runtipi" var_tags="os" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/rustdeskserver.sh b/ct/rustdeskserver.sh new file mode 100644 index 000000000..b98543283 --- /dev/null +++ b/ct/rustdeskserver.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/rustdesk/rustdesk-server + +APP="RustDesk Server" +TAGS="remote-desktop" +var_cpu="1" +var_ram="512" +var_disk="2" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -x /usr/bin/hbbr ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/rustdesk_version.txt)" ]] || [[ ! -f /opt/rustdesk_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop rustdesk-hbbr + systemctl stop rustdesk-hbbs + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + TEMPDIR=$(mktemp -d) + wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR + wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR + wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR + dpkg -i $TEMPDIR/*.deb &> /dev/null + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Cleaning Up" + rm -rf $TEMPDIR + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/rustdesk_version.txt + msg_ok "Update Successful" + 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}${IP}${CL}" diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 680f56484..fbc789a98 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://sabnzbd.org/ -# App Default Values APP="SABnzbd" var_tags="downloader" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/searxng.sh b/ct/searxng.sh new file mode 100644 index 000000000..769aa3497 --- /dev/null +++ b/ct/searxng.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/searxng/searxng + +APP="SearXNG" +var_tags="search" +var_cpu="2" +var_ram="2048" +var_disk="7" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /usr/local/searxng/searxng-src ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + if cd /usr/local/searxng/searxng-src && git pull | grep -q 'Already up to date'; then + msg_ok "There is currently no update available." + 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}:8888${CL}" diff --git a/ct/seelf.sh b/ct/seelf.sh new file mode 100644 index 000000000..481d6287f --- /dev/null +++ b/ct/seelf.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/YuukanOO/seelf + +APP="seelf" +var_tags="server;docker" +var_cpu="2" +var_ram="4096" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/seelf ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -s https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating $APP" + + msg_info "Stopping $APP" + systemctl stop seelf + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}. Patience" + export PATH=$PATH:/usr/local/go/bin + source ~/.bashrc + wget -q "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz" + tar -xzf v${RELEASE}.tar.gz + cp -r seelf-${RELEASE}/ /opt/seelf + cd /opt/seelf + make build &> /dev/null + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start seelf + msg_ok "Started $APP" + + # Cleaning up + msg_info "Cleaning Up" + rm -f ~/*.tar.gz + rm -rf ~/seelf-${RELEASE} + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + 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}:8080${CL}" \ No newline at end of file diff --git a/ct/semaphore.sh b/ct/semaphore.sh index 84b2f88f2..75d9ead1c 100644 --- a/ct/semaphore.sh +++ b/ct/semaphore.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://semaphoreui.com/ -# App Default Values APP="Semaphore" var_tags="dev_ops" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/sftpgo.sh b/ct/sftpgo.sh index 404e4120c..a4417a21f 100644 --- a/ct/sftpgo.sh +++ b/ct/sftpgo.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://sftpgo.com/ -# App Default Values APP="SFTPGo" var_tags="ftp;sftp" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/shinobi.sh b/ct/shinobi.sh index 54a26b0de..65edf345a 100644 --- a/ct/shinobi.sh +++ b/ct/shinobi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://shinobi.video/ -# App Default Values APP="Shinobi" var_tags="nvr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="22.04" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/silverbullet.sh b/ct/silverbullet.sh index 3690c7562..5d11d0ad5 100644 --- a/ct/silverbullet.sh +++ b/ct/silverbullet.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://silverbullet.md -# App default values APP="Silverbullet" var_tags="notes" var_cpu="1" @@ -14,11 +13,7 @@ var_ram="512" var_os="debian" var_version="12" -# App Output & Base Settings header_info "${APP}" -base_settings - -# Core variables color catch_errors diff --git a/ct/smokeping.sh b/ct/smokeping.sh index a2f9204b3..9527c9f95 100644 --- a/ct/smokeping.sh +++ b/ct/smokeping.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://oss.oetiker.ch/smokeping/ -# App Default Values APP="SmokePing" var_tags="network" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/snipeit.sh b/ct/snipeit.sh index 1bcf0b22b..dd37443de 100644 --- a/ct/snipeit.sh +++ b/ct/snipeit.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://snipeitapp.com/ -# App Default Values APP="SnipeIT" var_tags="assat-management;foss" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/sonarr.sh b/ct/sonarr.sh index e3caff984..44180785c 100644 --- a/ct/sonarr.sh +++ b/ct/sonarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://sonarr.tv/ -# App Default Values APP="Sonarr" var_tags="arr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/spoolman.sh b/ct/spoolman.sh index 43b02cd9d..e82fee712 100644 --- a/ct/spoolman.sh +++ b/ct/spoolman.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Donkie/Spoolman -# App Default Values APP="Spoolman" var_tags="3d-printing" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/sqlserver2022.sh b/ct/sqlserver2022.sh index fe7ab57e3..e5cd23c6f 100644 --- a/ct/sqlserver2022.sh +++ b/ct/sqlserver2022.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/kris701/ProxmoxVE/refs/heads/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Kristian Skov # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://www.microsoft.com/en-us/sql-server/sql-server-2022 -# App Default Values APP="SQL Server 2022" var_tags="sql" var_cpu="1" @@ -15,11 +14,7 @@ var_os="ubuntu" var_version="22.04" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -46,4 +41,4 @@ 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 IP:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}${IP}:1433${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}${IP}:1433${CL}" diff --git a/ct/stirling-pdf.sh b/ct/stirling-pdf.sh index d11715c03..d4ee45fc1 100644 --- a/ct/stirling-pdf.sh +++ b/ct/stirling-pdf.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.stirlingpdf.com/ -# App Default Values APP="Stirling-PDF" var_tags="pdf-editor" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/suwayomiserver.sh b/ct/suwayomiserver.sh new file mode 100644 index 000000000..3d3c7b809 --- /dev/null +++ b/ct/suwayomiserver.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Suwayomi/Suwayomi-Server + +APP="SuwayomiServer" +var_tags="media;manga" +var_cpu="1" +var_ram="1024" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /usr/bin/suwayomi-server ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(cat /opt/suwayomi-server_version.txt)" ]] || [[ ! -f /opt/suwayomi-server_version.txt ]]; then + msg_info "Updating $APP" + msg_info "Stopping $APP" + systemctl stop suwayomi-server + msg_ok "Stopped $APP" + msg_info "Updating $APP to v${RELEASE}" + cd /tmp + URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1) + wget -q $URL + $STD dpkg -i /tmp/*.deb + msg_ok "Updated $APP to v${RELEASE}" + msg_info "Starting $APP" + systemctl start suwayomi-server + msg_ok "Started $APP" + msg_info "Cleaning Up" + rm -f *.deb + msg_ok "Cleanup Completed" + echo "${RELEASE}" >/opt/suwayomi-server_version.txt.txt + msg_ok "Update Successful" + 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}:4567${CL}" diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 07cf65b14..8b9bb075f 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://syncthing.net/ -# App Default Values APP="Syncthing" var_tags="sync" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/tandoor.sh b/ct/tandoor.sh index 2f03e6cd9..d271c01d2 100644 --- a/ct/tandoor.sh +++ b/ct/tandoor.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://tandoor.dev/ -# App Default Values APP="Tandoor" var_tags="recipes" var_cpu="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh index aa29c832d..e351bd8c6 100644 --- a/ct/tasmoadmin.sh +++ b/ct/tasmoadmin.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/TasmoAdmin/TasmoAdmin -# App Default Values APP="TasmoAdmin" var_tags="tasmota;smarthome" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/tasmocompiler.sh b/ct/tasmocompiler.sh new file mode 100644 index 000000000..275b31fa0 --- /dev/null +++ b/ct/tasmocompiler.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/benzino77/tasmocompiler + +APP="TasmoCompiler" +var_tags="compiler" +var_cpu="2" +var_ram="2048" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/tasmocompiler ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/benzino77/tasmocompiler/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 tasmocompiler + msg_ok "Stopped $APP" + msg_info "Updating $APP to v${RELEASE}" + cd /opt + rm -rf /opt/tasmocompiler + RELEASE=$(curl -s https://api.github.com/repos/benzino77/tasmocompiler/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + wget -q https://github.com/benzino77/tasmocompiler/archive/refs/tags/v${RELEASE}.tar.gz + tar xzf v${RELEASE}.tar.gz + mv tasmocompiler-${RELEASE}/ /opt/tasmocompiler/ + cd /opt/tasmocompiler + yarn install &> /dev/null + export NODE_OPTIONS=--openssl-legacy-provider + npm i &> /dev/null + yarn build &> /dev/null + msg_ok "Updated $APP to v${RELEASE}" + msg_info "Starting $APP" + systemctl start tasmocompiler + msg_ok "Started $APP" + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_info "Cleaning up" + rm -r "/opt/v${RELEASE}.tar.gz" + msg_ok "Cleaned" + msg_ok "Update Successful" + 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}:3000${CL}" diff --git a/ct/tautulli.sh b/ct/tautulli.sh index 7f204ee1f..2d62bc91b 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://tautulli.com/ -# App Default Values APP="Tautulli" var_tags="media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/tdarr.sh b/ct/tdarr.sh index c75c09bfe..cdd894c3b 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://home.tdarr.io/ -# App Default Values APP="Tdarr" var_tags="arr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index bdc519c3a..52d2e9a05 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://technitium.com/dns/ -# App Default Values APP="Technitium DNS" var_tags="dns" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/teddycloud.sh b/ct/teddycloud.sh index 211b7abad..d95c27828 100644 --- a/ct/teddycloud.sh +++ b/ct/teddycloud.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/toniebox-reverse-engineering/teddycloud -# App default values APP="TeddyCloud" var_tags="media" var_cpu="2" @@ -14,11 +13,7 @@ var_ram="1024" var_os="debian" var_version="12" -# App Output & Base Settings header_info "${APP}" -base_settings - -# Core variables color catch_errors diff --git a/ct/the-lounge.sh b/ct/the-lounge.sh index 7e2af9a8b..23cc28820 100644 --- a/ct/the-lounge.sh +++ b/ct/the-lounge.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://thelounge.chat/ -# App Default Values APP="The-Lounge" var_tags="irc" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/threadfin.sh b/ct/threadfin.sh index 65bbeee15..180cad262 100644 --- a/ct/threadfin.sh +++ b/ct/threadfin.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Threadfin/Threadfin -# App Default Values APP="Threadfin" var_tags="media" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/tianji.sh b/ct/tianji.sh index 362c5ba88..fc5a443b2 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://tianji.msgbyte.com/ -# App Default Values APP="Tianji" var_tags="monitoring" var_cpu="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -45,6 +40,7 @@ function update_script() { unzip -q v${RELEASE}.zip mv tianji-${RELEASE} /opt/tianji cd tianji + export NODE_OPTIONS="--max_old_space_size=4096" pnpm install --filter @tianji/client... --config.dedupe-peer-dependents=false --frozen-lockfile >/dev/null 2>&1 pnpm build:static >/dev/null 2>&1 pnpm install --filter @tianji/server... --config.dedupe-peer-dependents=false >/dev/null 2>&1 diff --git a/ct/traccar.sh b/ct/traccar.sh index 74fe333cb..b7aae151a 100644 --- a/ct/traccar.sh +++ b/ct/traccar.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.traccar.org/ -# App Default Values APP="Traccar" var_tags="gps;tracker" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/traefik.sh b/ct/traefik.sh index 2c332ff74..27d1e2cad 100644 --- a/ct/traefik.sh +++ b/ct/traefik.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://traefik.io/ -# App Default Values APP="Traefik" var_tags="proxy" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/transmission.sh b/ct/transmission.sh index 4bcc87fa2..4cbc6398f 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://transmissionbt.com/ -# App Default Values APP="Transmission" var_tags="torrent" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/trilium.sh b/ct/trilium.sh index bc9d99e43..4e574ebe6 100644 --- a/ct/trilium.sh +++ b/ct/trilium.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://triliumnext.github.io/Docs/ -# App Default Values APP="Trilium" var_tags="notes" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -32,29 +27,40 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + if [[ ! -f /opt/${APP}_version.txt ]]; then touch /opt/${APP}_version.txt; fi RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping ${APP}" - systemctl stop trilium.service + systemctl stop trilium sleep 1 msg_ok "Stopped ${APP}" msg_info "Updating to ${RELEASE}" - wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz - tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz - cp -r trilium-linux-x64-server/* /opt/trilium/ + mkdir -p /opt/trilium_backup + mv /opt/trilium/{db,dump-db} /opt/trilium_backup/ + rm -rf /opt/trilium + cd /tmp + wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-linux-x64-${RELEASE}.tar.xz + tar -xf TriliumNextNotes-linux-x64-${RELEASE}.tar.xz + mv trilium-linux-x64-server /opt/trilium + cp -r /opt/trilium_backup/{db,dump-db} /opt/trilium/ + echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated to ${RELEASE}" msg_info "Cleaning up" - rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz trilium-linux-x64-server + rm -rf /tmp/TriliumNextNotes-linux-x64-${RELEASE}.tar.xz + rm -rf /opt/trilium_backup msg_ok "Cleaned" msg_info "Starting ${APP}" - systemctl start trilium.service + systemctl start trilium sleep 1 msg_ok "Started ${APP}" msg_ok "Updated Successfully" - exit + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit } start @@ -64,4 +70,4 @@ 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}:8080${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/ct/typesense.sh b/ct/typesense.sh index 70c0553e7..f17dbce9e 100644 --- a/ct/typesense.sh +++ b/ct/typesense.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://typesense.org/ -# App Default Values APP="TypeSense" var_tags="database" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 9930d36aa..6be9d3acf 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://ubuntu.com/ -# App Default Values echo -e "Loading..." APP="Ubuntu" var_tags="os" @@ -15,11 +14,7 @@ var_disk="2" var_os="ubuntu" var_version="24.04" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/umami.sh b/ct/umami.sh index d40ff02c2..161363a86 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://umami.is/ -# App Default Values APP="Umami" var_tags="analytics" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/umbrel.sh b/ct/umbrel.sh index 38552d992..49a6527fd 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://umbrel.com/ -# App Default Values APP="Umbrel" var_tags="os" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/unbound.sh b/ct/unbound.sh index 81a9496e5..27e684ee8 100644 --- a/ct/unbound.sh +++ b/ct/unbound.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/NLnetLabs/unbound -# App Default Values APP="Unbound" var_tags="dns" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/unifi.sh b/ct/unifi.sh index 7ddb65d27..9895c0428 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://ui.com/download/unifi -# App Default Values APP="Unifi" var_tags="network;controller;unifi" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/unmanic.sh b/ct/unmanic.sh index 83b1fc7e4..9050225e1 100644 --- a/ct/unmanic.sh +++ b/ct/unmanic.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://docs.unmanic.app/ -# App Default Values APP="Unmanic" var_tags="file;media" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index ea3f41f1a..5c8669555 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://uptime.kuma.pet/ -# App Default Values APP="Uptime Kuma" var_tags="analytics;monitoring" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/urbackupserver.sh b/ct/urbackupserver.sh index 7ebcffb87..5383002b3 100644 --- a/ct/urbackupserver.sh +++ b/ct/urbackupserver.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash -source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/refs/heads/main/misc/build.func) +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: Kristian Skov # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://www.urbackup.org/ -# App Default Values APP="UrBackup Server" var_tags="web" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -43,6 +38,9 @@ start build_container description +pct set $CTID -features fuse=1,nesting=1 +pct reboot $CTID + 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 IP:${CL}" diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 47887b872..9e317c7ae 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.vaultwarden.net/ -# App Default Values APP="Vaultwarden" var_tags="password-manager" var_cpu="4" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/vikunja.sh b/ct/vikunja.sh index 35b20791a..62da510c8 100644 --- a/ct/vikunja.sh +++ b/ct/vikunja.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://vikunja.io/ -# App Default Values APP="Vikunja" var_tags="todo-app" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/wallos.sh b/ct/wallos.sh index afbd87d0f..59e5be581 100644 --- a/ct/wallos.sh +++ b/ct/wallos.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://wallosapp.com/ -# App Default Values APP="Wallos" var_tags="finance" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/wastebin.sh b/ct/wastebin.sh index bd3575193..8508e2067 100644 --- a/ct/wastebin.sh +++ b/ct/wastebin.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/matze/wastebin -# App Default Values APP="Wastebin" var_tags="file;code" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/watcharr.sh b/ct/watcharr.sh new file mode 100644 index 000000000..dd0f7835a --- /dev/null +++ b/ct/watcharr.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# 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/sbondCo/Watcharr + +APP="Watcharr" +var_tags="media" +var_cpu="1" +var_ram="1024" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/watcharr ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/sbondCo/Watcharr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating $APP" + + msg_info "Stopping $APP" + systemctl stop watcharr + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + temp_file=$(mktemp) + temp_folder=$(mktemp -d) + wget -q "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" + tar -xzf "$temp_file" -C "$temp_folder" + rm -f /opt/watcharr/server/watcharr + rm -rf /opt/watcharr/server/ui + cp -rf ${temp_folder}/Watcharr-${RELEASE}/* /opt/watcharr + cd /opt/watcharr + export GOOS=linux + npm i &> /dev/null + npm run build &> /dev/null + mv ./build ./server/ui + cd server + go mod download + go build -o ./watcharr + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start watcharr + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -f ${temp_file} + rm -rf ${temp_folder} + msg_ok "Cleanup Completed" + + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + 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}:3080${CL}" diff --git a/ct/watchyourlan.sh b/ct/watchyourlan.sh index 2fb5480b0..b7a8cbfe5 100644 --- a/ct/watchyourlan.sh +++ b/ct/watchyourlan.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/aceberg/WatchYourLAN -# App Default Values APP="WatchYourLAN" var_tags="network" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/wavelog.sh b/ct/wavelog.sh index e36321fd4..94c29d231 100644 --- a/ct/wavelog.sh +++ b/ct/wavelog.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.wavelog.org/ -# App Default Values APP="Wavelog" var_tags="radio-logging" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/whisparr.sh b/ct/whisparr.sh index 359e6a643..aa6e02349 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/Whisparr/Whisparr -# App Default Values APP="Whisparr" var_tags="arr" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/whoogle.sh b/ct/whoogle.sh index b22638fee..e7071043f 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/benbusby/whoogle-search -# App Default Values APP="Whoogle" var_tags="network;seaching" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 1a0894861..4fab17d2e 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -5,21 +5,16 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://js.wiki/ -# App Default Values APP="Wikijs" var_tags="wiki" -var_cpu="1" -var_ram="512" -var_disk="3" +var_cpu="2" +var_ram="2048" +var_disk="10" var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -68,4 +63,4 @@ 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}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 50409bb7b..9016b96d5 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.wireguard.com/ -# App Default Values APP="Wireguard" var_tags="network;vpn" var_cpu="1" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/wordpress.sh b/ct/wordpress.sh index e9ce11f53..c6672d516 100644 --- a/ct/wordpress.sh +++ b/ct/wordpress.sh @@ -14,11 +14,7 @@ var_ram="2048" var_os="debian" var_version="12" -# App Output & Base Settings -header_info "$APP" -base_settings - -# Core +header_info "$APP" variables color catch_errors diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 051417748..7a31e4d5f 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://yunohost.org/ -# App Default Values APP="YunoHost" var_tags="os" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/zabbix.sh b/ct/zabbix.sh index 43de325e4..f4770a919 100644 --- a/ct/zabbix.sh +++ b/ct/zabbix.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.zabbix.com/ -# App Default Values APP="Zabbix" var_tags="monitoring" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/zammad.sh b/ct/zammad.sh index c6cffb37c..a28662a4b 100644 --- a/ct/zammad.sh +++ b/ct/zammad.sh @@ -5,9 +5,8 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://zammad.com -#App Default Values APP="Zammad" -TAGS="webserver;ticket-system" +var_tags="webserver;ticket-system" var_disk="8" var_cpu="2" var_ram="4096" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/zerotier-one.sh b/ct/zerotier-one.sh new file mode 100644 index 000000000..f8a94787d --- /dev/null +++ b/ct/zerotier-one.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.zerotier.com/ + + +APP="Zerotier-One" +var_tags="networking" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /usr/sbin/zerotier-one ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping Service" + systemctl stop zerotier-one + msg_ok "Stopping Service" + msg_info "Updating ${APP}" + apt-get update &>/dev/null + apt-get -y upgrade + msg_ok "Updated ${APP}" + + msg_info "Starting Service" + systemctl start zerotier-one + msg_ok "Started Service" + 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 IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:3443${CL}" diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index a22b4ae4f..8af3d1719 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://www.zigbee2mqtt.io/ -# App Default Values APP="Zigbee2MQTT" var_tags="smarthome;zigbee;mqtt" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -39,24 +34,33 @@ function update_script() { msg_ok "Stopped Service" msg_info "Creating Backup" - mkdir -p /opt/z2m_backup - tar -czf /opt/z2m_backup/${APP}_backup_$(date +%Y%m%d%H%M%S).tar.gz -C /opt zigbee2mqtt &>/dev/null - mv /opt/zigbee2mqtt/data /opt/z2m_backup + rm -rf /opt/${APP}_backup*.tar.gz + mkdir -p /opt/z2m_backup + tar -czf /opt/z2m_backup/${APP}_backup_$(date +%Y%m%d%H%M%S).tar.gz -C /opt zigbee2mqtt &>/dev/null + mv /opt/zigbee2mqtt/data /opt/z2m_backup msg_ok "Backup Created" msg_info "Updating ${APP} to v${RELEASE}" - cd /opt - wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip" - unzip -q ${RELEASE}.zip - mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt - rm -rf /opt/zigbee2mqtt/data - mv /opt/z2m_backup/data /opt/zigbee2mqtt - cd /opt/zigbee2mqtt - pnpm install --frozen-lockfile &>/dev/null - pnpm build &>/dev/null + cd /opt + wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip" + unzip -q ${RELEASE}.zip + rm -rf /opt/zigbee2mqtt + mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt + rm -rf /opt/zigbee2mqtt/data + mv /opt/z2m_backup/data /opt/zigbee2mqtt + cd /opt/zigbee2mqtt + pnpm install --frozen-lockfile &>/dev/null + pnpm build &>/dev/null + msg_ok "Updated Zigbee2MQTT" + msg_info "Starting Service" - systemctl start zigbee2mqtt + systemctl start zigbee2mqtt msg_ok "Started Service" + + msg_info "Cleaning up" + rm -rf /opt/z2m_backup + rm -rf /opt/${RELEASE}.zip + msg_ok "Cleaned up" echo "${RELEASE}" >/opt/${APP}_version.txt else msg_ok "No update required. ${APP} is already at v${RELEASE}." diff --git a/ct/zipline.sh b/ct/zipline.sh index 9c53ce09b..fce9027db 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://zipline.diced.sh/ -# App Default Values APP="Zipline" var_tags="file;sharing" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors @@ -31,6 +26,12 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + if ! command -v pnpm &>/dev/null; then + msg_info "Installing pnpm" + #export NODE_OPTIONS=--openssl-legacy-provider + npm install -g pnpm@latest &>/dev/null + msg_ok "Installed pnpm" + fi RELEASE=$(curl -s https://api.github.com/repos/diced/zipline/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}" @@ -45,8 +46,8 @@ function update_script() { mv zipline-${RELEASE} /opt/zipline cd /opt/zipline mv /opt/.env /opt/zipline/.env - yarn install &>/dev/null - yarn build &>/dev/null + pnpm install &>/dev/null + pnpm build &>/dev/null echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" @@ -71,4 +72,4 @@ 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}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/zitadel.sh b/ct/zitadel.sh new file mode 100644 index 000000000..ce97e205a --- /dev/null +++ b/ct/zitadel.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: dave-yap (dave-yap) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://zitadel.com/ + +APP="Zitadel" +var_tags="identity-provider" +var_cpu="1" +var_ram="1024" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/systemd/system/zitadel.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -si https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt | grep -oP '\d+\.\d+\.\d+')" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop zitadel + msg_ok "Stopped $APP" + + msg_info "Updating $APP to ${RELEASE}" + cd /tmp + wget -qc https://github.com/zitadel/zitadel/releases/download/$RELEASE/zitadel-linux-amd64.tar.gz -O - | tar -xz + mv zitadel-linux-amd64/zitadel /usr/local/bin + zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Starting $APP" + systemctl start zitadel + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf /tmp/zitadel-linux-amd64 + msg_ok "Cleanup Completed" + msg_ok "Update Successful" + 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}:8080/ui/console${CL}" diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index bd4ef07fb..ee16c7c80 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://zoraxy.aroz.org/ -# App Default Values APP="Zoraxy" var_tags="network" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="1" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/ct/zwave-js-ui.sh b/ct/zwave-js-ui.sh index 04592a551..83407d3e1 100644 --- a/ct/zwave-js-ui.sh +++ b/ct/zwave-js-ui.sh @@ -5,7 +5,6 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://zwave-js.github.io/zwave-js-ui/#/ -# App Default Values APP="Zwave-JS-UI" var_tags="smarthome;zwave" var_cpu="2" @@ -15,11 +14,7 @@ var_os="debian" var_version="12" var_unprivileged="0" -# App Output & Base Settings header_info "$APP" -base_settings - -# Core variables color catch_errors diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 24dc75d9d..3ac30e981 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -23,6 +23,8 @@ "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.2", "@vercel/analytics": "^1.2.2", + "chart.js": "^4.4.1", + "chartjs-plugin-datalabels": "^2.2.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -37,6 +39,7 @@ "pocketbase": "^0.21.4", "prettier-plugin-organize-imports": "^4.1.0", "react": "19.0.0-rc-02c0e824-20241028", + "react-chartjs-2": "^5.3.0", "react-code-blocks": "^0.1.6", "react-datepicker": "^7.6.0", "react-day-picker": "8.10.1", @@ -1539,6 +1542,12 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kurkle/color": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz", + "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==", + "license": "MIT" + }, "node_modules/@next/env": { "version": "15.1.3", "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.3.tgz", @@ -4119,6 +4128,27 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/chart.js": { + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz", + "integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==", + "license": "MIT", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, + "node_modules/chartjs-plugin-datalabels": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chartjs-plugin-datalabels/-/chartjs-plugin-datalabels-2.2.0.tgz", + "integrity": "sha512-14ZU30lH7n89oq+A4bWaJPnAG8a7ZTk7dKf48YAzMvJjQtjrgg5Dpk9f+LbjCF6bpx3RAGTeL13IXpKQYyRvlw==", + "license": "MIT", + "peerDependencies": { + "chart.js": ">=3.0.0" + } + }, "node_modules/check-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", @@ -7964,6 +7994,16 @@ "node": ">=0.10.0" } }, + "node_modules/react-chartjs-2": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.3.0.tgz", + "integrity": "sha512-UfZZFnDsERI3c3CZGxzvNJd02SHjaSJ8kgW1djn65H1KK8rehwTjyrRKOG3VTMG8wtHZ5rgAO5oTHtHi9GCCmw==", + "license": "MIT", + "peerDependencies": { + "chart.js": "^4.1.1", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/react-code-blocks": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/react-code-blocks/-/react-code-blocks-0.1.6.tgz", diff --git a/frontend/package.json b/frontend/package.json index 38c64f0ca..3457b6a22 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,6 +34,8 @@ "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.2", "@vercel/analytics": "^1.2.2", + "chart.js": "^4.4.1", + "chartjs-plugin-datalabels": "^2.2.0", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -48,6 +50,7 @@ "pocketbase": "^0.21.4", "prettier-plugin-organize-imports": "^4.1.0", "react": "19.0.0-rc-02c0e824-20241028", + "react-chartjs-2": "^5.3.0", "react-code-blocks": "^0.1.6", "react-datepicker": "^7.6.0", "react-day-picker": "8.10.1", @@ -64,20 +67,20 @@ "@testing-library/dom": "^10.4.0", "@testing-library/react": "^16.0.1", "@types/node": "^22", - "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "@types/react": "npm:types-react@19.0.0-rc.1", + "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "@typescript-eslint/eslint-plugin": "^8.8.1", "@typescript-eslint/parser": "^8.8.1", "@vitejs/plugin-react": "^4.3.4", - "eslint-config-next": "15.0.2", "eslint": "^9.13.0", + "eslint-config-next": "15.0.2", "jsdom": "^25.0.1", "postcss": "^8", - "prettier-plugin-tailwindcss": "^0.6.5", "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.6.5", + "tailwindcss": "^3.4.9", "tailwindcss-animate": "^1.0.7", "tailwindcss-animated": "^1.1.2", - "tailwindcss": "^3.4.9", "typescript": "^5", "vite-tsconfig-paths": "^5.1.3", "vitest": "^2.1.9" diff --git a/frontend/src/app/data/page.tsx b/frontend/src/app/data/page.tsx index 59be8a01d..e78b4a675 100644 --- a/frontend/src/app/data/page.tsx +++ b/frontend/src/app/data/page.tsx @@ -3,8 +3,7 @@ import React, { useEffect, useState } from "react"; import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; -import { string } from "zod"; - +import ApplicationChart from "../../components/ApplicationChart"; interface DataModel { id: number; @@ -12,17 +11,16 @@ interface DataModel { disk_size: number; core_count: number; ram_size: number; - verbose: string; os_type: string; os_version: string; - hn: string; disableip6: string; - ssh: string; - tags: string; nsapp: string; created_at: string; method: string; pve_version: string; + status: string; + error: string; + type: string; } @@ -34,9 +32,12 @@ const DataFetcher: React.FC = () => { const [startDate, setStartDate] = useState(null); const [endDate, setEndDate] = useState(null); const [sortConfig, setSortConfig] = useState<{ key: keyof DataModel | null, direction: 'ascending' | 'descending' }>({ key: 'id', direction: 'descending' }); - const [itemsPerPage, setItemsPerPage] = useState(5); + const [itemsPerPage, setItemsPerPage] = useState(25); const [currentPage, setCurrentPage] = useState(1); + const [showErrorRow, setShowErrorRow] = useState(null); + + useEffect(() => { const fetchData = async () => { try { @@ -115,9 +116,27 @@ const DataFetcher: React.FC = () => { const paginatedData = sortedData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage); + if (loading) return

Loading...

; if (error) return

Error: {error}

; + var installingCounts: number = 0; + var failedCounts: number = 0; + var doneCounts: number = 0 + var unknownCounts: number = 0; + data.forEach((item) => { + if (item.status === "installing") { + installingCounts += 1; + } else if (item.status === "failed") { + failedCounts += 1; + } + else if (item.status === "done") { + doneCounts += 1; + } + else { + unknownCounts += 1; + } + }); return (
@@ -159,13 +178,15 @@ const DataFetcher: React.FC = () => {
+

{filteredData.length} results found

+

Status Legend: 🔄 installing {installingCounts} | ✔️ completetd {doneCounts} | ❌ failed {failedCounts} | ❓ unknown {unknownCounts}

@@ -173,36 +194,63 @@ const DataFetcher: React.FC = () => { + + - - - - + {paginatedData.map((item, index) => ( + + - - - - + ))} diff --git a/frontend/src/app/json-editor/_components/InstallMethod.tsx b/frontend/src/app/json-editor/_components/InstallMethod.tsx index 792ec403a..8a597c5d0 100644 --- a/frontend/src/app/json-editor/_components/InstallMethod.tsx +++ b/frontend/src/app/json-editor/_components/InstallMethod.tsx @@ -64,8 +64,8 @@ function InstallMethod({ if (key === "type") { updatedMethod.script = value === "alpine" - ? `/${prev.type}/alpine-${prev.slug}.sh` - : `/${prev.type}/${prev.slug}.sh`; + ? `${prev.type}/alpine-${prev.slug}.sh` + : `${prev.type}/${prev.slug}.sh`; // Set OS to Alpine and reset version if type is alpine if (value === "alpine") { diff --git a/frontend/src/app/json-editor/page.tsx b/frontend/src/app/json-editor/page.tsx index 4986378ef..4e161557f 100644 --- a/frontend/src/app/json-editor/page.tsx +++ b/frontend/src/app/json-editor/page.tsx @@ -23,7 +23,7 @@ import { fetchCategories } from "@/lib/data"; import { Category } from "@/lib/types"; import { cn } from "@/lib/utils"; import { format } from "date-fns"; -import { CalendarIcon, Check, Clipboard } from "lucide-react"; +import { CalendarIcon, Check, Clipboard, Download } from "lucide-react"; import { useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; import { z } from "zod"; @@ -76,8 +76,8 @@ export default function JSONGenerator() { ...method, script: method.type === "alpine" - ? `/${updated.type}/alpine-${updated.slug}.sh` - : `/${updated.type}/${updated.slug}.sh`, + ? `${updated.type}/alpine-${updated.slug}.sh` + : `${updated.type}/${updated.slug}.sh`, })); } @@ -97,6 +97,21 @@ export default function JSONGenerator() { toast.success("Copied metadata to clipboard"); }, [script]); + const handleDownload = useCallback(() => { + const jsonString = JSON.stringify(script, null, 2); + const blob = new Blob([jsonString], { type: "application/json" }); + const url = URL.createObjectURL(blob); + + const a = document.createElement("a"); + a.href = url; + a.download = `${script.slug || "script"}.json`; + document.body.appendChild(a); + a.click(); + + URL.revokeObjectURL(url); + document.body.removeChild(a); + }, [script]); + const handleDateSelect = useCallback( (date: Date | undefined) => { updateScript("date_created", format(date || new Date(), "yyyy-MM-dd")); @@ -313,18 +328,23 @@ export default function JSONGenerator() {
{validationAlert}
- +
+ + +
+
             {JSON.stringify(script, null, 2)}
           
diff --git a/frontend/src/app/scripts/_components/ScriptAccordion.tsx b/frontend/src/app/scripts/_components/ScriptAccordion.tsx index c7dfa0a53..95f8187df 100644 --- a/frontend/src/app/scripts/_components/ScriptAccordion.tsx +++ b/frontend/src/app/scripts/_components/ScriptAccordion.tsx @@ -72,7 +72,7 @@ export default function ScriptAccordion({ )} >
- {category.name} + {category.name} {category.scripts.length} diff --git a/frontend/src/components/ApplicationChart.tsx b/frontend/src/components/ApplicationChart.tsx new file mode 100644 index 000000000..e62c10961 --- /dev/null +++ b/frontend/src/components/ApplicationChart.tsx @@ -0,0 +1,193 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; +import { Chart as ChartJS, ArcElement, Tooltip as ChartTooltip, Legend } from "chart.js"; +import ChartDataLabels from "chartjs-plugin-datalabels"; +import { BarChart3, PieChart } from "lucide-react"; +import React, { useState } from "react"; +import { Pie } from "react-chartjs-2"; + +ChartJS.register(ArcElement, ChartTooltip, Legend, ChartDataLabels); + +interface ApplicationChartProps { + data: { nsapp: string }[]; +} + +const ITEMS_PER_PAGE = 20; +const CHART_COLORS = [ + "#ff6384", + "#36a2eb", + "#ffce56", + "#4bc0c0", + "#9966ff", + "#ff9f40", + "#4dc9f6", + "#f67019", + "#537bc4", + "#acc236", + "#166a8f", + "#00a950", + "#58595b", + "#8549ba", +]; + +export default function ApplicationChart({ data }: ApplicationChartProps) { + const [isChartOpen, setIsChartOpen] = useState(false); + const [isTableOpen, setIsTableOpen] = useState(false); + const [chartStartIndex, setChartStartIndex] = useState(0); + const [tableLimit, setTableLimit] = useState(ITEMS_PER_PAGE); + + // Calculate application counts + const appCounts = data.reduce((acc, item) => { + acc[item.nsapp] = (acc[item.nsapp] || 0) + 1; + return acc; + }, {} as Record); + + const sortedApps = Object.entries(appCounts) + .sort(([, a], [, b]) => b - a); + + const chartApps = sortedApps.slice( + chartStartIndex, + chartStartIndex + ITEMS_PER_PAGE + ); + + const chartData = { + labels: chartApps.map(([name]) => name), + datasets: [ + { + data: chartApps.map(([, count]) => count), + backgroundColor: CHART_COLORS, + }, + ], + }; + + const chartOptions = { + plugins: { + legend: { display: false }, + datalabels: { + color: "white", + font: { weight: "bold" as const }, + formatter: (value: number, context: any) => { + const label = context.chart.data.labels?.[context.dataIndex]; + return `${label}\n(${value})`; + }, + }, + }, + responsive: true, + maintainAspectRatio: false, + }; + + return ( +
+ + + + + + Open Chart View + + + + + + + Open Table View + + + + + + + Applications Distribution + +
+ +
+
+ + +
+
+
+ + + + + Applications Count + +
+
requestSort('status')}>Status requestSort('type')}>Type requestSort('nsapp')}>Application requestSort('os_type')}>OS requestSort('os_version')}>OS Version requestSort('disk_size')}>Disk Size requestSort('core_count')}>Core Count requestSort('ram_size')}>RAM Size requestSort('hn')}>Hostname requestSort('ssh')}>SSH requestSort('verbose')}>Verb requestSort('tags')}>Tags requestSort('method')}>Method requestSort('pve_version')}>PVE Version requestSort('error')}>Error Message requestSort('created_at')}>Created At
+ {item.status === "done" ? ( + "✔️" + ) : item.status === "failed" ? ( + "❌" + ) : item.status === "installing" ? ( + "🔄" + ) : ( + item.status + )} + {item.type === "lxc" ? ( + "📦" + ) : item.type === "vm" ? ( + "🖥️" + ) : ( + item.type + )} {item.nsapp} {item.os_type} {item.os_version} {item.disk_size} {item.core_count} {item.ram_size}{item.hn}{item.ssh}{item.verbose}{item.tags.replace(/;/g, ' ')} {item.method} {item.pve_version} + {item.error && item.error !== "none" ? ( + showErrorRow === index ? ( + <> + {item.error} + + + ) : ( + + ) + ) : ( + "none" + )} + {formatDate(item.created_at)}
+ + + Application + Count + + + + {sortedApps.slice(0, tableLimit).map(([name, count]) => ( + + {name} + {count} + + ))} + +
+
+ {tableLimit < sortedApps.length && ( + + )} + + + + ); +} \ No newline at end of file diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 56062d6fe..6aa404b63 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -1,22 +1,41 @@ import { basePath } from "@/config/siteConfig"; import Link from "next/link"; +import { FileJson, Server, ExternalLink } from "lucide-react"; +import { buttonVariants } from "./ui/button"; +import { cn } from "@/lib/utils"; export default function Footer() { return ( -
-
-
- Website built by the community. The source code is avaliable on{" "} +
+
+
+

+ Website built by the community. The source code is available on{" "} + + GitHub + + . +

+
+
- GitHub + JSON Editor + + + API Data - .
diff --git a/frontend/src/components/Modal.tsx b/frontend/src/components/Modal.tsx new file mode 100644 index 000000000..eedc1dcb1 --- /dev/null +++ b/frontend/src/components/Modal.tsx @@ -0,0 +1,29 @@ +"use client"; + +import React from "react"; + +interface ModalProps { + isOpen: boolean; + onClose: () => void; + children: React.ReactNode; +} + +const Modal: React.FC = ({ isOpen, onClose, children }) => { + if (!isOpen) return null; + + return ( +
+
+ + {children} +
+
+ ); +}; + +export default Modal; diff --git a/frontend/src/components/ui/command.tsx b/frontend/src/components/ui/command.tsx index c79b59ebe..e90fbef41 100644 --- a/frontend/src/components/ui/command.tsx +++ b/frontend/src/components/ui/command.tsx @@ -15,7 +15,7 @@ const Command = React.forwardRef< +>(({ className, ...props }, ref) => ( +
+ + +)) +Table.displayName = "Table" + +const TableHeader = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableHeader.displayName = "TableHeader" + +const TableBody = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableBody.displayName = "TableBody" + +const TableFooter = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + tr]:last:border-b-0", + className + )} + {...props} + /> +)) +TableFooter.displayName = "TableFooter" + +const TableRow = React.forwardRef< + HTMLTableRowElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)) +TableRow.displayName = "TableRow" + +const TableHead = React.forwardRef< + HTMLTableCellElement, + React.ThHTMLAttributes +>(({ className, ...props }, ref) => ( +
[role=checkbox]]:translate-y-[2px]", + className + )} + {...props} + /> +)) +TableHead.displayName = "TableHead" + +const TableCell = React.forwardRef< + HTMLTableCellElement, + React.TdHTMLAttributes +>(({ className, ...props }, ref) => ( + [role=checkbox]]:translate-y-[2px]", + className + )} + {...props} + /> +)) +TableCell.displayName = "TableCell" + +const TableCaption = React.forwardRef< + HTMLTableCaptionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)) +TableCaption.displayName = "TableCaption" + +export { + Table, + TableHeader, + TableBody, + TableFooter, + TableHead, + TableRow, + TableCell, + TableCaption, +} diff --git a/install/5etools-install.sh b/install/5etools-install.sh deleted file mode 100644 index 88cba94c9..000000000 --- a/install/5etools-install.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: TheRealVira -# License: MIT -# Source: https://5e.tools/ - -# Import Functions und Setup -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 \ - curl \ - mc \ - sudo \ - git \ - gpg \ - ca-certificates \ - apache2 \ - wget \ - openssh-server -msg_ok "Installed Dependencies" - -msg_info "Setting up Node.js Repository" -mkdir -p /etc/apt/keyrings -curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list -msg_ok "Set up Node.js Repository" - -msg_info "Installing Node.js" -$STD apt-get update -$STD apt-get install -y nodejs -msg_ok "Installed Node.js" - -# Setup App -msg_info "Set up 5etools Base" -cd /opt -RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-3/5etools-src/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -wget -q "https://github.com/5etools-mirror-3/5etools-src/archive/refs/tags/${RELEASE}.zip" -unzip -q "${RELEASE}.zip" -mv "5etools-src-${RELEASE:1}" /opt/5etools -cd /opt/5etools -$STD npm install -$STD npm run build -echo "${RELEASE}" >"/opt/5etools_version.txt" -msg_ok "Set up 5etools Base" - -msg_info "Set up 5etools Image" -cd /opt -IMG_RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-2/5etools-img/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -sSL "https://github.com/5etools-mirror-2/5etools-img/archive/refs/tags/${IMG_RELEASE}.zip" > "${IMG_RELEASE}.zip" -unzip -q "${IMG_RELEASE}.zip" -mv "5etools-img-${IMG_RELEASE:1}" /opt/5etools/img -echo "${IMG_RELEASE}" >"/opt/5etools_IMG_version.txt" -msg_ok "Set up 5etools Image" - -msg_info "Creating Service" -cat <> /etc/apache2/apache2.conf - - SetHandler server-status - Order deny,allow - Allow from all - -EOF -rm -rf /var/www/html -ln -s "/opt/5etools" /var/www/html -chown -R www-data: "/opt/5etools" -chmod -R 755 "/opt/5etools" -msg_ok "Created Service" - -msg_info "Cleaning up" -rm -rf /opt/${IMG_RELEASE}.zip -rm -rf /opt/${RELEASE}.zip -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" - -motd_ssh -customize diff --git a/install/actualbudget-install.sh b/install/actualbudget-install.sh index 7cb40070d..0aab11297 100644 --- a/install/actualbudget-install.sh +++ b/install/actualbudget-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://actualbudget.org/ source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -43,18 +43,32 @@ RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/late wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz tar -xzf v${RELEASE}.tar.gz mv *ctual-server-* /opt/actualbudget -mkdir -p /opt/actualbudget/server-files -mkdir -p /opt/actualbudget-data -chown -R root:root /opt/actualbudget/server-files -chmod 755 /opt/actualbudget/server-files -cat < /opt/actualbudget/.env -ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files + +mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config} +chown -R root:root /opt/actualbudget-data +chmod -R 755 /opt/actualbudget-data + +cat < /opt/actualbudget-data/.env +ACTUAL_UPLOAD_DIR=/opt/actualbudget-data/upload ACTUAL_DATA_DIR=/opt/actualbudget-data -ACTUAL_SERVER_FILES_DIR=/opt/actualbudget/server-files +ACTUAL_SERVER_FILES_DIR=/opt/actualbudget-data/server-files +ACTUAL_USER_FILES=/opt/actualbudget-data/user-files PORT=5006 +ACTUAL_TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1/32,::1/128,fc00::/7" +ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key +ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt EOF cd /opt/actualbudget $STD yarn install +$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt <"/opt/actualbudget_version.txt" msg_ok "Installed Actual Budget" @@ -69,7 +83,7 @@ Type=simple User=root Group=root WorkingDirectory=/opt/actualbudget -EnvironmentFile=/opt/actualbudget/.env +EnvironmentFile=/opt/actualbudget-data/.env ExecStart=/usr/bin/yarn start Restart=always RestartSec=10 diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh index d336ab322..dc8b531eb 100644 --- a/install/adventurelog-install.sh +++ b/install/adventurelog-install.sh @@ -34,7 +34,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Setting up PostgreSQL Repository" diff --git a/install/alpine-it-tools-install.sh b/install/alpine-it-tools-install.sh new file mode 100644 index 000000000..534535b39 --- /dev/null +++ b/install/alpine-it-tools-install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: nicedevil007 (NiceDevil) +# 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 apk add \ + curl \ + mc \ + openssh \ + nginx \ + unzip +msg_ok "Installed Dependencies" + +msg_info "Installing IT-Tools" +RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4) +DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" + +curl -fsSL -o it-tools.zip "$DOWNLOAD_URL" +mkdir -p /usr/share/nginx/html +unzip -q it-tools.zip -d /tmp/it-tools +cp -r /tmp/it-tools/dist/* /usr/share/nginx/html +cat <<'EOF' > /etc/nginx/http.d/default.conf +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +} +EOF +$STD rc-update add nginx default +$STD rc-service nginx start +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed IT-Tools" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /tmp/it-tools +rm -f it-tools.zip +$STD apk cache clean +msg_ok "Cleaned" diff --git a/install/apache-guacamole-install.sh b/install/apache-guacamole-install.sh index 6588b57ba..8af636c6f 100644 --- a/install/apache-guacamole-install.sh +++ b/install/apache-guacamole-install.sh @@ -43,7 +43,7 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Setup Apache Tomcat" -RELEASE=$(wget -qO- https://dlcdn.apache.org/tomcat/tomcat-9/ | grep -oP '(?<=href=")v[^"/]+(?=/")' | sed 's/^v//') +RELEASE=$(wget -qO- https://dlcdn.apache.org/tomcat/tomcat-9/ | grep -oP '(?<=href=")v[^"/]+(?=/")' | sed 's/^v//' | sort -V | tail -n1) mkdir -p /opt/apache-guacamole/tomcat9 mkdir -p /opt/apache-guacamole/server wget -qO- "https://dlcdn.apache.org/tomcat/tomcat-9/v${RELEASE}/bin/apache-tomcat-${RELEASE}.tar.gz" | tar -xz -C /opt/apache-guacamole/tomcat9 --strip-components=1 diff --git a/install/apache-tika-install.sh b/install/apache-tika-install.sh new file mode 100644 index 000000000..1976e60bc --- /dev/null +++ b/install/apache-tika-install.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Andy Grunwald (andygrunwald) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/apache/tika/ + +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 \ + curl \ + sudo \ + mc \ + software-properties-common \ + gdal-bin \ + tesseract-ocr \ + tesseract-ocr-eng \ + tesseract-ocr-ita \ + tesseract-ocr-fra \ + tesseract-ocr-spa \ + tesseract-ocr-deu +$STD echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections +$STD apt-get install -y \ + xfonts-utils \ + fonts-freefont-ttf \ + fonts-liberation \ + ttf-mscorefonts-installer \ + cabextract +msg_ok "Installed Dependencies" + +msg_info "Setup OpenJDK" +$STD apt-get install -y \ + openjdk-17-jre-headless +msg_ok "Setup OpenJDK" + +msg_info "Installing Apache Tika" +mkdir -p /opt/apache-tika +cd /opt/apache-tika +RELEASE="$(wget -qO- https://dlcdn.apache.org/tika/ | grep -oP '(?<=href=")[0-9]+\.[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1)" +wget -q "https://dlcdn.apache.org/tika/${RELEASE}/tika-server-standard-${RELEASE}.jar" +mv tika-server-standard-${RELEASE}.jar tika-server-standard.jar +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Apache Tika" + +msg_info "Creating Service" +cat </etc/systemd/system/apache-tika.service +[Unit] +Description=Apache Tika +Documentation=https://tika.apache.org/ +After=syslog.target network.target + +[Service] +User=root +Restart=always +Type=simple +ExecStart=java -jar /opt/apache-tika/tika-server-standard.jar --host 0.0.0.0 --port 9998 +ExecReload=/bin/kill -HUP \$MAINPID + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now apache-tika +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/archivebox-install.sh b/install/archivebox-install.sh index 7c97f6154..82f37be6d 100644 --- a/install/archivebox-install.sh +++ b/install/archivebox-install.sh @@ -42,7 +42,7 @@ msg_ok "Installed Python Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/authentik-install.sh b/install/authentik-install.sh index f59f7679d..719c2fd88 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -83,12 +83,13 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Golang" -cd /tmp set +o pipefail -GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz") -wget -q https://golang.org/dl/${GO_RELEASE} -tar -xzf ${GO_RELEASE} -C /usr/local -ln -s /usr/local/go/bin/go /usr/bin/go +temp_file=$(mktemp) +golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +rm -f "$temp_file" set -o pipefail msg_ok "Installed Golang" @@ -188,7 +189,6 @@ msg_info "Cleaning up" rm -rf /tmp/Python-3.12.1 rm -rf /tmp/Python.tgz rm -rf go/ -rm -rf /tmp/${GO_RELEASE} rm -rf /tmp/geoipupdate.deb rm -rf authentik.tar.gz $STD apt-get -y remove yq diff --git a/install/baikal-install.sh b/install/baikal-install.sh new file mode 100644 index 000000000..f1f7216b6 --- /dev/null +++ b/install/baikal-install.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 \ + curl \ + sudo \ + mc \ + postgresql \ + apache2 \ + libapache2-mod-php \ + php-{pgsql,dom} +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=baikal +DB_USER=baikal +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 "Baikal Credentials" +echo "Baikal Database User: $DB_USER" +echo "Baikal Database Password: $DB_PASS" +echo "Baikal Database Name: $DB_NAME" +} >> ~/baikal.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing Baikal" +RELEASE=$(curl -s https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /opt +wget -q "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip" +unzip -q "baikal-${RELEASE}.zip" +cat </opt/baikal/config/baikal.yaml +database: + backend: pgsql + pgsql_host: localhost + pgsql_dbname: $DB_NAME + pgsql_username: $DB_USER + pgsql_password: $DB_PASS +EOF +chown -R www-data:www-data /opt/baikal/ +chmod -R 755 /opt/baikal/ +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Baikal" + +msg_info "Creating Service" +cat < /etc/apache2/sites-available/baikal.conf + + ServerName baikal + DocumentRoot /opt/baikal/html + + RewriteEngine on + RewriteRule /.well-known/carddav /dav.php [R=308,L] + RewriteRule /.well-known/caldav /dav.php [R=308,L] + RewriteCond %{REQUEST_URI} ^/dav.php$ [NC] + RewriteRule ^(.*)$ /dav.php/ [R=301,L] + + + Options FollowSymLinks + AllowOverride All + Require all granted + + + + ExpiresActive Off + + + ErrorLog /var/log/apache2/baikal_error.log + CustomLog /var/log/apache2/baikal_access.log combined + +EOF +$STD a2ensite baikal +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/baikal-${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/barcode-buddy-install.sh b/install/barcode-buddy-install.sh new file mode 100644 index 000000000..36dca7722 --- /dev/null +++ b/install/barcode-buddy-install.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 \ + curl \ + sudo \ + mc \ + apache2 \ + redis \ + php-{curl,date,json,mbstring,redis,sqlite3,sockets} \ + libapache2-mod-php +msg_ok "Installed Dependencies" + +msg_info "Installing barcodebuddy" +RELEASE=$(curl -s https://api.github.com/repos/Forceu/barcodebuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +wget -q "https://github.com/Forceu/barcodebuddy/archive/refs/tags/v${RELEASE}.zip" +unzip -q "v${RELEASE}.zip" +mv "/opt/barcodebuddy-${RELEASE}" /opt/barcodebuddy +chown -R www-data:www-data /opt/barcodebuddy/data +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed barcodebuddy" + +msg_info "Creating Services" +cat </etc/systemd/system/barcodebuddy.service +[Unit] +Description=Run websocket server for barcodebuddy screen feature +After=network.target + +[Service] +Type=simple +ExecStart=/usr/bin/php /opt/barcodebuddy/wsserver.php +StandardOutput=null +Restart=on-failure +User=www-data + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/apache2/sites-available/barcodebuddy.conf + + ServerName barcodebuddy + DocumentRoot /opt/barcodebuddy + + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/barcodebuddy_error.log + CustomLog /var/log/apache2/barcodebuddy_access.log combined + +EOF +systemctl enable -q --now barcodebuddy +$STD a2ensite barcodebuddy +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Services" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/boltdiy-install.sh b/install/boltdiy-install.sh new file mode 100644 index 000000000..17b4b2fec --- /dev/null +++ b/install/boltdiy-install.sh @@ -0,0 +1,74 @@ +#!/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/stackblitz-labs/bolt.diy/ + +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 \ + curl \ + sudo \ + mc \ + gnupg \ + git +msg_ok "Installed Dependencies" + +msg_info "Setup Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Setup Node.js Repository" + +msg_info "Setup Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Setup Node.js" + +msg_info "Setup bolt.diy" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +tar xzf $temp_file +mv bolt.diy-${RELEASE} /opt/bolt.diy +cd /opt/bolt.diy +$STD pnpm install +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup bolt.diy" + +msg_info "Creating Service" +cat </etc/systemd/system/boltdiy.service +[Unit] +Description=bolt.diy Service +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/bolt.diy +ExecStart=/usr/bin/pnpm run dev --host +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now boltdiy +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" diff --git a/install/bunkerweb-install.sh b/install/bunkerweb-install.sh index 0ce1a8eef..449dca102 100644 --- a/install/bunkerweb-install.sh +++ b/install/bunkerweb-install.sh @@ -28,7 +28,7 @@ msg_info "Installing Nginx" wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list $STD apt-get update -$STD apt-get install -y nginx=1.26.2* +$STD apt-get install -y nginx=1.26.3* msg_ok "Installed Nginx" RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') @@ -36,7 +36,6 @@ msg_info "Installing BunkerWeb v${RELEASE} (Patience)" curl -fsSL "https://repo.bunkerweb.io/bunkerity/bunkerweb/gpgkey" | gpg --dearmor >/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg echo "deb [signed-by=/etc/apt/keyrings/bunkerity_bunkerweb-archive-keyring.gpg] https://repo.bunkerweb.io/bunkerity/bunkerweb/debian/ bookworm main" >/etc/apt/sources.list.d/bunkerity_bunkerweb.list $STD apt-get update -export UI_WIZARD=1 $STD apt-get install -y bunkerweb=${RELEASE} cat </etc/apt/preferences.d/bunkerweb Package: bunkerweb diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 113485c96..a833b9d12 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -4,7 +4,7 @@ # Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ) # 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 @@ -35,16 +35,16 @@ msg_ok "Installed Caddy" read -r -p "Would you like to install xCaddy Addon? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing Golang" - cd /opt set +o pipefail - GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) - wget -q https://golang.org/dl/$GOLANG - tar -xzf $GOLANG -C /usr/local - ln -s /usr/local/go/bin/go /usr/local/bin/go + temp_file=$(mktemp) + golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) + wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" + tar -C /usr/local -xzf "$temp_file" + ln -sf /usr/local/go/bin/go /usr/local/bin/go + rm -f "$temp_file" set -o pipefail - rm -rf /opt/go* msg_ok "Installed Golang" - + msg_info "Setup xCaddy" cd /opt RELEASE=$(curl -s https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') diff --git a/install/changedetection-install.sh b/install/changedetection-install.sh index c9a4e8042..4249e1b0d 100644 --- a/install/changedetection-install.sh +++ b/install/changedetection-install.sh @@ -60,7 +60,7 @@ msg_ok "Setup Python3" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -78,7 +78,10 @@ mkdir /opt/browserless $STD python3 -m pip install playwright $STD git clone https://github.com/browserless/chrome /opt/browserless $STD npm install --prefix /opt/browserless -$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps chrome chromium firefox webkit +$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null +$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null +$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null +$STD /opt/browserless/node_modules/playwright-core/cli.js install --force msedge $STD npm run build --prefix /opt/browserless $STD npm run build:function --prefix /opt/browserless $STD npm prune production --prefix /opt/browserless diff --git a/install/checkmk-install.sh b/install/checkmk-install.sh index 0b8839fe0..2f385140a 100644 --- a/install/checkmk-install.sh +++ b/install/checkmk-install.sh @@ -24,7 +24,7 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" msg_info "Install Checkmk" -RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | head -n 1) +RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -v '\-rc' | sort -V | tail -n 1) wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_arm64.deb -O /opt/checkmk.deb $STD apt-get install -y /opt/checkmk.deb echo "${RELEASE}" >"/opt/checkmk_version.txt" diff --git a/install/cosmos-install.sh b/install/cosmos-install.sh new file mode 100644 index 000000000..cda9a1211 --- /dev/null +++ b/install/cosmos-install.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + + +#Copyright (c) 2021-2025 community-scripts ORG +# Author: Michel Roegl-Brunner (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 \ + curl \ + mc \ + sudo \ + snapraid \ + avahi-daemon \ + fdisk +msg_ok "Installed Dependencies" + +msg_info "Install mergerfs" +MERGERFS_VERSION="2.40.2" +wget -q "https://github.com/trapexit/mergerfs/releases/download/${MERGERFS_VERSION}/mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb" +$STD dpkg -i "mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb" || $STD apt-get install -f -y +rm "mergerfs_${MERGERFS_VERSION}.debian-bullseye_amd64.deb" +msg_ok "Installed mergerfs" + +msg_info "Install Docker" +curl -fsSL https://get.docker.com -o get-docker.sh +$STD sh get-docker.sh +rm get-docker.sh +msg_ok "Installed Docker" + +msg_info "Install Cosmos" +mkdir -p /opt/cosmos +LATEST_RELEASE=$(curl -s https://api.github.com/repos/azukaar/Cosmos-Server/releases/latest | grep "tag_name" | cut -d '"' -f 4) +ZIP_FILE="cosmos-cloud-${LATEST_RELEASE#v}-amd64.zip" +curl -sL "https://github.com/azukaar/Cosmos-Server/releases/download/${LATEST_RELEASE}/${ZIP_FILE}" -o "/opt/cosmos/${ZIP_FILE}" +cd /opt/cosmos +unzip -o -q "${ZIP_FILE}" +LATEST_RELEASE_NO_V=${LATEST_RELEASE#v} +mv /opt/cosmos/cosmos-cloud-${LATEST_RELEASE_NO_V}/* /opt/cosmos/ +rmdir /opt/cosmos/cosmos-cloud-${LATEST_RELEASE_NO_V} +chmod +x /opt/cosmos/cosmos +msg_ok "Installed Cosmos" + +msg_info "Creating Service" +cat < /etc/systemd/system/cosmos.service +[Unit] +Description=Cosmos Cloud service +ConditionFileIsExecutable=/opt/cosmos/start.sh + +[Service] +StartLimitInterval=10 +StartLimitBurst=5 +ExecStart=/opt/cosmos/start.sh + +WorkingDirectory=/opt/cosmos + +Restart=always + +RestartSec=2 +EnvironmentFile=-/etc/sysconfig/CosmosCloud + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable -q --now cosmos.service +msg_info "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f "/opt/cosmos/cosmos-cloud-${LATEST_RELEASE#v}-amd64.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/crafty-controller-install.sh b/install/crafty-controller-install.sh new file mode 100644 index 000000000..6e5f68785 --- /dev/null +++ b/install/crafty-controller-install.sh @@ -0,0 +1,101 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://docs.craftycontrol.com/pages/getting-started/installation/linux/ + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (a lot of patience)" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + sed \ + lsb-release \ + apt-transport-https \ + coreutils \ + software-properties-common +msg_ok "Installed Dependencies" + +msg_info "Setting up TemurinJDK" +mkdir -p /etc/apt/keyrings +wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc +echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list +$STD apt-get update +$STD apt-get install -y temurin-{8,11,17,21}-jre +sudo update-alternatives --set java /usr/lib/jvm/temurin-21-jre-amd64/bin/java +msg_ok "Installed TemurinJDK" + +msg_info "Setup Python3" +$STD apt-get install -y \ + python3 \ + python3-dev \ + python3-pip \ + python3-venv +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Setup Python3" + +msg_info "Installing Craty-Controller (Patience)" +useradd crafty -m -s /bin/bash +cd /opt +mkdir -p /opt/crafty-controller/crafty /opt/crafty-controller/server +RELEASE=$(curl -s "https://gitlab.com/api/v4/projects/20430749/releases" | grep -o '"tag_name":"v[^"]*"' | head -n 1 | sed 's/"tag_name":"v//;s/"//') +echo "${RELEASE}" >"/opt/crafty-controller_version.txt" +wget -q "https://gitlab.com/crafty-controller/crafty-4/-/archive/v${RELEASE}/crafty-4-v${RELEASE}.zip" +unzip -q crafty-4-v${RELEASE}.zip +cp -a crafty-4-v${RELEASE}/. /opt/crafty-controller/crafty/crafty-4/ +rm -rf crafty-4-v${RELEASE} + +cd /opt/crafty-controller/crafty +python3 -m venv .venv +chown -R crafty:crafty /opt/crafty-controller/ +$STD sudo -u crafty bash -c ' + source /opt/crafty-controller/crafty/.venv/bin/activate + cd /opt/crafty-controller/crafty/crafty-4 + pip3 install --no-cache-dir -r requirements.txt +' +msg_ok "Installed Craft-Controller and dependencies" + +msg_info "Setting up Crafty-Controller service" +cat > /etc/systemd/system/crafty-controller.service << 'EOF' +[Unit] +Description=Crafty 4 +After=network.target + +[Service] +Type=simple +User=crafty +WorkingDirectory=/opt/crafty-controller/crafty/crafty-4 +Environment=PATH=/usr/lib/jvm/temurin-21-jre-amd64/bin:/opt/crafty-controller/crafty/.venv/bin:$PATH +ExecStart=/opt/crafty-controller/crafty/.venv/bin/python3 main.py -d +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable -q --now crafty-controller +sleep 10 +{ + echo "Crafty-Controller-Credentials" + echo "Username: $(grep -oP '(?<="username": ")[^"]*' /opt/crafty-controller/crafty/crafty-4/app/config/default-creds.txt)" + echo "Password: $(grep -oP '(?<="password": ")[^"]*' /opt/crafty-controller/crafty/crafty-4/app/config/default-creds.txt)" +} >> ~/crafty-controller.creds +msg_ok "Crafty-Controller service started" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/crafty-4-v${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/cross-seed-install.sh b/install/cross-seed-install.sh new file mode 100644 index 000000000..278c01928 --- /dev/null +++ b/install/cross-seed-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Jakub Matraszek (jmatraszek) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.cross-seed.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 \ + curl \ + sudo \ + mc \ + gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_23.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Setup Node.js Repository" + +msg_info "Setting up Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Setup Node.js" + +msg_info "Setup Cross-Seed" +$STD npm install cross-seed@latest -g +$STD cross-seed gen-config +msg_ok "Setup Cross-Seed" + +msg_info "Creating Service" +cat </etc/systemd/system/cross-seed.service +[Unit] +Description=Cross-Seed daemon Service +After=network.target + +[Service] +ExecStart=cross-seed daemon +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now cross-seed +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/dashy-install.sh b/install/dashy-install.sh index 4acab6679..1c58f5470 100644 --- a/install/dashy-install.sh +++ b/install/dashy-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/docmost-install.sh b/install/docmost-install.sh new file mode 100644 index 000000000..3007b0140 --- /dev/null +++ b/install/docmost-install.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/documenso/documenso + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + gpg \ + curl \ + sudo \ + redis \ + make \ + mc \ + postgresql +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Installed Node.js" + +msg_info "Setting up PostgreSQL" +DB_NAME="docmost_db" +DB_USER="docmost_user" +DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" +{ + echo "Docmost-Credentials" + echo "Database Name: $DB_NAME" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" +} >> ~/docmost.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing Docmost (Patience)" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/docmost/docmost/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" +tar -xzf "$temp_file" +mv docmost-${RELEASE} /opt/docmost +cd /opt/docmost +mv .env.example .env +sed -i "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" /opt/docmost/.env +sed -i "s|DATABASE_URL=.*|DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME|" /opt/docmost/.env +export NODE_OPTIONS="--max-old-space-size=2048" +$STD pnpm install +$STD pnpm build +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed Docmost" + +msg_info "Creating Service" +cat </etc/systemd/system/docmost.service +[Unit] +Description=Docmost Service +After=network.target postgresql.service + +[Service] +WorkingDirectory=/opt/docmost +ExecStart=/usr/bin/pnpm start +Restart=always +EnvironmentFile=/opt/docmost/.env + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now docmost +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" diff --git a/install/dolibarr-install.sh b/install/dolibarr-install.sh new file mode 100644 index 000000000..cc09e54aa --- /dev/null +++ b/install/dolibarr-install.sh @@ -0,0 +1,53 @@ +#!/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/Dolibarr/dolibarr/ + +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 \ + curl \ + sudo \ + mc \ + php-imap \ + debconf-utils \ + mariadb-server +msg_ok "Installed Dependencies" + +msg_info "Setting up Database" +ROOT_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$ROOT_PASS'); flush privileges;" +{ + echo "Dolibarr DB Credentials" + echo "MariaDB Root Password: $ROOT_PASS" +} >> ~/dolibarr.creds +msg_ok "Set up database" + +msg_info "Setup Dolibarr" +BASE="https://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/" +RELEASE=$(curl -s "$BASE" | grep -oP '(?<=/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/)[^/"]+' | head -n1) +FILE=$(curl -s "${BASE}${RELEASE}/" | grep -oP 'dolibarr_[^"]+_all.deb' | head -n1) +wget -q "https://netcologne.dl.sourceforge.net/project/dolibarr/Dolibarr%20installer%20for%20Debian-Ubuntu%20(DoliDeb)/${RELEASE}/${FILE}?viasf=1" -O "$FILE" +echo "dolibarr dolibarr/reconfigure-webserver multiselect apache2" | debconf-set-selections +$STD apt-get install ./$FILE -y +$STD apt install -f +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Setup Dolibarr" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf ~/$FILE +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/duplicati-install.sh b/install/duplicati-install.sh new file mode 100644 index 000000000..cd7863f10 --- /dev/null +++ b/install/duplicati-install.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/duplicati/duplicati + +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 \ + curl \ + sudo \ + mc \ + libice6 \ + libsm6 \ + libfontconfig1 +msg_ok "Installed Dependencies" + +msg_info "Setting up Duplicati" +RELEASE=$(curl -s https://api.github.com/repos/duplicati/duplicati/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}') +wget -q "https://github.com/duplicati/duplicati/releases/download/v${RELEASE}/duplicati-${RELEASE}-linux-x64-gui.deb" +$STD dpkg -i duplicati-${RELEASE}-linux-x64-gui.deb +echo "${RELEASE}" >/opt/Duplicati_version.txt +msg_ok "Finished setting up Duplicati" + +DECRYPTKEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +ADMINPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +{ + echo "Admin password = ${ADMINPASS}" + echo "Database encryption key = ${DECRYPTKEY}" +} >> ~/duplicati.creds + +msg_info "Creating Service" +cat </etc/systemd/system/duplicati.service +[Unit] +Description=Duplicati Service +After=network.target + +[Service] +ExecStart=/usr/bin/duplicati-server --webservice-interface=any --webservice-password=$ADMINPASS --settings-encryption-key=$DECRYPTKEY +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now duplicati +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f duplicati-${RELEASE}-linux-x64-gui.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize diff --git a/install/elementsynapse-install.sh b/install/elementsynapse-install.sh new file mode 100644 index 000000000..0e751d259 --- /dev/null +++ b/install/elementsynapse-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# 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 \ + sudo \ + curl \ + mc \ + lsb-release \ + wget \ + apt-transport-https \ + debconf-utils +msg_ok "Installed Dependencies" + +read -p "Please enter the name for your server: " servername + +msg_info "Installing Element Synapse" +wget -q -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main" >/etc/apt/sources.list.d/matrix-org.list +$STD apt-get update +echo "matrix-synapse-py3 matrix-synapse/server-name string $servername" | debconf-set-selections +echo "matrix-synapse-py3 matrix-synapse/report-stats boolean false" | debconf-set-selections +$STD apt-get install matrix-synapse-py3 -y +systemctl stop matrix-synapse +sed -i 's/127.0.0.1/0.0.0.0/g' /etc/matrix-synapse/homeserver.yaml +sed -i 's/'\''::1'\'', //g' /etc/matrix-synapse/homeserver.yaml +systemctl enable -q --now matrix-synapse +msg_ok "Installed Element Synapse" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/excalidraw-install.sh b/install/excalidraw-install.sh new file mode 100644 index 000000000..e83c5aae2 --- /dev/null +++ b/install/excalidraw-install.sh @@ -0,0 +1,73 @@ +#!/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/excalidraw/excalidraw + +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 \ + curl \ + sudo \ + mc \ + gnupg \ + xdg-utils +msg_ok "Installed Dependencies" + +msg_info "Setup Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Setup Node.js Repository" + +msg_info "Setup Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g yarn +msg_ok "Setup Node.js" + +msg_info "Setup Excalidraw" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/excalidraw/excalidraw/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/excalidraw/excalidraw/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +tar xzf $temp_file +mv excalidraw-${RELEASE} /opt/excalidraw +cd /opt/excalidraw +$STD yarn +echo "${RELEASE}" >/opt/excalidraw_version.txt +msg_ok "Setup Excalidraw" + +msg_info "Creating Service" +cat </etc/systemd/system/excalidraw.service +[Unit] +Description=Excalidraw Service +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/excalidraw +ExecStart=/usr/bin/yarn start --host +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now excalidraw +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" \ No newline at end of file diff --git a/install/flowiseai-install.sh b/install/flowiseai-install.sh index 51d352aa9..61a1d9fbf 100644 --- a/install/flowiseai-install.sh +++ b/install/flowiseai-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Node.js" 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_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +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 msg_ok "Installed Node.js" diff --git a/install/freshrss-install.sh b/install/freshrss-install.sh new file mode 100644 index 000000000..c6c5c493f --- /dev/null +++ b/install/freshrss-install.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 \ + curl \ + sudo \ + mc \ + postgresql \ + apache2 \ + php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \ + libapache2-mod-php +msg_ok "Installed Dependencies" + + +msg_info "Setting up PostgreSQL" +DB_NAME=freshrss +DB_USER=freshrss +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 "FreshRSS Credentials" +echo "FreshRSS Database User: $DB_USER" +echo "FreshRSS Database Password: $DB_PASS" +echo "FreshRSS Database Name: $DB_NAME" +} >> ~/freshrss.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing FreshRSS" +RELEASE=$(curl -s https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /opt +wget -q "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip" +unzip -q "${RELEASE}.zip" +mv "/opt/FreshRSS-${RELEASE}" /opt/freshrss +cd /opt/freshrss +chown -R www-data:www-data /opt/freshrss +chmod -R g+rX /opt/freshrss +chmod -R g+w /opt/freshrss/data/ +msg_ok "Installed FreshRSS" + +msg_info "Setting up cron job for feed refresh" +cat </etc/cron.d/freshrss-actualize +*/15 * * * * www-data /bin/php -f /opt/freshrss/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 +EOF +chmod 644 /etc/cron.d/freshrss-actualize +msg_ok "Set up Cron - if you need to modify the timing edit file /etc/cron.d/freshrss-actualize" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/freshrss.conf + + ServerName freshrss + DocumentRoot /opt/freshrss/p + + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/freshrss_error.log + CustomLog /var/log/apache2/freshrss_access.log combined + + AllowEncodedSlashes On + +EOF +$STD a2ensite freshrss +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/frigate-install.sh b/install/frigate-install.sh index 67e4c331e..aaa90fd07 100644 --- a/install/frigate-install.sh +++ b/install/frigate-install.sh @@ -27,7 +27,7 @@ msg_ok "Setup Python3" msg_info "Installing Node.js" 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_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +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 msg_ok "Installed Node.js" @@ -49,13 +49,13 @@ if [[ "$CTTYPE" == "0" ]]; then fi msg_ok "Set Up Hardware Acceleration" -RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') +#RELEASE=$(curl -s https://api.github.com/repos/blakeblackshear/frigate/releases/latest | jq -r '.tag_name') msg_ok "Stop spinner to prevent segmentation fault" -msg_info "Installing Frigate $RELEASE (Perseverance)" +msg_info "Installing Frigate v0.14.1 (Perseverance)" if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi cd ~ mkdir -p /opt/frigate/models -wget -q https://github.com/blakeblackshear/frigate/archive/refs/tags/${RELEASE}.tar.gz -O frigate.tar.gz +wget -q https://github.com/blakeblackshear/frigate/archive/refs/tags/v0.14.1.tar.gz -O frigate.tar.gz tar -xzf frigate.tar.gz -C /opt/frigate --strip-components 1 rm -rf frigate.tar.gz cd /opt/frigate @@ -103,7 +103,7 @@ else sed -i -e 's/^kvm:x:104:$/render:x:104:frigate/' -e 's/^render:x:105:$/kvm:x:105:/' /etc/group fi echo "tmpfs /tmp/cache tmpfs defaults 0 0" >> /etc/fstab -msg_ok "Installed Frigate $RELEASE" +msg_ok "Installed Frigate" if grep -q -o -m1 -E 'avx[^ ]*' /proc/cpuinfo; then msg_ok "AVX Support Detected" diff --git a/install/graylog-install.sh b/install/graylog-install.sh new file mode 100644 index 000000000..351e8c1f5 --- /dev/null +++ b/install/graylog-install.sh @@ -0,0 +1,65 @@ +#!/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://graylog.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 \ + curl \ + sudo \ + mc \ + gnupg +msg_ok "Installed Dependencies" + +msg_info "Setup MongoDB" +curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list +$STD apt-get update +$STD apt-get install -y mongodb-org +$STD apt-mark hold mongodb-org +systemctl enable -q --now mongod +msg_ok "Setup MongoDB" + +msg_info "Setup Graylog Data Node" +PASSWORD_SECRET=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) +wget -q https://packages.graylog2.org/repo/packages/graylog-6.1-repository_latest.deb +$STD dpkg -i graylog-6.1-repository_latest.deb +$STD apt-get update +$STD apt-get install graylog-datanode -y +sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/datanode/datanode.conf +systemctl enable -q --now graylog-datanode +msg_ok "Setup Graylog Data Node" + +msg_info "Setup ${APPLICATION}" +$STD apt-get install graylog-server +ROOT_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16) +{ + echo "${APPLICATION} Credentials" + echo "Admin User: admin" + echo "Admin Password: ${ROOT_PASSWORD}" +} >> ~/graylog.creds +ROOT_PASSWORD=$(echo -n $ROOT_PASSWORD | shasum -a 256 | awk '{print $1}') +sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/server/server.conf +sed -i "s/root_password_sha2 =/root_password_sha2 = $ROOT_PASSWORD/g" /etc/graylog/server/server.conf +sed -i 's/#http_bind_address = 127.0.0.1.*/http_bind_address = 0.0.0.0:9000/g' /etc/graylog/server/server.conf +systemctl enable -q --now graylog-server +msg_ok "Setup ${APPLICATION}" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f graylog-*-repository_latest.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/grist-install.sh b/install/grist-install.sh index 874639ad5..fed6bc4d7 100644 --- a/install/grist-install.sh +++ b/install/grist-install.sh @@ -31,7 +31,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Node.js" 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_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +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 yarn diff --git a/install/hev-socks5-server-install.sh b/install/hev-socks5-server-install.sh new file mode 100644 index 000000000..d5b6310bc --- /dev/null +++ b/install/hev-socks5-server-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: miviro +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/heiher/hev-socks5-server + +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 \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup ${APPLICATION}" +RELEASE=$(curl -s https://api.github.com/repos/heiher/${APPLICATION}/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +curl -L -o "${APPLICATION}" "https://github.com/heiher/${APPLICATION}/releases/download/${RELEASE}/hev-socks5-server-linux-x86_64" +mv ${APPLICATION} /opt/${APPLICATION} +chmod +x /opt/${APPLICATION} +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +curl -L -o "main.yml" "https://raw.githubusercontent.com/heiher/${APPLICATION}/refs/heads/master/conf/main.yml" +sed -i 's/^#auth:/auth:/; s/^# file: conf\/auth.txt/ file: \/root\/hev.creds/' main.yml +mkdir -p /etc/${APPLICATION} +USERNAME="admin" +PASSWORD=$(openssl rand -base64 16) +MARK="0" +echo "$USERNAME $PASSWORD $MARK" > /root/hev.creds +mv main.yml /etc/${APPLICATION}/main.yml +msg_ok "Setup ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/${APPLICATION}.service +[Unit] +Description=${APPLICATION} Service +After=network.target + +[Service] +ExecStart=/opt/${APPLICATION} /etc/${APPLICATION}/main.yml +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ${APPLICATION}.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/hoarder-install.sh b/install/hoarder-install.sh index 238a8a913..5d3c83e4c 100644 --- a/install/hoarder-install.sh +++ b/install/hoarder-install.sh @@ -58,6 +58,7 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea 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 corepack@0.31.0 msg_ok "Installed Node.js" msg_info "Installing Hoarder" diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 20c6278cf..da2c07fe3 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -3,7 +3,7 @@ # 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/ajnart/homarr +# Source: https://github.com/homarr-labs/homarr source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -20,10 +20,13 @@ $STD apt-get install -y \ curl \ redis-server \ ca-certificates \ - gnupg \ + gpg \ make \ g++ \ build-essential \ + nginx \ + gettext \ + openssl \ wget \ openssh-server msg_ok "Installed Dependencies" @@ -48,27 +51,56 @@ unzip -q v${RELEASE}.zip mv homarr-${RELEASE} /opt/homarr mkdir -p /opt/homarr_db touch /opt/homarr_db/db.sqlite -AUTH_SECRET="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" SECRET_ENCRYPTION_KEY="$(openssl rand -hex 32)" - +cd /opt/homarr cat </opt/homarr/.env -AUTH_SECRET='${AUTH_SECRET}' DB_DRIVER='better-sqlite3' +DB_DIALECT='sqlite' SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}' DB_URL='/opt/homarr_db/db.sqlite' TURBO_TELEMETRY_DISABLED=1 +AUTH_PROVIDERS='credentials' +NODE_ENV='production' EOF - -cd /opt/homarr $STD pnpm install -$STD pnpm run db:migration:sqlite:run $STD pnpm build -mkdir build -cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node -echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Homarr" -msg_info "Creating Service" +msg_info "Copying build and config files" +cp /opt/homarr/apps/nextjs/next.config.ts . +cp /opt/homarr/apps/nextjs/package.json . +cp -r /opt/homarr/packages/db/migrations /opt/homarr_db/migrations +cp -r /opt/homarr/apps/nextjs/.next/standalone/* /opt/homarr +mkdir -p /appdata/redis +cp /opt/homarr/packages/redis/redis.conf /opt/homarr/redis.conf +mkdir -p /etc/nginx/templates +rm /etc/nginx/nginx.conf +cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf +mkdir -p /opt/homarr/apps/cli +cp /opt/homarr/packages/cli/cli.cjs /opt/homarr/apps/cli/cli.cjs +echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' > /usr/bin/homarr +chmod +x /usr/bin/homarr +mkdir /opt/homarr/build +cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Finished copying" + +msg_info "Creating Services" +cat <<'EOF' >/opt/run_homarr.sh +#!/bin/bash +export DB_DIALECT='sqlite' +export AUTH_SECRET=$(openssl rand -base64 32) +node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT +export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+') +envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf +nginx -g 'daemon off;' & +redis-server /opt/homarr/packages/redis/redis.conf & +node apps/tasks/tasks.cjs & +node apps/websocket/wssServer.cjs & +node apps/nextjs/server.js & PID=$! +wait $PID +EOF +chmod +x /opt/run_homarr.sh cat </etc/systemd/system/homarr.service [Unit] Description=Homarr Service @@ -78,7 +110,7 @@ After=network.target Type=exec WorkingDirectory=/opt/homarr EnvironmentFile=-/opt/homarr/.env -ExecStart=/usr/bin/pnpm start +ExecStart=/opt/run_homarr.sh [Install] WantedBy=multi-user.target diff --git a/install/homepage-install.sh b/install/homepage-install.sh index cf287ae49..75079e708 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/iobroker-install.sh b/install/iobroker-install.sh index 23bf80f63..9b3a9b294 100644 --- a/install/iobroker-install.sh +++ b/install/iobroker-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 3cb29dcd0..26604bd1d 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -34,14 +34,16 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Installing pnpm" -$STD npm install -g pnpm -msg_ok "Installed pnpm" - -msg_info "Installing Jellyseerr (Patience)" git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr cd /opt/jellyseerr $STD git checkout main + +pnpm_desired=$(grep -Po '"pnpm":\s*"\K[^"]+' /opt/jellyseerr/package.json) +msg_info "Installing pnpm version $pnpm_desired..." +$STD npm install -g pnpm@$pnpm_desired +msg_ok "Installed pnpm" + +msg_info "Installing Jellyseerr (Patience)" export CYPRESS_INSTALL_BINARY=0 $STD pnpm install --frozen-lockfile export NODE_OPTIONS="--max-old-space-size=3072" diff --git a/install/koillection-install.sh b/install/koillection-install.sh new file mode 100644 index 000000000..90745a211 --- /dev/null +++ b/install/koillection-install.sh @@ -0,0 +1,124 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 \ + curl \ + sudo \ + mc \ + gnupg2\ + postgresql \ + apache2 \ + lsb-release +msg_ok "Installed Dependencies" + +msg_info "Setup PHP8.4 Repository" +$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb +$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb +$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-get update +msg_ok "Setup PHP8.4 Repository" + +msg_info "Setup PHP" +$STD apt-get install -y \ + php8.4 \ + php8.4-{apcu,ctype,curl,dom,fileinfo,gd,iconv,intl,mbstring,pgsql} \ + libapache2-mod-php8.4 \ + composer +msg_info "Setup PHP" + +msg_info "Setting up PostgreSQL" +DB_NAME=koillection +DB_USER=koillection +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 "Koillection Credentials" +echo "Koillection Database User: $DB_USER" +echo "Koillection Database Password: $DB_PASS" +echo "Koillection Database Name: $DB_NAME" +} >> ~/koillection.creds +msg_ok "Set up PostgreSQL" + +msg_info "Setting up Node.js/Yarn" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g npm@latest +$STD npm install -g yarn +msg_ok "Installed Node.js/Yarn" + +msg_info "Installing Koillection" +RELEASE=$(curl -s https://api.github.com/repos/benjaminjonard/koillection/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +cd /opt +wget -q "https://github.com/benjaminjonard/koillection/archive/refs/tags/${RELEASE}.zip" +unzip -q "${RELEASE}.zip" +mv "/opt/koillection-${RELEASE}" /opt/koillection +cd /opt/koillection +cp /opt/koillection/.env /opt/koillection/.env.local +APP_SECRET=$(openssl rand -base64 32) +sed -i -e "s|^APP_ENV=.*|APP_ENV=prod|" \ + -e "s|^APP_DEBUG=.*|APP_DEBUG=0|" \ + -e "s|^APP_SECRET=.*|APP_SECRET=${APP_SECRET}|" \ + -e "s|^DB_NAME=.*|DB_NAME=${DB_NAME}|" \ + -e "s|^DB_USER=.*|DB_USER=${DB_USER}|" \ + -e "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASS}|" \ + /opt/koillection/.env.local +export COMPOSER_ALLOW_SUPERUSER=1 +$STD composer install --no-dev -o --no-interaction --classmap-authoritative +$STD php bin/console doctrine:migrations:migrate --no-interaction +$STD php bin/console app:translations:dump +cd assets/ +$STD yarn install +$STD yarn build +chown -R www-data:www-data /opt/koillection/public/uploads +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Koillection" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/koillection.conf + + ServerName koillection + DocumentRoot /opt/koillection/public + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ index.php/\$1 [L] + + + ErrorLog /var/log/apache2/koillection_error.log + CustomLog /var/log/apache2/koillection_access.log combined + +EOF +$STD a2ensite koillection +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/kometa-install.sh b/install/kometa-install.sh new file mode 100644 index 000000000..23c0f5516 --- /dev/null +++ b/install/kometa-install.sh @@ -0,0 +1,74 @@ +#!/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/Kometa-Team/Kometa + +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 \ + curl \ + mc \ + sudo +msg_ok "Installed Dependencies" + +msg_info "Setup Python 3" +$STD apt-get install python3-pip -y +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Setup Python 3" + +msg_info "Setup Kometa" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" +tar -xzf "$temp_file" +mv Kometa-${RELEASE} /opt/kometa +cd /opt/kometa +$STD pip install -r requirements.txt --ignore-installed +mkdir -p config/assets +cp config/config.yml.template config/config.yml +echo "${RELEASE}" >/opt/kometa_version.txt +msg_ok "Setup Kometa" + +read -p "Enter your TMDb API key: " TMDBKEY +read -p "Enter your Plex URL: " PLEXURL +read -p "Enter your Plex token: " PLEXTOKEN +sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL#g" /opt/kometa/config/config.yml +sed -i -e "s/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml +sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/g" /opt/kometa/config/config.yml + +msg_info "Creating Service" +cat </etc/systemd/system/kometa.service +[Unit] +Description=Kometa Service +After=network-online.target + +[Service] +Type=simple +WorkingDirectory=/opt/kometa +ExecStart=/usr/bin/python3 kometa.py +Restart=always +RestartSec=30 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q kometa +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" diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh index 06377ab6c..7b3502290 100644 --- a/install/lazylibrarian-install.sh +++ b/install/lazylibrarian-install.sh @@ -28,7 +28,7 @@ $STD apt-get install -y \ openssh-server msg_ok "Installed Dependencies" -msg_info "Installing Python3 Dependencies" +msg_info "Setup Python3" $STD apt-get install -y \ pip \ python3-irc @@ -37,7 +37,7 @@ $STD pip install jaraco.stream $STD pip install python-Levenshtein $STD pip install soupsieve $STD pip install pypdf -msg_ok "Installed Python3 Dependencies" +msg_ok "Setup Python3" msg_info "Installing LazyLibrarian" $STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 419196bc8..3d4c515cf 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -30,7 +30,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js/Yarn" diff --git a/install/mafl-install.sh b/install/mafl-install.sh index 31dfab415..526170182 100644 --- a/install/mafl-install.sh +++ b/install/mafl-install.sh @@ -29,7 +29,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/magicmirror-install.sh b/install/magicmirror-install.sh index 7cbc31ef9..597e5ce23 100644 --- a/install/magicmirror-install.sh +++ b/install/magicmirror-install.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck -# Author: tteck (tteckster) +# Copyright (c) 2021-2025 tteck +# Author: tteck (tteckster) | Co-Author Slaviša Arežina (tremor021) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/asylumexp/Proxmox/raw/main/LICENSE +# Source: https://magicmirror.builders/ source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,20 +15,19 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + gnupg \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -35,14 +35,14 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Setting up MagicMirror Repository" -$STD git clone https://github.com/MichMich/MagicMirror /opt/magicmirror -msg_ok "Set up MagicMirror Repository" - -msg_info "Installing MagicMirror" +msg_info "Setup MagicMirror" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/MagicMirrorOrg/MagicMirror/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/MagicMirrorOrg/MagicMirror/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" +tar -xzf "$temp_file" +mv MagicMirror-${RELEASE} /opt/magicmirror cd /opt/magicmirror -$STD npm install --only=prod --omit=dev - +$STD npm run install-mm cat </opt/magicmirror/config/config.js let config = { address: "0.0.0.0", @@ -132,11 +132,12 @@ let config = { /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;} EOF -msg_ok "Installed MagicMirror" +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Setup MagicMirror" msg_info "Creating Service" -service_path="/etc/systemd/system/magicmirror.service" -echo "[Unit] +cat </etc/systemd/system/magicmirror.service +[Unit] Description=Magic Mirror After=network.target StartLimitIntervalSec=0 @@ -147,17 +148,19 @@ Restart=always RestartSec=1 User=root WorkingDirectory=/opt/magicmirror/ -ExecStart=/usr/bin/node serveronly +ExecStart=/usr/bin/npm run server [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now magicmirror +WantedBy=multi-user.target +EOF +systemctl enable --now magicmirror msg_ok "Created Service" motd_ssh customize msg_info "Cleaning up" +rm -rf $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/matterbridge-install.sh b/install/matterbridge-install.sh index c60935943..387a7ef83 100644 --- a/install/matterbridge-install.sh +++ b/install/matterbridge-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/mattermost-install.sh b/install/mattermost-install.sh new file mode 100644 index 000000000..7509be2d1 --- /dev/null +++ b/install/mattermost-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Kaedon Cleland-Host (dracentis) +# 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 \ + curl \ + sudo \ + mc \ + gpg \ + postgresql +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=mattermost +DB_USER=mmuser +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$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 "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER;" +{ + echo "Mattermost Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >> ~/mattermost.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing Mattermost" +IPADDRESS=$(hostname -I | awk '{print $1}') +curl -sL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg +sh -c 'curl -sL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s mattermost' >/dev/null +$STD apt-get update +$STD apt-get install -y mattermost +$STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json +sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \ + -e "/SiteURL/c\ \"SiteURL\": \"http://$IPADDRESS:8065\"," /opt/mattermost/config/config.json +systemctl enable -q --now mattermost.service +msg_ok "Installed Mattermost" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/memos-install.sh b/install/memos-install.sh index f41d6f275..a2a3630c3 100644 --- a/install/memos-install.sh +++ b/install/memos-install.sh @@ -28,7 +28,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -42,10 +42,12 @@ msg_ok "Installed pnpm" msg_info "Installing Golang" set +o pipefail -GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) -wget -q https://golang.org/dl/$GOLANG -tar -xzf $GOLANG -C /usr/local -ln -s /usr/local/go/bin/go /usr/local/bin/go +temp_file=$(mktemp) +golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +rm -f "$temp_file" set -o pipefail msg_ok "Installed Golang" diff --git a/install/meshcentral-install.sh b/install/meshcentral-install.sh index 2d3e09f12..3c347704c 100644 --- a/install/meshcentral-install.sh +++ b/install/meshcentral-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/metube-install.sh b/install/metube-install.sh index c14d91f17..697b7f034 100644 --- a/install/metube-install.sh +++ b/install/metube-install.sh @@ -34,19 +34,19 @@ $STD apt-get install -y --no-install-recommends \ openssh-server msg_ok "Installed Dependencies" -msg_info "Installing Python3" +msg_info "Setup Python3" $STD apt-get install -y \ python3 \ python3-dev \ python3-pip \ python3-venv rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Installed Python3" +msg_ok "Setup Python3" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/minio-install.sh b/install/minio-install.sh new file mode 100644 index 000000000..6dd7b947c --- /dev/null +++ b/install/minio-install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/minio/minio + +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 \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup MinIO" +RELEASE=$(curl -s https://api.github.com/repos/minio/minio/releases/latest | grep '"tag_name"' | awk -F '"' '{print $4}') +wget -q https://dl.min.io/server/minio/release/linux-amd64/minio +mv minio /usr/local/bin/ +chmod +x /usr/local/bin/minio +useradd -r minio-user -s /sbin/nologin +mkdir -p /home/minio-user +chown minio-user:minio-user /home/minio-user +mkdir -p /data +chown minio-user:minio-user /data +MINIO_ADMIN_USER="minioadmin" +MINIO_ADMIN_PASSWORD="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +cat </etc/default/minio +MINIO_ROOT_USER=${MINIO_ADMIN_USER} +MINIO_ROOT_PASSWORD=${MINIO_ADMIN_PASSWORD} +EOF +{ + echo "" + echo "MinIO-Credentials" + echo "MinIO Admin User: $MINIO_ADMIN_USER" + echo "MinIO Admin Password: $MINIO_ADMIN_PASSWORD" +} >> ~/minio.creds +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup MinIO" + +msg_info "Creating Service" +cat </etc/systemd/system/minio.service +[Unit] +Description=MinIO +Documentation=https://docs.min.io +Wants=network-online.target +After=network-online.target + +[Service] +User=minio-user +Group=minio-user +EnvironmentFile=-/etc/default/minio +ExecStart=/usr/local/bin/minio server /data +Restart=always +RestartSec=5 +LimitNOFILE=65536 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now minio +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/myspeed-install.sh b/install/myspeed-install.sh index 3f7f775c7..5e13c21b1 100644 --- a/install/myspeed-install.sh +++ b/install/myspeed-install.sh @@ -1,9 +1,8 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck -# Author: tteck -# License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Copyright (c) 2021-2025 tteck +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/asylumexp/Proxmox/raw/main/LICENSE # Source: https://github.com/gnmyt/myspeed source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" @@ -17,6 +16,9 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ + build-essential \ + g++ \ + make \ sudo \ make \ gpg \ @@ -29,7 +31,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -74,4 +76,4 @@ msg_info "Cleaning up" $STD apt-get -y autoremove rm -rf /opt/MySpeed-$RELEASE.zip $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 96ef5e460..0f3e78ae8 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/node-red-install.sh b/install/node-red-install.sh index ce4be5795..02de49e8a 100644 --- a/install/node-red-install.sh +++ b/install/node-red-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/nxwitness-install.sh b/install/nxwitness-install.sh new file mode 100644 index 000000000..625e81fb0 --- /dev/null +++ b/install/nxwitness-install.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://nxvms.com/download/releases/linux + +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 \ + curl \ + sudo \ + mc \ + make \ + net-tools \ + ffmpeg \ + cifs-utils \ + libtalloc2 \ + libwbclient0 \ + keyutils +msg_ok "Installed Dependencies" + +msg_info "Setup Nx Witness" +cd /tmp +BASE_URL="https://updates.networkoptix.com/default/index.html" +RELEASE=$(curl -s "$BASE_URL" | grep -oP '(?<=)[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(?=)' | head -n 1) +DETAIL_PAGE=$(curl -s "$BASE_URL#note_$RELEASE") +DOWNLOAD_URL=$(echo "$DETAIL_PAGE" | grep -oP "https://updates.networkoptix.com/default/$RELEASE/linux/nxwitness-server-[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-linux_x64\.deb" | head -n 1) +wget -q "$DOWNLOAD_URL" -O "nxwitness-server-$RELEASE-linux_x64.deb" +export DEBIAN_FRONTEND=noninteractive +$STD dpkg -i nxwitness-server-$RELEASE-linux_x64.deb +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup Nx Witness" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f /tmp/nxwitness-server-$RELEASE-linux_x64.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 3aa9b1b81..bb5290ee6 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -26,17 +26,17 @@ $STD apt-get install -y \ openssh-server msg_ok "Installed Dependencies" -msg_info "Installing Python3 Dependencies" +msg_info "Setup Python3" $STD apt-get install -y --no-install-recommends \ python3 \ python3-pip rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Installed Python3 Dependencies" +msg_ok "Setup Python3" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/overseerr-install.sh b/install/overseerr-install.sh index ea30e155b..de6f75b5b 100644 --- a/install/overseerr-install.sh +++ b/install/overseerr-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/pairdrop-install.sh b/install/pairdrop-install.sh index 9ec88c64b..0109db529 100644 --- a/install/pairdrop-install.sh +++ b/install/pairdrop-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/paperless-ai-install.sh b/install/paperless-ai-install.sh new file mode 100644 index 000000000..0c469e9cc --- /dev/null +++ b/install/paperless-ai-install.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /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 \ + curl \ + sudo \ + mc \ + gpg \ + make \ + gcc \ + g++ \ + build-essential +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Setup Paperless-AI" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/clusterzx/paperless-ai/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/clusterzx/paperless-ai/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv paperless-ai-${RELEASE} /opt/paperless-ai +cd /opt/paperless-ai +$STD npm install +mkdir -p /opt/paperless-ai/data +cat </opt/paperless-ai/data/.env +PAPERLESS_API_URL= +PAPERLESS_API_TOKEN= +PAPERLESS_USERNAME= +AI_PROVIDER=openai +OPENAI_API_KEY= +OPENAI_MODEL=gpt-4o-mini +OLLAMA_API_URL= +OLLAMA_MODEL= +SCAN_INTERVAL=*/10 * * * * +SYSTEM_PROMPT="" +PROCESS_PREDEFINED_DOCUMENTS=no +TAGS= +ADD_AI_PROCESSED_TAG=no +AI_PROCESSED_TAG_NAME=ki-gen +USE_PROMPT_TAGS=no +PROMPT_TAGS= +USE_EXISTING_DATA=no +API_KEY= +CUSTOM_API_KEY= +CUSTOM_BASE_URL= +CUSTOM_MODEL= +EOF +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Setup Paperless-AI" + +msg_info "Creating Service" +cat </etc/systemd/system/paperless-ai.service +[Unit] +Description=PaperlessAI Service +After=network.target + +[Service] +WorkingDirectory=/opt/paperless-ai +ExecStart=/usr/bin/npm start +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now paperless-ai.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/v${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 0545b98c7..b6933e6ba 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -42,14 +42,14 @@ $STD apt-get install -y \ openssh-server msg_ok "Installed Dependencies" -msg_info "Installing Python3 Dependencies (Patience)" +msg_info "Setup Python3" $STD apt-get install -y \ python3 \ python3-pip \ python3-dev \ python3-setuptools \ python3-wheel -msg_ok "Installed Python3 Dependencies" +msg_ok "Setup Python3" msg_info "Installing OCR Dependencies (Patience)" $STD apt-get install -y \ diff --git a/install/part-db-install.sh b/install/part-db-install.sh index bc6e61959..95e6aecf0 100644 --- a/install/part-db-install.sh +++ b/install/part-db-install.sh @@ -48,7 +48,7 @@ msg_ok "Set up PostgreSQL" 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_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +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 diff --git a/install/paymenter-install.sh b/install/paymenter-install.sh new file mode 100644 index 000000000..6eb516c5a --- /dev/null +++ b/install/paymenter-install.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Nícolas Pastorello (opastorello) +# 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 \ + curl \ + sudo \ + mc \ + git \ + software-properties-common \ + apt-transport-https \ + ca-certificates \ + gnupg \ + php8.2 \ + php8.2-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} \ + mariadb-server \ + nginx \ + redis-server +$STD curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +msg_ok "Installed Dependencies" + +msg_info "Installing Paymenter" +RELEASE=$(curl -s https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +mkdir -p /opt/paymenter +cd /opt/paymenter +wget -q "https://github.com/paymenter/paymenter/releases/download/${RELEASE}/paymenter.tar.gz" +$STD tar -xzvf paymenter.tar.gz +chmod -R 755 storage/* bootstrap/cache/ +msg_ok "Installed Paymenter" + +msg_info "Setting up database" +DB_NAME=paymenter +DB_USER=paymenter +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql +mysql -u root -e "CREATE DATABASE $DB_NAME;" +mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;" +{ + echo "Paymenter Database Credentials" + echo "Database: $DB_NAME" + echo "Username: $DB_USER" + echo "Password: $DB_PASS" +} >> ~/paymenter_db.creds +cp .env.example .env +$STD composer install --no-dev --optimize-autoloader --no-interaction +$STD php artisan key:generate --force +$STD php artisan storage:link +sed -i "s/^DB_DATABASE=.*/DB_DATABASE=${DB_NAME}/" .env +sed -i "s/^DB_USERNAME=.*/DB_USERNAME=${DB_USER}/" .env +sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/" .env +$STD php artisan migrate --force --seed +msg_ok "Set up database" + +msg_info "Creating Admin User" +$STD php artisan p:user:create </etc/nginx/sites-available/paymenter.conf +server { + listen 80; + listen [::]:80; + server_name localhost; + root /opt/paymenter/public; + + index index.php; + + location / { + try_files \$uri \$uri/ /index.php?\$query_string; + } + + location ~ \.php\$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.ht { + deny all; + } +} +EOF +ln -s /etc/nginx/sites-available/paymenter.conf /etc/nginx/sites-enabled/ +rm -f /etc/nginx/sites-enabled/default +$STD systemctl reload nginx +chown -R www-data:www-data /opt/paymenter/* +msg_ok "Configured Nginx" + +msg_info "Setting up Cronjob" +echo "* * * * * php /opt/paymenter/artisan schedule:run >> /dev/null 2>&1" | crontab - +msg_ok "Setup Cronjob" + +msg_info "Setting up Service" +cat </etc/systemd/system/paymenter.service +[Unit] +Description=Paymenter Queue Worker + +[Service] +User=www-data +Group=www-data +Restart=always +ExecStart=/usr/bin/php /opt/paymenter/artisan queue:work +StartLimitInterval=180 +StartLimitBurst=30 +RestartSec=5s + +[Install] +WantedBy=multi-user.target +EOF +$STD systemctl enable --now paymenter.service +msg_ok "Setup Service" + +msg_info "Cleaning up" +rm -rf /opt/paymenter/paymenter.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize diff --git a/install/peanut-install.sh b/install/peanut-install.sh index 77d60a734..144b14337 100644 --- a/install/peanut-install.sh +++ b/install/peanut-install.sh @@ -25,7 +25,7 @@ msg_ok "Installed Dependencies" msg_info "Installing Node.js" 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_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +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 msg_ok "Installed Node.js" diff --git a/install/pf2etools-install.sh b/install/pf2etools-install.sh index cf26abcc1..0f428838f 100644 --- a/install/pf2etools-install.sh +++ b/install/pf2etools-install.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: TheRealVira -# License: MIT +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://pf2etools.com/ # Import Functions und Setup @@ -30,7 +30,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -38,7 +38,6 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -# Setup App msg_info "Setup Pf2eTools" cd /opt RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') @@ -48,7 +47,6 @@ mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools cd /opt/Pf2eTools $STD npm install $STD npm run build -cd ~ echo "${RELEASE}" >/opt/Pf2eTools_version.txt msg_ok "Set up Pf2eTools" @@ -66,7 +64,6 @@ chown -R www-data: "/opt/Pf2eTools" chmod -R 755 "/opt/Pf2eTools" msg_ok "Created Service" -# Cleanup msg_info "Cleaning up" rm -rf /opt/${RELEASE}.zip $STD apt-get -y autoremove @@ -74,4 +71,4 @@ $STD apt-get -y autoclean msg_ok "Cleaned" motd_ssh -customize +customize \ No newline at end of file diff --git a/install/photoprism-install.sh b/install/photoprism-install.sh index 8b6069a8b..29a48320b 100644 --- a/install/photoprism-install.sh +++ b/install/photoprism-install.sh @@ -64,6 +64,35 @@ PHOTOPRISM_PUBLIC='false' PHOTOPRISM_DEBUG='false' EOF ln -sf /opt/photoprism/bin/photoprism /usr/local/bin/photoprism + +mkdir -p /etc/photoprism/ +cat </etc/photoprism/defaults.yml +ConfigPath: "~/.config/photoprism" +StoragePath: "/opt/photoprism/storage" +OriginalsPath: "/opt/photoprism/photos/originals" +ImportPath: "/media" +AdminUser: "admin" +AdminPassword: "changeme" +AuthMode: "password" +DatabaseDriver: "sqlite" +HttpHost: "0.0.0.0" +HttpPort: 2342 +HttpCompression: "gzip" +DisableTLS: false +DefaultTLS: true +Experimental: false +DisableWebDAV: false +DisableSettings: false +DisableTensorFlow: false +DisableFaces: false +DisableClassification: false +DisableVectors: false +DisableRaw: false +RawPresets: false +JpegQuality: 85 +DetectNSFW: false +UploadNSFW: true +EOF msg_ok "Installed PhotoPrism" msg_info "Creating Service" diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 455b8b1d9..fcde213f8 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -14,34 +14,50 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y ufw -$STD apt-get install -y ntp -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + ufw \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Installing Pi-hole" -mkdir -p /etc/pihole/ -cat </etc/pihole/setupVars.conf -PIHOLE_INTERFACE=eth0 -PIHOLE_DNS_1=8.8.8.8 -PIHOLE_DNS_2=8.8.4.4 -QUERY_LOGGING=true -INSTALL_WEB_SERVER=true -INSTALL_WEB_INTERFACE=true -LIGHTTPD_ENABLED=true -CACHE_SIZE=10000 -DNS_FQDN_REQUIRED=true -DNS_BOGUS_PRIV=true -DNSMASQ_LISTENING=local -WEBPASSWORD=$(openssl rand -base64 48) -BLOCKING_ENABLED=true -EOF -# View script https://install.pi-hole.net +mkdir -p /etc/pihole +touch /etc/pihole/pihole.toml $STD bash <(curl -fsSL https://install.pi-hole.net) --unattended +sed -i -E ' +/^\s*upstreams =/ s|=.*|= ["8.8.8.8", "8.8.4.4"]| +/^\s*interface =/ s|=.*|= "eth0"| +/^\s*queryLogging =/ s|=.*|= true| +/^\s*size =/ s|=.*|= 10000| +/^\s*active =/ s|=.*|= true| +/^\s*listeningMode =/ s|=.*|= "LOCAL"| +/^\s*port =/ s|=.*|= "80o,443os,[::]:80o,[::]:443os"| +/^\s*pwhash =/ s|=.*|= ""| + +# DHCP Disable +/^\s*\[dhcp\]/,/^\s*\[/{s/^\s*active = true/ active = false/} + +# NTP Disable +/^\s*\[ntp.ipv4\]/,/^\s*\[/{s/^\s*active = true/ active = false/} +/^\s*\[ntp.ipv6\]/,/^\s*\[/{s/^\s*active = true/ active = false/} +/^\s*\[ntp.sync\]/,/^\s*\[/{s/^\s*active = true/ active = false/} +/^\s*\[ntp.sync\]/,/^\s*\[/{s/^\s*interval = [0-9]+/ interval = 0/} +/^\s*\[ntp.sync.rtc\]/,/^\s*\[/{s/^\s*set = true/ set = false/} + +# set domainNeeded und expandHosts +/^\s*domainNeeded =/ s|=.*|= true| +/^\s*expandHosts =/ s|=.*|= true| +' /etc/pihole/pihole.toml + +cat < /etc/dnsmasq.d/01-pihole.conf +server=8.8.8.8 +server=8.8.4.4 +EOF +$STD pihole-FTL --config ntp.sync.interval 0 +systemctl restart pihole-FTL.service msg_ok "Installed Pi-hole" read -r -p "Would you like to add Unbound? " prompt @@ -121,9 +137,13 @@ forward-zone: #forward-addr: 2620:fe::9@853#dns.quad9.net EOF fi +cat < /etc/dnsmasq.d/01-pihole.conf +server=127.0.0.1#5335 +server=8.8.8.8 +server=8.8.4.4 +EOF - sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e '/PIHOLE_DNS_2=8.8.4.4/d' /etc/pihole/setupVars.conf - sed -i -e 's/server=8.8.8.8/server=127.0.0.1#5335/' -e '/server=8.8.4.4/d' /etc/dnsmasq.d/01-pihole.conf + sed -i -E "s|^(upstreams =).*|\1 [\"127.0.0.1#5335\", \"8.8.4.4\"]|" /etc/pihole/pihole.toml systemctl enable -q --now unbound systemctl restart pihole-FTL.service msg_ok "Installed Unbound" diff --git a/install/pingvin-install.sh b/install/pingvin-install.sh index befeabceb..7b9ebc6d6 100644 --- a/install/pingvin-install.sh +++ b/install/pingvin-install.sh @@ -28,7 +28,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/pocketid-install.sh b/install/pocketid-install.sh index c330ad365..167c831bb 100644 --- a/install/pocketid-install.sh +++ b/install/pocketid-install.sh @@ -3,7 +3,7 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: Snarkenfaugister # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/stonith404/pocket-id +# Source: https://github.com/pocket-id/pocket-id source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -35,20 +35,21 @@ $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Golang" -cd /tmp set +o pipefail -GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz") -wget -q https://golang.org/dl/${GO_RELEASE} -tar -xzf ${GO_RELEASE} -C /usr/local -ln -s /usr/local/go/bin/go /usr/bin/go +temp_file=$(mktemp) +golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +rm -f "$temp_file" set -o pipefail msg_ok "Installed Golang" read -r -p "What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url msg_info "Setup Pocket ID" cd /opt -RELEASE=$(curl -s https://api.github.com/repos/stonith404/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q "https://github.com/stonith404/pocket-id/archive/refs/tags/v${RELEASE}.zip" +RELEASE=$(curl -s https://api.github.com/repos/pocket-id/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/pocket-id/pocket-id/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv pocket-id-${RELEASE}/ /opt/pocket-id diff --git a/install/podman-homeassistant-install.sh b/install/podman-homeassistant-install.sh index 3dccd3bb3..526813eae 100644 --- a/install/podman-homeassistant-install.sh +++ b/install/podman-homeassistant-install.sh @@ -21,11 +21,72 @@ $STD apt-get install -y wget $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent") + +if $STD mount | grep 'on / type zfs' > null && echo "ZFS"; then + msg_info "Enabling ZFS support." + mkdir -p /etc/containers + cat <<'EOF' >/usr/local/bin/overlayzfsmount +#!/bin/sh +exec /bin/mount -t overlay overlay "$@" +EOF + chmod +x /usr/local/bin/overlayzfsmount + cat <<'EOF' >/etc/containers/storage.conf +[storage] +driver = "overlay" +runroot = "/run/containers/storage" +graphroot = "/var/lib/containers/storage" + +[storage.options] +pull_options = {enable_partial_images = "false", use_hard_links = "false", ostree_repos=""} +mount_program = "/usr/local/bin/overlayzfsmount" + +[storage.options.overlay] +mountopt = "nodev" +EOF +fi + msg_info "Installing Podman" $STD apt-get -y install podman $STD systemctl enable --now podman.socket +echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf msg_ok "Installed Podman" +read -r -p "Would you like to add Portainer? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + podman volume create portainer_data >/dev/null + $STD podman run -d \ + -p 8000:8000 \ + -p 9443:9443 \ + --name=portainer \ + --restart=always \ + -v /run/podman/podman.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +else + read -r -p "Would you like to add the Portainer Agent? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" + podman volume create temp >/dev/null + podman volume remove temp >/dev/null + $STD podman run -d \ + -p 9001:9001 \ + --name portainer_agent \ + --restart=always \ + -v /run/podman/podman.sock:/var/run/docker.sock \ + -v /var/lib/containers/storage/volumes:/var/lib/docker/volumes \ + portainer/agent + msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" + fi +fi + msg_info "Pulling Home Assistant Image" $STD podman pull docker.io/homeassistant/home-assistant:stable msg_ok "Pulled Home Assistant Image" diff --git a/install/podman-install.sh b/install/podman-install.sh index d71d2b20c..f2e95721f 100644 --- a/install/podman-install.sh +++ b/install/podman-install.sh @@ -21,12 +21,73 @@ $STD apt-get install -y wget $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" +get_latest_release() { + curl -sL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4 +} + +PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer") +PORTAINER_AGENT_LATEST_VERSION=$(get_latest_release "portainer/agent") + +if $STD mount | grep 'on / type zfs' > null && echo "ZFS"; then + msg_info "Enabling ZFS support." + mkdir -p /etc/containers + cat <<'EOF' >/usr/local/bin/overlayzfsmount +#!/bin/sh +exec /bin/mount -t overlay overlay "$@" +EOF + chmod +x /usr/local/bin/overlayzfsmount + cat <<'EOF' >/etc/containers/storage.conf +[storage] +driver = "overlay" +runroot = "/run/containers/storage" +graphroot = "/var/lib/containers/storage" + +[storage.options] +pull_options = {enable_partial_images = "false", use_hard_links = "false", ostree_repos=""} +mount_program = "/usr/local/bin/overlayzfsmount" + +[storage.options.overlay] +mountopt = "nodev" +EOF +fi + msg_info "Installing Podman" $STD apt-get -y install podman $STD systemctl enable --now podman.socket echo -e 'unqualified-search-registries=["docker.io"]' >> /etc/containers/registries.conf msg_ok "Installed Podman" +read -r -p "Would you like to add Portainer? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer $PORTAINER_LATEST_VERSION" + podman volume create portainer_data >/dev/null + $STD podman run -d \ + -p 8000:8000 \ + -p 9443:9443 \ + --name=portainer \ + --restart=always \ + -v /run/podman/podman.sock:/var/run/docker.sock \ + -v portainer_data:/data \ + portainer/portainer-ce:latest + msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION" +else + read -r -p "Would you like to add the Portainer Agent? " prompt + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Portainer agent $PORTAINER_AGENT_LATEST_VERSION" + podman volume create temp >/dev/null + podman volume remove temp >/dev/null + $STD podman run -d \ + -p 9001:9001 \ + --name portainer_agent \ + --restart=always \ + -v /run/podman/podman.sock:/var/run/docker.sock \ + -v /var/lib/containers/storage/volumes:/var/lib/docker/volumes \ + portainer/agent + msg_ok "Installed Portainer Agent $PORTAINER_AGENT_LATEST_VERSION" + fi +fi + + motd_ssh customize diff --git a/install/privatebin-install.sh b/install/privatebin-install.sh new file mode 100644 index 000000000..e91e64bb0 --- /dev/null +++ b/install/privatebin-install.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Nícolas Pastorello (opastorello) +# 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 \ + curl \ + sudo \ + mc \ + nginx \ + php8.2-fpm \ + php8.2-{common,cli,gd,mbstring,xml,fpm,curl,zip} \ + unzip \ + openssl +msg_ok "Installed Dependencies" + +msg_info "Installing PrivateBin" +RELEASE=$(curl -s https://api.github.com/repos/PrivateBin/PrivateBin/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/') +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +mkdir -p /opt/privatebin +cd /opt/privatebin +wget -q "https://github.com/PrivateBin/PrivateBin/archive/refs/tags/${RELEASE}.zip" +$STD unzip -q ${RELEASE}.zip +mv PrivateBin-${RELEASE}/* . +msg_ok "Installed PrivateBin" + +msg_info "Generating Universal SSL Certificate" +mkdir -p /etc/ssl/privatebin +$STD openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \ + -keyout /etc/ssl/privatebin/key.pem \ + -out /etc/ssl/privatebin/cert.pem \ + -subj "/CN=PrivateBin" +msg_ok "Certificate Generated" + +msg_info "Configuring Environment" +mkdir -p /opt/privatebin/data +cp cfg/conf.sample.php /opt/privatebin/cfg/conf.php +sed -i "s|// 'traffic'|'traffic'|g" /opt/privatebin/cfg/conf.php +chown -R www-data:www-data /opt/privatebin +chmod -R 0755 /opt/privatebin/data +msg_ok "Configured Environment" + +msg_info "Configuring PHP" +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php/8.2/fpm/php.ini +systemctl restart php8.2-fpm +msg_ok "Configured PHP" + +msg_info "Configuring Universal Nginx" +cat </etc/nginx/sites-available/privatebin.conf +server { + listen 80 default_server; + listen [::]:80 default_server; + return 301 https://\$host\$request_uri; +} + +server { + listen 443 ssl default_server; + listen [::]:443 ssl default_server; + + ssl_certificate /etc/ssl/privatebin/cert.pem; + ssl_certificate_key /etc/ssl/privatebin/key.pem; + + root /opt/privatebin; + index index.php; + + location / { + try_files \$uri \$uri/ /index.php\$is_args\$args; + } + + location ~ \.php\$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; + fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.ht { + deny all; + } + + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-XSS-Protection "1; mode=block"; +} +EOF +ln -s /etc/nginx/sites-available/privatebin.conf /etc/nginx/sites-enabled/ +rm -f /etc/nginx/sites-enabled/default +systemctl reload nginx +msg_ok "Nginx Configured" + +msg_info "Cleaning up" +rm -rf /opt/privatebin/${RELEASE}.zip +rm -rf /opt/privatebin/PrivateBin-${RELEASE} +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize diff --git a/install/prometheus-paperless-ngx-exporter-install.sh b/install/prometheus-paperless-ngx-exporter-install.sh new file mode 100755 index 000000000..bb21e802a --- /dev/null +++ b/install/prometheus-paperless-ngx-exporter-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Andy Grunwald (andygrunwald) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/hansmi/prometheus-paperless-exporter + +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 \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Prometheus Paperless NGX Exporter" +RELEASE=$(curl -s https://api.github.com/repos/hansmi/prometheus-paperless-exporter/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/hansmi/prometheus-paperless-exporter/releases/download/v${RELEASE}/prometheus-paperless-exporter_${RELEASE}_linux_amd64.tar.gz +tar -xf prometheus-paperless-exporter_${RELEASE}_linux_amd64.tar.gz +mv prometheus-paperless-exporter_${RELEASE}_linux_amd64/prometheus-paperless-exporter /usr/local/bin/ +mkdir -p /etc/prometheus-paperless-ngx-exporter +cat < /etc/prometheus-paperless-ngx-exporter/paperless_auth_token_file +SECRET_AUTH_TOKEN +EOF +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Prometheus Paperless NGX Exporter" + +msg_info "Creating Service" +cat </etc/systemd/system/prometheus-paperless-ngx-exporter.service +[Unit] +Description=Prometheus Paperless NGX Exporter +Wants=network-online.target +After=network-online.target + +[Service] +User=root +Restart=always +Type=simple +ExecStart=/usr/local/bin/prometheus-paperless-exporter \ + --paperless_url=http://paperless.example.org \ + --paperless_auth_token_file=/etc/prometheus-paperless-ngx-exporter/paperless_auth_token_file +ExecReload=/bin/kill -HUP \$MAINPID + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now prometheus-paperless-ngx-exporter +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +rm -rf prometheus-paperless-exporter_${RELEASE}_linux_amd64/ prometheus-paperless-exporter_${RELEASE}_linux_amd64.tar.gz +msg_ok "Cleaned" diff --git a/install/prometheus-pve-exporter-install.sh b/install/prometheus-pve-exporter-install.sh index a1e3c8918..ecbeb000a 100644 --- a/install/prometheus-pve-exporter-install.sh +++ b/install/prometheus-pve-exporter-install.sh @@ -28,7 +28,7 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Setup Python3" msg_info "Installing Prometheus Proxmox VE Exporter" -python3 -m pip install --quiet --root-user-action=ignore prometheus-pve-exporter +python3 -m pip install --default-timeout=300 --quiet --root-user-action=ignore prometheus-pve-exporter mkdir -p /opt/prometheus-pve-exporter cat < /opt/prometheus-pve-exporter/pve.yml default: diff --git a/install/pbs-install.sh b/install/proxmox-backup-server-install.sh similarity index 77% rename from install/pbs-install.sh rename to install/proxmox-backup-server-install.sh index 9dd3ab5e7..a1bc779a5 100644 --- a/install/pbs-install.sh +++ b/install/proxmox-backup-server-install.sh @@ -14,13 +14,13 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y wget -$STD apt-get install -y dpkg-dev -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + gpg \ + mc \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Installing Proxmox Backup Server" diff --git a/install/proxmox-mail-gateway-install.sh b/install/proxmox-mail-gateway-install.sh new file mode 100644 index 000000000..0b0ef63de --- /dev/null +++ b/install/proxmox-mail-gateway-install.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: thost96 (thost96) +# 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 -y install \ + curl \ + sudo \ + mc \ + wget +msg_ok "Installed Dependencies" + +msg_info "Installing Proxmox Mail Gateway" +wget -q https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg +echo "deb http://download.proxmox.com/debian/pmg bookworm pmg-no-subscription" > /etc/apt/sources.list.d/pmg.list +$STD apt-get update +$STD apt-get -y install proxmox-mailgateway-container +msg_ok "Installed Proxmox Mail Gateway" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/radicale-install.sh b/install/radicale-install.sh new file mode 100644 index 000000000..3a6e092aa --- /dev/null +++ b/install/radicale-install.sh @@ -0,0 +1,72 @@ +#!/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 /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 \ + curl \ + sudo \ + mc \ + apache2-utils \ + python3-pip \ + python3.11-venv +msg_ok "Installed Dependencies" + +msg_info "Setting up Radicale" +python3 -m venv /opt/radicale +source /opt/radicale/bin/activate +$STD python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz +RNDPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD htpasswd -c -b -5 /opt/radicale/users admin $RNDPASS +{ +echo "Radicale Credentials" +echo "Admin User: admin" +echo "Admin Password: $RNDPASS" +} >> ~/radicale.creds +msg_ok "Done setting up Radicale" + +msg_info "Setup Service" + +cat </opt/radicale/start.sh +#!/usr/bin/env bash +source /opt/radicale/bin/activate +python3 -m radicale --storage-filesystem-folder=/var/lib/radicale/collections --hosts 0.0.0.0:5232 --auth-type htpasswd --auth-htpasswd-filename /opt/radicale/users --auth-htpasswd-encryption sha512 +EOF + +chmod +x /opt/radicale/start.sh + +cat </etc/systemd/system/radicale.service +Description=A simple CalDAV (calendar) and CardDAV (contact) server +After=network.target +Requires=network.target + +[Service] +ExecStart=/opt/radicale/start.sh +Restart=on-failure +# User=radicale +# Deny other users access to the calendar data +# UMask=0027 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now radicale +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/rtsptoweb-install.sh b/install/rtsptoweb-install.sh index 1c19aba47..99d30b792 100644 --- a/install/rtsptoweb-install.sh +++ b/install/rtsptoweb-install.sh @@ -23,10 +23,10 @@ $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" msg_info "Installing Golang" -$STD wget https://golang.org/dl/go1.20.1.linux-arm64.tar.gz -$STD tar -xzf go1.20.1.linux-arm64.tar.gz -C /usr/local +$STD wget https://golang.org/dl/go1.23.2.linux-arm64.tar.gz +$STD tar -xzf go1.23.2.linux-arm64.tar.gz -C /usr/local $STD ln -s /usr/local/go/bin/go /usr/local/bin/go -rm -rf go1.20.1.linux-arm64.tar.gz +rm -rf go1.23.2.linux-arm64.tar.gz msg_ok "Installed Golang" msg_info "Installing RTSPtoWeb" diff --git a/install/rustdeskserver-install.sh b/install/rustdeskserver-install.sh new file mode 100644 index 000000000..fc08b2c2b --- /dev/null +++ b/install/rustdeskserver-install.sh @@ -0,0 +1,40 @@ +#!/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/rustdesk/rustdesk-server + +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 \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup RustDesk" +RELEASE=$(curl -s https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +TEMPDIR=$(mktemp -d) +wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR +wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR +wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR +$STD dpkg -i $TEMPDIR/*.deb +echo "${RELEASE}" >/opt/rustdesk.txt +msg_ok "Setup RustDesk" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $TEMPDIR +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/searxng-install.sh b/install/searxng-install.sh new file mode 100644 index 000000000..a2b5bc611 --- /dev/null +++ b/install/searxng-install.sh @@ -0,0 +1,116 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/searxng/searxng + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + redis-server \ + build-essential \ + libffi-dev \ + libssl-dev \ + curl \ + sudo \ + git \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup Python3" +$STD apt-get install -y \ + python3 \ + python3-{pip,venv,yaml,dev} +$STD pip install --upgrade pip setuptools wheel +$STD pip install pyyaml +msg_ok "Setup Python3" + +msg_info "Setup SearXNG" +mkdir -p /usr/local/searxng /etc/searxng +useradd -d /etc/searxng searxng +chown searxng:searxng /usr/local/searxng /etc/searxng +$STD git clone https://github.com/searxng/searxng.git /usr/local/searxng/searxng-src +cd /usr/local/searxng/ +sudo -u searxng python3 -m venv /usr/local/searxng/searx-pyenv +source /usr/local/searxng/searx-pyenv/bin/activate +$STD pip install --upgrade pip setuptools wheel +$STD pip install pyyaml +$STD pip install -e /usr/local/searxng/searxng-src +SECRET_KEY=$(openssl rand -hex 32) +cat </etc/searxng/settings.yml +# SearXNG settings +use_default_settings: true +general: + debug: false + instance_name: "SearXNG" + privacypolicy_url: false + contact_url: false +server: + bind_address: "0.0.0.0" + port: 8888 + secret_key: "${SECRET_KEY}" + limiter: true + image_proxy: true +redis: + url: "redis://127.0.0.1:6379/0" +ui: + static_use_hash: true +enabled_plugins: + - 'Hash plugin' + - 'Self Information' + - 'Tracker URL remover' + - 'Ahmia blacklist' +search: + safe_search: 2 + autocomplete: 'google' +engines: + - name: google + engine: google + shortcut: gg + use_mobile_ui: false + - name: duckduckgo + engine: duckduckgo + shortcut: ddg + display_error_messages: true +EOF +chown searxng:searxng /etc/searxng/settings.yml +chmod 640 /etc/searxng/settings.yml +msg_ok "Setup SearXNG" + +msg_info "Set up web services" +cat </etc/systemd/system/searxng.service +[Unit] +Description=SearXNG service +After=network.target redis-server.service +Wants=redis-server.service + +[Service] +Type=simple +User=searxng +Group=searxng +Environment="SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml" +ExecStart=/usr/local/searxng/searx-pyenv/bin/python -m searx.webapp +WorkingDirectory=/usr/local/searxng/searxng-src +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now searxng +msg_ok "Created Services" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/seelf-install.sh b/install/seelf-install.sh new file mode 100644 index 000000000..ddc160572 --- /dev/null +++ b/install/seelf-install.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/YuukanOO/seelf + +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 \ + curl \ + sudo \ + mc \ + make \ + gcc +wget -q https://go.dev/dl/go1.23.5.linux-amd64.tar.gz +curl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash &> /dev/null +tar -C /usr/local -xzf go1.23.5.linux-amd64.tar.gz +export PATH=$PATH:/usr/local/go/bin +source ~/.bashrc +$STD nvm install node +msg_ok "Installed Dependencies" + +msg_info "Setting up seelf. Patience" +RELEASE=$(curl -s https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz" +tar -xzf v${RELEASE}.tar.gz +mv seelf-${RELEASE}/ /opt/seelf +cd /opt/seelf +$STD make build +PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +{ + echo "ADMIN_EMAIL=admin@example.com" + echo "ADMIN_PASSWORD=$PASS" +} | tee .env ~/seelf.creds > /dev/null + +echo "${RELEASE}" >/opt/seelf_version.txt +SEELF_ADMIN_EMAIL=admin@example.com SEELF_ADMIN_PASSWORD=$PASS ./seelf serve &> /dev/null & sleep 5 ; kill $! +msg_ok "Done setting up seelf" + +msg_info "Creating Service" +cat </etc/systemd/system/seelf.service +[Unit] +Description=seelf Service +After=network.target + +[Service] +Type=simple +User=root +Group=root +WorkingDirectory=/opt/seelf +ExecStart=/opt/seelf/./seelf serve +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now seelf +msg_ok "Created Service" + +motd_ssh +customize + +# Cleanup +msg_info "Cleaning up" +rm -f ~/v${RELEASE}.tar.gz +rm -f ~/go1.23.5.linux-amd64.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize \ No newline at end of file diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh index c44892c57..2a513d0f5 100644 --- a/install/sftpgo-install.sh +++ b/install/sftpgo-install.sh @@ -24,12 +24,10 @@ $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" msg_info "Installing Golang" -set +o pipefail -RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-arm64.tar.gz" | head -n 1) -wget -q https://golang.org/dl/$RELEASE -tar -xzf $RELEASE -C /usr/local +$STD wget https://golang.org/dl/go1.23.2.linux-arm64.tar.gz +$STD tar -xzf go1.23.2.linux-arm64.tar.gz -C /usr/local $STD ln -s /usr/local/go/bin/go /usr/local/bin/go -set -o pipefail +rm -rf go1.23.2.linux-arm64.tar.gz msg_ok "Installed Golang" msg_info "Installing SFTPGo" diff --git a/install/shinobi-install.sh b/install/shinobi-install.sh index 6b83d3600..0c034f384 100644 --- a/install/shinobi-install.sh +++ b/install/shinobi-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/spoolman-install.sh b/install/spoolman-install.sh index 7d7a20dcf..2e8f0987c 100644 --- a/install/spoolman-install.sh +++ b/install/spoolman-install.sh @@ -28,13 +28,13 @@ $STD apt-get install -y \ openssh-server msg_ok "Installed Dependencies" -msg_info "Installing Python3" +msg_info "Setup Python3" $STD apt-get install -y \ python3-dev \ python3-setuptools \ python3-wheel \ python3-pip -msg_ok "Installed Python3" +msg_ok "Setup Python3" msg_info "Installing Spoolman" RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) diff --git a/install/sqlserver2022-install.sh b/install/sqlserver2022-install.sh index 7e06fe03d..7b30cd821 100644 --- a/install/sqlserver2022-install.sh +++ b/install/sqlserver2022-install.sh @@ -2,10 +2,9 @@ # Copyright (c) 2021-2025 community-scripts ORG # Author: Kristian Skov -# License: MIT -# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# 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 @@ -15,18 +14,16 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - curl \ + curl \ mc \ sudo \ - gpg \ - coreutils + gpg \ + coreutils msg_ok "Installed Dependencies" msg_info "Setup SQL Server 2022" -$STD curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg -$STD curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc -$STD curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list -$STD apt-get clean * +curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null +curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list > /dev/null $STD apt-get update -y $STD apt-get install -y mssql-server msg_ok "Setup Server 2022" @@ -34,13 +31,13 @@ msg_ok "Setup Server 2022" msg_info "Installing SQL Server Tools" export DEBIAN_FRONTEND=noninteractive export ACCEPT_EULA=Y -curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc -curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list +curl -s https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null +curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list > /dev/null $STD apt-get update $STD apt-get install -y -qq \ mssql-tools18 \ unixodbc-dev -echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile +echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile source ~/.bash_profile msg_ok "Installed SQL Server Tools" @@ -52,7 +49,7 @@ else fi msg_info "Start Service" -systemctl enable -q --now mssql-server +systemctl enable -q --now mssql-server msg_ok "Service started" motd_ssh diff --git a/install/suwayomiserver-install.sh b/install/suwayomiserver-install.sh new file mode 100644 index 000000000..3d0354a90 --- /dev/null +++ b/install/suwayomiserver-install.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Suwayomi/Suwayomi-Server + +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 \ + curl \ + sudo \ + mc \ + openjdk-17-jre \ + libc++-dev +msg_ok "Installed Dependencies" + +msg_info "Settting up Suwayomi-Server" +URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1) +RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q $URL +$STD dpkg -i *.deb +echo ${RELEASE} >/opt/suwayomi-server_version.txt +msg_ok "Done setting up Suwayomi-Server" +msg_info "Creating Service" +cat </etc/systemd/system/suwayomi-server.service +[Unit] +Description=Suwayomi-Server Service +After=network.target + +[Service] +ExecStart=/usr/bin/suwayomi-server +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now suwayomi-server +msg_ok "Created Service" +motd_ssh +customize +msg_info "Cleaning up" +rm -f *.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/tasmocompiler-install.sh b/install/tasmocompiler-install.sh new file mode 100644 index 000000000..24997303d --- /dev/null +++ b/install/tasmocompiler-install.sh @@ -0,0 +1,87 @@ +#!/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/benzino77/tasmocompiler + +# Import Functions und Setup +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies. Patience" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + gnupg \ + git +msg_ok "Installed Dependencies" + +msg_info "Setup Python3" +$STD apt-get install -y python3-venv +msg_ok "Setup Python3" + +msg_info "Setup 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 yarn +msg_ok "Setup Node.js & yarn" + +msg_info "Setup Platformio" +curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py +$STD python3 get-platformio.py +msg_ok "Setup Platformio" + +msg_info "Setup TasmoCompiler" +mkdir /tmp/Tasmota +RELEASE=$(curl -s https://api.github.com/repos/benzino77/tasmocompiler/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/benzino77/tasmocompiler/archive/refs/tags/v${RELEASE}.tar.gz -O /tmp/v${RELEASE}.tar.gz +cd /tmp +tar xzf /tmp/v${RELEASE}.tar.gz +mv tasmocompiler-${RELEASE}/ /opt/tasmocompiler/ +cd /opt/tasmocompiler +$STD yarn install +export NODE_OPTIONS=--openssl-legacy-provider +$STD npm i +$STD yarn build +mkdir -p /usr/local/bin +ln -s ~/.platformio/penv/bin/platformio /usr/local/bin/platformio +ln -s ~/.platformio/penv/bin/pio /usr/local/bin/pio +ln -s ~/.platformio/penv/bin/piodebuggdb /usr/local/bin/piodebuggdb +echo "${RELEASE}" >"/opt/tasmocompiler_version.txt" +msg_ok "Setup TasmoCompiler" + +msg_info "Creating Service" +cat </etc/systemd/system/tasmocompiler.service +[Unit] +Description=TasmoCompiler Service +After=multi-user.target + +[Service] +Type=simple +User=root +ExecStart=/usr/bin/node /opt/tasmocompiler/server/app.js + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now tasmocompiler +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f /tmp/v${RELEASE}.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/the-lounge-install.sh b/install/the-lounge-install.sh index 8b6bdefc0..9f969af8d 100644 --- a/install/the-lounge-install.sh +++ b/install/the-lounge-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/trilium-install.sh b/install/trilium-install.sh index 8dc3512a7..f2eaa169a 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -2,8 +2,7 @@ # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) -# License: MIT -# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,25 +13,26 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y openssh-server -$STD apt-get install -y wget +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + wget \ + openssh-server msg_ok "Installed Dependencies" +msg_info "Setup TriliumNext" +cd /opt RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - -msg_info "Installing TriliumNext" -wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz -tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz +wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-linux-x64-${RELEASE}.tar.xz +tar -xf TriliumNextNotes-linux-x64-${RELEASE}.tar.xz mv trilium-linux-x64-server /opt/trilium -msg_ok "Installed TriliumNext" +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Setup TriliumNext" msg_info "Creating Service" -service_path="/etc/systemd/system/trilium.service" - -echo "[Unit] +cat </etc/systemd/system/trilium.service +[Unit] Description=Trilium Daemon After=syslog.target network.target @@ -45,7 +45,8 @@ TimeoutStopSec=20 Restart=always [Install] -WantedBy=multi-user.target" >$service_path +WantedBy=multi-user.target +EOF systemctl enable --now -q trilium msg_ok "Created Service" @@ -53,7 +54,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -rf /opt/TriliumNextNotes-linux-x64-${RELEASE}.tar.xz $STD apt-get -y autoremove $STD apt-get -y autoclean -rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz msg_ok "Cleaned" diff --git a/install/umami-install.sh b/install/umami-install.sh index 1b850aee2..2f6f9a177 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/uptimekuma-install.sh b/install/uptimekuma-install.sh index e9b49382a..10aadcd0f 100644 --- a/install/uptimekuma-install.sh +++ b/install/uptimekuma-install.sh @@ -27,7 +27,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/watcharr-install.sh b/install/watcharr-install.sh new file mode 100644 index 000000000..aa3c249df --- /dev/null +++ b/install/watcharr-install.sh @@ -0,0 +1,93 @@ +#!/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/sbondCo/Watcharr + +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 \ + curl \ + sudo \ + mc \ + gcc \ + gnupg +msg_ok "Installed Dependencies" + +msg_info "Setup Golang" +set +o pipefail +temp_file=$(mktemp) +golang_tarball=$(curl -s https://go.dev/dl/ | grep -oP 'go[\d\.]+\.linux-amd64\.tar\.gz' | head -n 1) +wget -q https://golang.org/dl/"$golang_tarball" -O "$temp_file" +tar -C /usr/local -xzf "$temp_file" +ln -sf /usr/local/go/bin/go /usr/local/bin/go +rm -f "$temp_file" +set -o pipefail +msg_ok "Setup Golang" + +msg_info "Setup Node.js" +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 +msg_ok "Setup Node.js" + +msg_info "Setup Watcharr" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/sbondCo/Watcharr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/sbondCo/Watcharr/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" +tar -xzf "$temp_file" +mv Watcharr-${RELEASE}/ /opt/watcharr +cd /opt/watcharr +$STD npm i +$STD npm run build +mv ./build ./server/ui +cd server +export CGO_ENABLED=1 GOOS=linux +go mod download +go build -o ./watcharr +cat </opt/start.sh +#! /bin/bash +source ~/.bashrc +cd /opt/watcharr/server +./watcharr +EOF +chmod +x /opt/start.sh +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup Watcharr" + +msg_info "Creating Service" +cat </etc/systemd/system/watcharr.service +[Unit] +Description=Watcharr Service +After=network.target + +[Service] +WorkingDirectory=/opt/watcharr/server +ExecStart=/opt/start.sh +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now watcharr +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" \ No newline at end of file diff --git a/install/wikijs-install.sh b/install/wikijs-install.sh index 8d8cd9785..2fd76842c 100644 --- a/install/wikijs-install.sh +++ b/install/wikijs-install.sh @@ -5,7 +5,7 @@ # License: MIT # https://github.com/tteck/Proxmox/raw/main/LICENSE -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -14,14 +14,19 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y git -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + ca-certificates \ + gnupg \ + build-essential \ + python3 \ + g++ \ + make \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -30,56 +35,78 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea 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 msg_ok "Set up Node.js Repository" +msg_info "Setting up PostgreSQL Repository" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list +msg_ok "Set up PostgreSQL Repository" + msg_info "Installing Node.js" $STD apt-get update $STD apt-get install -y nodejs +$STD npm install --global yarn +$STD npm install -g node-gyp msg_ok "Installed Node.js" -msg_info "Installing Wiki.js" -mkdir -p /opt/wikijs -cd /opt/wikijs -$STD wget https://github.com/Requarks/wiki/releases/latest/download/wiki-js.tar.gz -tar xzf wiki-js.tar.gz -rm wiki-js.tar.gz +msg_info "Set up PostgreSQL" +$STD apt-get install -y postgresql-17 +DB_NAME="wiki" +DB_USER="wikijs_user" +DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;" $DB_NAME +$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 "WikiJS-Credentials" + echo "WikiJS Database User: $DB_USER" + echo "WikiJS Database Password: $DB_PASS" + echo "WikiJS Database Name: $DB_NAME" +} >> ~/wikijs.creds +msg_ok "Set up PostgreSQL" -cat </opt/wikijs/config.yml -bindIP: 0.0.0.0 -port: 3000 -db: - type: sqlite - storage: /opt/wikijs/db.sqlite -logLevel: info -logFormat: default -dataPath: /opt/wikijs/data -bodyParserLimit: 5mb -EOF -$STD npm rebuild sqlite3 +msg_info "Setup Wiki.js" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/Requarks/wiki/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/Requarks/wiki/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" +tar -xzf "$temp_file" +mv wiki-${RELEASE} /opt/wikijs +mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml +sed -i -E 's|^( *user: ).*|\1'"$DB_USER"'|' /opt/wikijs/config.yml +sed -i -E 's|^( *pass: ).*|\1'"$DB_PASS"'|' /opt/wikijs/config.yml +cd /opt/wikijs +export NODE_OPTIONS="--max-old-space-size=2048" +$STD yarn install --ignore-engines +$STD yarn build +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Wiki.js" msg_info "Creating Service" -service_path="/etc/systemd/system/wikijs.service" - -echo "[Unit] +cat </etc/systemd/system/wikijs.service +[Unit] Description=Wiki.js After=network.target [Service] Type=simple -ExecStart=/usr/bin/node server +ExecStart=/usr/bin/yarn start Restart=always User=root Environment=NODE_ENV=production WorkingDirectory=/opt/wikijs [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now wikijs +WantedBy=multi-user.target +EOF +systemctl enable -q --now wikijs 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" diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index f5aa93670..d8a02aaf3 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -24,7 +24,6 @@ msg_ok "Installed Dependencies" msg_info "Installing WireGuard" $STD apt-get install -y wireguard wireguard-tools net-tools iptables -iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -y iptables-persistent &>/dev/null $STD netfilter-persistent reload msg_ok "Installed WireGuard" diff --git a/install/zerotier-one-install.sh b/install/zerotier-one-install.sh new file mode 100644 index 000000000..d15770574 --- /dev/null +++ b/install/zerotier-one-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +#Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 +# 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 \ + curl \ + mc \ + sudo \ + gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up Zerotier-One" +curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/main/doc/contact%40zerotier.com.gpg' | gpg --import && \ +if z="$(curl -s 'https://install.zerotier.com/' | gpg)"; then +echo "$z" | sudo bash +fi +msg_ok "Setup Zerotier-One" + +msg_info "Setting up UI" +curl -O https://s3-us-west-1.amazonaws.com/key-networks/deb/ztncui/1/x86_64/ztncui_0.8.14_amd64.deb +dpkg -i ztncui_0.8.14_amd64.deb +sh -c "echo ZT_TOKEN=$(cat /var/lib/zerotier-one/authtoken.secret) > /opt/key-networks/ztncui/.env" +echo HTTPS_PORT=3443 >> /opt/key-networks/ztncui/.env +echo NODE_ENV=production >> /opt/key-networks/ztncui/.env +chmod 400 /opt/key-networks/ztncui/.env +chown ztncui:ztncui /opt/key-networks/ztncui/.env +systemctl restart ztncui +msg_ok "Done setting up UI." + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/zipline-install.sh b/install/zipline-install.sh index 0cee201e5..2b9b0e92e 100644 --- a/install/zipline-install.sh +++ b/install/zipline-install.sh @@ -29,20 +29,20 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" $STD apt-get update $STD apt-get install -y nodejs -$STD npm install -g yarn +$STD npm install -g pnpm msg_ok "Installed Node.js" msg_info "Setting up PostgreSQL" DB_NAME=ziplinedb DB_USER=zipline DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" -SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')" $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';" @@ -62,13 +62,15 @@ wget -q "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv zipline-${RELEASE} /opt/zipline cd /opt/zipline -mv .env.local.example .env -sudo sed -i "s|CORE_SECRET=.*|CORE_SECRET=\"$SECRET_KEY\"|" /opt/zipline/.env -sudo sed -i "s|CORE_RETURN_HTTPS=.*|CORE_RETURN_HTTPS=false|" /opt/zipline/.env -sudo sed -i "s|CORE_DATABASE_URL=.*|CORE_DATABASE_URL=\"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME\"|" /opt/zipline/.env +cat </opt/zipline/.env +DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME +CORE_SECRET=$SECRET_KEY +CORE_HOSTNAME=0.0.0.0 +CORE_PORT=3000 CORE_RETURN_HTTPS=false -$STD yarn install -$STD yarn build +EOF +$STD pnpm install +$STD pnpm build echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Zipline" @@ -80,19 +82,18 @@ After=network.target [Service] WorkingDirectory=/opt/zipline -ExecStart=/usr/bin/yarn start +ExecStart=/usr/bin/pnpm start Restart=on-failure [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now zipline.service +systemctl enable -q --now zipline msg_ok "Created Service" motd_ssh customize - msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/install/zitadel-install.sh b/install/zitadel-install.sh new file mode 100644 index 000000000..6ee097ca4 --- /dev/null +++ b/install/zitadel-install.sh @@ -0,0 +1,155 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: dave-yap +# 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 (Patience)" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + ca-certificates \ + wget +msg_ok "Installed Dependecies" + +msg_info "Installing Postgresql" +$STD apt-get install -y postgresql postgresql-common +DB_NAME="zitadel" +DB_USER="zitadel" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +DB_ADMIN_USER="root" +DB_ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +systemctl start postgresql +$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE USER $DB_ADMIN_USER WITH PASSWORD '$DB_ADMIN_PASS' SUPERUSER;" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_ADMIN_USER;" +{ + echo "Application Credentials" + echo "DB_NAME: $DB_NAME" + echo "DB_USER: $DB_USER" + echo "DB_PASS: $DB_PASS" + echo "DB_ADMIN_USER: $DB_ADMIN_USER" + echo "DB_ADMIN_PASS: $DB_ADMIN_PASS" +} >> ~/zitadel.creds +msg_ok "Installed PostgreSQL" + +msg_info "Installing Zitadel" +RELEASE=$(curl -si https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r') +wget -qc https://github.com/zitadel/zitadel/releases/download/$RELEASE/zitadel-linux-amd64.tar.gz -O - | tar -xz +mv zitadel-linux-amd64/zitadel /usr/local/bin +echo "${RELEASE}" >"/opt/zitadel_version.txt" +msg_ok "Installed Zitadel" + +msg_info "Setting up Zitadel Environments" +mkdir -p /opt/zitadel +echo "/opt/zitadel/config.yaml" > "/opt/zitadel/.config" +head -c 32 < <(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9') > "/opt/zitadel/.masterkey" +{ + echo "Config location: $(cat "/opt/zitadel/.config")" + echo "Masterkey: $(cat "/opt/zitadel/.masterkey")" +} >> ~/zitadel.creds +cat </opt/zitadel/config.yaml +Port: 8080 +ExternalPort: 8080 +ExternalDomain: localhost +ExternalSecure: false +TLS: + Enabled: false + KeyPath: "" + Key: "" + CertPath: "" + Cert: "" + +Database: + postgres: + Host: localhost + Port: 5432 + Database: ${DB_NAME} + User: + Username: ${DB_USER} + Password: ${DB_PASS} + SSL: + Mode: disable + RootCert: "" + Cert: "" + Key: "" + Admin: + Username: ${DB_ADMIN_USER} + Password: ${DB_ADMIN_PASS} + SSL: + Mode: disable + RootCert: "" + Cert: "" + Key: "" +EOF +msg_ok "Installed Zitadel Enviroments" + +msg_info "Creating Services" +cat </etc/systemd/system/zitadel.service +[Unit] +Description=ZITADEL Identiy Server +After=network.target postgresql.service +Wants=postgresql.service + +[Service] +Type=simple +User=zitadel +Group=zitadel +ExecStart=/usr/local/bin/zitadel start --masterkeyFile "/opt/zitadel/.masterkey" --config "/opt/zitadel/config.yaml" +Restart=always +RestartSec=5 +TimeoutStartSec=0 + +# Security Hardening options +ProtectSystem=full +ProtectHome=true +PrivateTmp=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q zitadel.service +msg_ok "Created Services" + +msg_info "Zitadel initial setup" +zitadel start-from-init --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml &>/dev/null & +sleep 60 +kill $(lsof -i | awk '/zitadel/ {print $2}' | head -n1) +useradd zitadel +echo -e "$(zitadel -v | grep -oP 'v\d+\.\d+\.\d+')" > /opt/Zitadel_version.txt +msg_ok "Zitadel initialized" + +msg_info "Set ExternalDomain to current IP and restart Zitadel" +IP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +sed -i "0,/localhost/s/localhost/${IP}/" /opt/zitadel/config.yaml +systemctl stop -q zitadel.service +zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml &>/dev/null +systemctl restart -q zitadel.service +msg_ok "Zitadel restarted with ExternalDomain set to current IP" + +msg_info "Create zitadel-rerun.sh" +cat <~/zitadel-rerun.sh +systemctl stop zitadel.service +timeout --kill-after=5s 15s zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml +systemctl restart zitadel.service +EOF +msg_ok "Bash script for rerunning Zitadel after changing Zitadel config.yaml" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf ~/zitadel-linux-amd64 +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/2fauth.json b/json/2fauth.json index bb1e6def6..be754ca0c 100644 --- a/json/2fauth.json +++ b/json/2fauth.json @@ -14,17 +14,16 @@ "logo": "https://raw.githubusercontent.com/Bubka/2FAuth/refs/heads/master/public/logo.svg", "description": "2FAuth is a web based self-hosted alternative to One Time Passcode (OTP) generators like Google Authenticator, designed for both mobile and desktop. It aims to ease you perform your 2FA authentication steps whatever the device you handle, with a clean and suitable interface.", "install_methods": [ - { - "type": "default", - "script": "ct/2fauth.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 2, - "os": "Debian", - "version": "12" - } - } + { + "type": "default", + "script": "ct/2fauth.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "12" + }} ], "default_credentials": { "username": null, diff --git a/json/5etools.json b/json/5etools.json deleted file mode 100644 index be9e0fab1..000000000 --- a/json/5etools.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "5etools", - "slug": "5etools", - "categories": [ - 24 - ], - "date_created": "2025-01-02", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 80, - "documentation": "https://wiki.tercept.net/en/5eTools", - "website": "https://5e.tools/", - "logo": "https://wiki.tercept.net/core-wiki-assets/5etoolslogocircle.png", - "description": "5eTools is a website providing a suite of tools for 5th Edition Dungeons & Dragons players and Dungeon Masters.", - "install_methods": [ - { - "type": "default", - "script": "ct/5etools.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 13, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [], - "status": "✅" -} \ No newline at end of file diff --git a/json/alpine-it-tools.json b/json/alpine-it-tools.json new file mode 100644 index 000000000..ff0587873 --- /dev/null +++ b/json/alpine-it-tools.json @@ -0,0 +1,34 @@ +{ + "name": "Alpine-IT-Tools", + "slug": "alpine-it-tools", + "categories": [ + 20 + ], + "date_created": "2025-01-30", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": null, + "website": "https://it-tools.tech/", + "logo": "https://raw.githubusercontent.com/CorentinTh/it-tools/08d977b8cdb7ffb76adfa18ba6eb4b73795ec814/public/safari-pinned-tab.svg", + "description": "IT-Tools is a web-based suite of utilities designed to streamline and simplify various IT tasks, providing tools for developers and system administrators to manage their workflows efficiently.", + "install_methods": [ + { + "type": "default", + "script": "ct/alpine-it-tools.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 0.2, + "os": "alpine", + "version": "3.21" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/apache-guacamole.json b/json/apache-guacamole.json index 5bf24bcff..7263b599e 100644 --- a/json/apache-guacamole.json +++ b/json/apache-guacamole.json @@ -21,7 +21,7 @@ "cpu": 1, "ram": 2048, "hdd": 4, - "os": "Debian", + "os": "debian", "version": "12" } } diff --git a/json/apache-tika.json b/json/apache-tika.json new file mode 100644 index 000000000..1e891727a --- /dev/null +++ b/json/apache-tika.json @@ -0,0 +1,34 @@ +{ + "name": "Apache Tika", + "slug": "apache-tika", + "categories": [ + 12 + ], + "date_created": "2025-02-05", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9998, + "documentation": null, + "website": "https://tika.apache.org/", + "logo": "https://tika.apache.org/tika.png", + "description": "The Apache Tika™ toolkit detects and extracts metadata and text from over a thousand different file types (such as PPT, XLS, and PDF). All of these file types can be parsed through a single interface, making Tika useful for search engine indexing, content analysis, translation, and much more.", + "install_methods": [ + { + "type": "default", + "script": "ct/apache-tika.sh", + "resources": { + "cpu": 1, + "ram": 2024, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/json/baikal.json b/json/baikal.json new file mode 100644 index 000000000..affafc669 --- /dev/null +++ b/json/baikal.json @@ -0,0 +1,34 @@ +{ + "name": "Baïkal", + "slug": "baikal", + "categories": [ + 0 + ], + "date_created": "2025-01-31", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": null, + "website": "https://sabre.io/baikal/", + "logo": "https://sabre.io/img/logo.png", + "description": "Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars.", + "install_methods": [ + { + "type": "default", + "script": "ct/baikal.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "Admin", + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/json/barcode-buddy.json b/json/barcode-buddy.json new file mode 100644 index 000000000..1f9a32478 --- /dev/null +++ b/json/barcode-buddy.json @@ -0,0 +1,39 @@ +{ + "name": "Barcode Buddy", + "slug": "barcode-buddy", + "categories": [ + 24 + ], + "date_created": "2025-02-08", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://barcodebuddy-documentation.readthedocs.io/en/latest/", + "website": "https://github.com/Forceu/barcodebuddy", + "logo": "https://raw.githubusercontent.com/Forceu/barcodebuddy/refs/heads/master/incl/img/favicon/android-icon-192x192.png", + "description": "Barcode Buddy for Grocy is an extension for Grocy, allowing to pass barcodes to Grocy. It supports barcodes for products and chores. If you own a physical barcode scanner, it can be integrated, so that all barcodes scanned are automatically pushed to BarcodeBuddy/Grocy.", + "install_methods": [ + { + "type": "default", + "script": "ct/barcode-buddy.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 3, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "After install enable the option \"Use Redis cache\" on the settings page.", + "type": "info" + } + ] +} diff --git a/json/boltdiy.json b/json/boltdiy.json new file mode 100644 index 000000000..6705cd9b4 --- /dev/null +++ b/json/boltdiy.json @@ -0,0 +1,34 @@ +{ + "name": "bolt.diy", + "slug": "boltdiy", + "categories": [ + 20 + ], + "date_created": "2025-02-23", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 5173, + "documentation": "https://stackblitz-labs.github.io/bolt.diy/", + "website": "https://github.com/stackblitz-labs/bolt.diy", + "logo": "https://github.com/stackblitz-labs/bolt.diy/raw/refs/heads/main/icons/logo-text.svg", + "description": "The official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK!", + "install_methods": [ + { + "type": "default", + "script": "ct/boltdiy.sh", + "resources": { + "cpu": 2, + "ram": 3072, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/bunkerweb.json b/json/bunkerweb.json index 26fccc94a..7df0caf66 100644 --- a/json/bunkerweb.json +++ b/json/bunkerweb.json @@ -11,7 +11,7 @@ "interface_port": null, "documentation": null, "website": "https://www.bunkerweb.io/", - "logo": "https://raw.githubusercontent.com/bunkerity/bunkerweb/v1.5.7/misc/logo.png", + "logo": "https://raw.githubusercontent.com/bunkerity/bunkerweb/master/misc/logo.png", "description": "BunkerWeb is a security-focused web server that enhances web application protection. It guards against common web vulnerabilities like SQL injection, XSS, and CSRF. It features simple setup and configuration using a YAML file, customizable security rules, and provides detailed logs for traffic monitoring and threat detection.", "install_methods": [ { @@ -19,7 +19,7 @@ "script": "ct/bunkerweb.sh", "resources": { "cpu": 2, - "ram": 1024, + "ram": 4096, "hdd": 4, "os": "debian", "version": "12" diff --git a/json/cosmos.json b/json/cosmos.json new file mode 100644 index 000000000..21ab85e01 --- /dev/null +++ b/json/cosmos.json @@ -0,0 +1,35 @@ +{ + "name": "Cosmos", + "slug": "cosmos", + "categories": [ + 2, + 3 + ], + "date_created": "2025-02-07", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://cosmos-cloud.io/doc/1%20index/", + "website": "https://cosmos-cloud.io/", + "logo": "https://cosmos-cloud.io/Logo.png", + "description": "Cosmos Cloud is a self-hosting platform that automates maintenance and security. It offers an app marketplace, reverse proxy management, container control, VPN integration, real-time monitoring, and disk management. Security features include SSO, anti-DDoS, and encryption. It simplifies self-hosting for all users.", + "install_methods": [ + { + "type": "default", + "script": "ct/cosmos.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/crafty-controller.json b/json/crafty-controller.json new file mode 100644 index 000000000..8605cbdef --- /dev/null +++ b/json/crafty-controller.json @@ -0,0 +1,39 @@ +{ + "name": "Crafty Controller", + "slug": "crafty-controller", + "categories": [ + 24 + ], + "date_created": "2025-02-01", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8443, + "documentation": "https://docs.craftycontrol.com/", + "website": "https://craftycontrol.com/", + "logo": "https://gitlab.com/crafty-controller/crafty-4/-/raw/master/app/frontend/static/assets/images/logo_long.svg", + "description": "Crafty Controller is a free and open-source Minecraft launcher and manager that allows users to start and administer Minecraft servers from a user-friendly interface. The interface is run as a self-hosted web server that is accessible to devices on the local network by default and can be port forwarded to provide external access outside of your local network. Crafty is designed to be easy to install and use, requiring only a bit of technical knowledge and a desire to learn to get started. Crafty Controller is still actively being developed by Arcadia Technology and we are continually making major improvements to the software.\n\nCrafty Controller is a feature rich panel that allows you to create and run servers, manage players, run commands, change server settings, view and edit server files, and make backups. With the help of Crafty Controller managing a large number of Minecraft servers on separate versions is easy and intuitive to do.", + "install_methods": [ + { + "type": "default", + "script": "ct/crafty-controller.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 16, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": null + }, + "notes": [ + { + "text": "Show password: `cat ~/crafty-controller.creds`", + "type": "info" + } + ] + } \ No newline at end of file diff --git a/json/cross-seed.json b/json/cross-seed.json new file mode 100644 index 000000000..a8a8a7cde --- /dev/null +++ b/json/cross-seed.json @@ -0,0 +1,39 @@ +{ + "name": "cross-seed", + "slug": "cross-seed", + "categories": [ + 14 + ], + "date_created": "2025-02-07", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 2468, + "documentation": "https://www.cross-seed.org/docs/category/basics", + "website": "https://www.cross-seed.org/", + "logo": "https://www.cross-seed.org/img/cross-seed.svg", + "description": "cross-seed is an app designed to help you download torrents that you can cross seed based on your existing torrents. It is designed to match conservatively to minimize manual intervention.", + "install_methods": [ + { + "type": "default", + "script": "ct/cross-seed.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 2, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "After the installation cross-seed will fail to start with an empty configuration. To fix this, edit `~/.cross-seed/config.js` to properly configure cross-seed, then restart by running `systemctl restart cross-seed`.", + "type": "info" + } + ] +} diff --git a/json/debian-vm.json b/json/debian-vm.json index 01b9052a3..116e28ad7 100644 --- a/json/debian-vm.json +++ b/json/debian-vm.json @@ -11,7 +11,7 @@ "interface_port": null, "documentation": null, "website": "https://www.debian.org/", - "logo": "https://seeklogo.com/images/D/debian-logo-C136FDAF9E-seeklogo.com.png", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/debian.svg", "description": "Debian Linux is a distribution that emphasizes free software. It supports many hardware platforms", "install_methods": [ { @@ -30,6 +30,11 @@ "username": null, "password": null }, - "notes": [], - "status": "✅" -} \ No newline at end of file + "notes": [ + { + "text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/836´", + "type": "info" + } + ], + "status": "✅" +} diff --git a/json/debian.json b/json/debian.json index 75cb722f6..c730241ef 100644 --- a/json/debian.json +++ b/json/debian.json @@ -11,7 +11,7 @@ "interface_port": null, "documentation": null, "website": "https://www.debian.org/", - "logo": "https://seeklogo.com/images/D/debian-logo-C136FDAF9E-seeklogo.com.png", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/debian.svg", "description": "Debian Linux is a distribution that emphasizes free software. It supports many hardware platforms.", "install_methods": [ { @@ -32,4 +32,4 @@ }, "notes": [], "status": "✅" -} \ No newline at end of file +} diff --git a/json/docmost.json b/json/docmost.json new file mode 100644 index 000000000..92a4c907a --- /dev/null +++ b/json/docmost.json @@ -0,0 +1,34 @@ +{ + "name": "Docmost", + "slug": "docmost", + "categories": [ + 12 + ], + "date_created": "2025-02-18", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://docmost.com/docs/installation", + "website": "https://docmost.com/", + "logo": "https://raw.githubusercontent.com/docmost/docmost/refs/heads/main/apps/client/public/favicon-32x32.png", + "description": "Open-source collaborative wiki and documentation software Create, collaborate, and share knowledge seamlessly with Docmost. Ideal for managing your wiki, knowledge-base, documentation and a lot more.", + "install_methods": [ + { + "type": "default", + "script": "ct/docmost.sh", + "resources": { + "cpu": 3, + "ram": 3072, + "hdd": 7, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/json/dolibarr.json b/json/dolibarr.json new file mode 100644 index 000000000..5396d95f8 --- /dev/null +++ b/json/dolibarr.json @@ -0,0 +1,39 @@ +{ + "name": "Dolibarr", + "slug": "dolibarr", + "categories": [ + 25 + ], + "date_created": "2025-02-20", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://wiki.dolibarr.org/index.php?title=Home", + "website": "https://www.dolibarr.org/", + "logo": "https://wiki.dolibarr.org/images/5/51/Dolibarr_124x124_white.svg", + "description": "Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.", + "install_methods": [ + { + "type": "default", + "script": "ct/dolibarr.sh", + "resources": { + "cpu": 1, + "ram": 2048, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Database credentials: `cat ~/dolibarr.creds`", + "type": "info" + } + ] + } diff --git a/json/duplicati.json b/json/duplicati.json new file mode 100644 index 000000000..57f3972da --- /dev/null +++ b/json/duplicati.json @@ -0,0 +1,39 @@ +{ + "name": "Duplicati", + "slug": "duplicati", + "categories": [ + 7 + ], + "date_created": "2025-02-06", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8200, + "documentation": "https://docs.duplicati.com/", + "website": "https://duplicati.com/", + "logo": "https://framerusercontent.com/images/LezF3gmqYkyAgrNprSShLYIsw.png", + "description": "Duplicati is a free, open-source backup solution that offers zero-trust, fully encrypted backups for your data.", + "install_methods": [ + { + "type": "default", + "script": "ct/duplicati.sh", + "resources": { + "cpu": 1, + "ram": 1048, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Admin password and database encryption key: `cat ~/duplicati.creds`", + "type": "info" + } + ] +} \ No newline at end of file diff --git a/json/elementsynapse.json b/json/elementsynapse.json new file mode 100644 index 000000000..1de1c0834 --- /dev/null +++ b/json/elementsynapse.json @@ -0,0 +1,34 @@ +{ + "name": "Element Synapse", + "slug": "elementsynapse", + "categories": [ + 4 + ], + "date_created": "2025-02-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8008, + "documentation": "https://element-hq.github.io/synapse/latest/welcome_and_overview.html", + "website": "https://element.io/", + "logo": "https://element.io/images/logo-mark-primary.svg", + "description": "Synapse is an open source Matrix homeserver implementation, written and maintained by Element. Matrix is the open standard for secure and interoperable real time communications. You can directly run and manage the source code in this repository, available under an AGPL license. There is no support provided from Element unless you have a subscription.", + "install_methods": [ + { + "type": "default", + "script": "ct/elementsynapse.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] + } \ No newline at end of file diff --git a/json/evcc.json b/json/evcc.json index 3ae4cd9c4..a3687c68b 100644 --- a/json/evcc.json +++ b/json/evcc.json @@ -32,9 +32,9 @@ }, "notes": [ { - "text": "entering `evcc configure` in the LXC terminal will guide you through the creation of a configuration file for evcc.", + "text": "To configure evcc, type `cd /etc` followed by `evcc configure` in the evcc LXC shell", "type": "info" } ], "status": "✅" -} \ No newline at end of file +} diff --git a/json/excalidraw.json b/json/excalidraw.json new file mode 100644 index 000000000..8768fade7 --- /dev/null +++ b/json/excalidraw.json @@ -0,0 +1,34 @@ +{ + "name": "Excalidraw", + "slug": "excalidraw", + "categories": [ + 12 + ], + "date_created": "2025-02-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://docs.excalidraw.com/docs", + "website": "https://excalidraw.com/", + "logo": "https://docs.excalidraw.com/img/logo.svg", + "description": "An open source virtual hand-drawn style whiteboard. Collaborative and end-to-end encrypted.", + "install_methods": [ + { + "type": "default", + "script": "ct/excalidraw.sh", + "resources": { + "cpu": 2, + "ram": 3072, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] + } diff --git a/json/firefly.json b/json/firefly.json index de83e530a..22b3e4ff8 100644 --- a/json/firefly.json +++ b/json/firefly.json @@ -21,7 +21,7 @@ "cpu": 1, "ram": 1024, "hdd": 2, - "os": "Debian", + "os": "debian", "version": "12" } } diff --git a/json/freshrss.json b/json/freshrss.json new file mode 100644 index 000000000..382f5c5cc --- /dev/null +++ b/json/freshrss.json @@ -0,0 +1,43 @@ +{ + "name": "FreshRSS", + "slug": "freshrss", + "categories": [ + 12 + ], + "date_created": "2025-02-10", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://freshrss.github.io/FreshRSS/en/", + "website": "https://freshrss.org/", + "logo": "https://freshrss.org/images/icon.svg", + "description": "FreshRSS is a self-hosted RSS and Atom feed aggregator that lets users collect, organize, and read from multiple sources in one place. It is lightweight, easy to work with, powerful, and customizable.", + "install_methods": [ + { + "type": "default", + "script": "ct/freshrss.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Database credentials: `cat ~/freshrss.creds`", + "type": "info" + }, + { + "text": "Per FreshRSS documentation, a cron job to actualize FreshRSS will be setup at `/etc/cron.d/freshrss-actualize`. This can be adjusted as needed", + "type": "info" + } + ] +} diff --git a/json/glance.json b/json/glance.json index 50921ef8d..ef6c54bf3 100644 --- a/json/glance.json +++ b/json/glance.json @@ -11,7 +11,7 @@ "interface_port": 8080, "documentation": "https://github.com/glanceapp/glance/blob/main/docs/configuration.md", "website": "https://github.com/glanceapp/glance", - "logo": "https://github.com/glanceapp/glance/blob/main/internal/assets/static/app-icon.png?raw=true", + "logo": "https://raw.githubusercontent.com/glanceapp/glance/refs/heads/main/internal/glance/static/app-icon.png", "description": "A self-hosted dashboard that puts all your feeds in one place", "install_methods": [ { diff --git a/json/graylog.json b/json/graylog.json new file mode 100644 index 000000000..66cb9c13d --- /dev/null +++ b/json/graylog.json @@ -0,0 +1,43 @@ +{ + "name": "Graylog", + "slug": "graylog", + "categories": [ + 9 + ], + "date_created": "2025-02-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9000, + "documentation": "https://go2docs.graylog.org/current/home.htm", + "website": "https://graylog.org/", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/graylog.svg", + "description": "Graylog is a free and open log management platform.", + "install_methods": [ + { + "type": "default", + "script": "ct/graylog.sh", + "resources": { + "cpu": 2, + "ram": 8192, + "hdd": 30, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Initial Setup credentials: `tail /var/log/graylog-server/server.log` after the server starts for the first time.", + "type": "info" + }, + { + "text": "Type `cat ~/graylog.creds` to get admin password that you use to log in AFTER the Initial Setup", + "type": "info" + } + ] +} diff --git a/json/grist.json b/json/grist.json index b78d01bb1..ba65318b5 100644 --- a/json/grist.json +++ b/json/grist.json @@ -18,9 +18,9 @@ "type": "default", "script": "ct/grist.sh", "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 4, + "cpu": 2, + "ram": 3072, + "hdd": 6, "os": "debian", "version": "12" } diff --git a/json/hev-socks5-server.json b/json/hev-socks5-server.json new file mode 100644 index 000000000..0be495b08 --- /dev/null +++ b/json/hev-socks5-server.json @@ -0,0 +1,43 @@ +{ + "name": "hev-socks5-server", + "slug": "hev-socks5-server", + "categories": [ + 4 + ], + "date_created": "2025-02-23", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 1080, + "documentation": null, + "website": "https://github.com/heiher/hev-socks5-server", + "logo": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/405px-Tux.svg.png", + "description": "HevSocks5Server is a simple, lightweight socks5 server.", + "install_methods": [ + { + "type": "default", + "script": "ct/hev-socks5-server.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Default credentials: `cat /root/hev.creds`", + "type": "info" + }, + { + "text": "Config stored at `/etc/hev-socks5-server/main.yml`", + "type": "info" + } + ] +} diff --git a/json/hoarder.json b/json/hoarder.json index 3f59a61c2..93547362f 100644 --- a/json/hoarder.json +++ b/json/hoarder.json @@ -20,7 +20,7 @@ "resources": { "cpu": 2, "ram": 4096, - "hdd": 8, + "hdd": 10, "os": "debian", "version": "12" } diff --git a/json/homarr.json b/json/homarr.json index 01964ddd7..4f37565b5 100644 --- a/json/homarr.json +++ b/json/homarr.json @@ -8,7 +8,7 @@ "type": "ct", "updateable": true, "privileged": false, - "interface_port": 3000, + "interface_port": 7575, "documentation": null, "website": "https://homarr.dev/", "logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/homarr.svg", diff --git a/json/homeassistant-core.json b/json/homeassistant-core.json index ae63974b3..345ab9cbe 100644 --- a/json/homeassistant-core.json +++ b/json/homeassistant-core.json @@ -12,7 +12,7 @@ "documentation": "https://www.home-assistant.io/docs/", "website": "https://www.home-assistant.io/", "logo": "https://avatars.githubusercontent.com/u/13844975?s=200&v=4", - "description": "A standalone installation of Home Assistant Core refers to a setup where the Home Assistant Core software is installed directly on a device or operating system, without the use of Docker containers. This provides a simpler, but less flexible and scalable solution, as the software is tightly coupled with the underlying system.\r\n\r\n🛈 If the LXC is created Privileged, the script will automatically set up USB passthrough.", + "description": "A standalone installation of Home Assistant Core refers to a setup where the Home Assistant Core software is installed directly on a device or operating system, without the use of Docker containers. This provides a simpler, but less flexible and scalable solution, as the software is tightly coupled with the underlying system.", "install_methods": [ { "type": "default", diff --git a/json/jenkins.json b/json/jenkins.json index b4101eea2..42448080b 100644 --- a/json/jenkins.json +++ b/json/jenkins.json @@ -14,17 +14,16 @@ "logo": "https://www.jenkins.io/images/logos/jenkins/jenkins.svg", "description": "Jenkins provides hundreds of plugins to support building, deploying and automating any project. ", "install_methods": [ - { - "type": "default", - "script": "ct/jenkins.sh", - "resources": { - "cpu": 2, - "ram": 1024, - "hdd": 4, - "os": "Debian", - "version": "12" - } - } + { + "type": "default", + "script": "ct/jenkins.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + }} ], "default_credentials": { "username": null, diff --git a/json/kimai.json b/json/kimai.json index f76dc381c..429687c7e 100644 --- a/json/kimai.json +++ b/json/kimai.json @@ -21,7 +21,7 @@ "cpu": 2, "ram": 2048, "hdd": 7, - "os": "Debian", + "os": "debian", "version": "12" } } diff --git a/json/koillection.json b/json/koillection.json new file mode 100644 index 000000000..55cec121a --- /dev/null +++ b/json/koillection.json @@ -0,0 +1,34 @@ +{ + "name": "Koillection", + "slug": "koillection", + "categories": [ + 24 + ], + "date_created": "2025-02-04", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://github.com/benjaminjonard/koillection/wiki", + "website": "https://koillection.github.io/", + "logo": "https://user-images.githubusercontent.com/20560781/80213166-0e560e00-8639-11ea-944e-4f79fdbcef55.png", + "description": "Koillection is a self-hosted collection manager created to keep track of physical (mostly) collections of any kind like books, DVDs, stamps, games... Koillection is meant to be used for any kind of collections and doesn't come with pre-built metadata download. But you can tailor your own HTML scraper, or you can add your own metadata freely.", + "install_methods": [ + { + "type": "default", + "script": "ct/koillection.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 8, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] + } \ No newline at end of file diff --git a/json/kometa.json b/json/kometa.json new file mode 100644 index 000000000..0a36b2b0b --- /dev/null +++ b/json/kometa.json @@ -0,0 +1,43 @@ +{ + "name": "Kometa", + "slug": "kometa", + "categories": [ + 13 + ], + "date_created": "2025-02-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://kometa.wiki/en/latest/", + "website": "https://github.com/Kometa-Team/Kometa", + "logo": "https://kometa.wiki/en/latest/assets/icon.png", + "description": "Kometa (formerly known as Plex Meta Manager) is a powerful tool designed to give you complete control over your media libraries", + "install_methods": [ + { + "type": "default", + "script": "ct/kometa.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "During installation you will be prompted to input your TMDb key, Plex URL and Plex token. Make sure you have them ready.", + "type": "info" + }, + { + "text": "Configuration file is at `/opt/kometa/config/config.yml`", + "type": "info" + } + ] + } diff --git a/json/komodo.json b/json/komodo.json index a87d3a3a5..81a8d620d 100644 --- a/json/komodo.json +++ b/json/komodo.json @@ -11,7 +11,7 @@ "interface_port": 9120, "documentation": "https://komo.do/docs/intro", "website": "https://komo.do", - "logo": "https://komo.do/img/logo512.png", + "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/komodo.svg", "description": "Komodo is a build and deployment system that automates the creation of versioned Docker images from Git repositories and facilitates the deployment of Docker containers and Docker Compose setups. It provides features such as build automation triggered by Git pushes, deployment management, and monitoring of uptime and logs across multiple servers. The core API and associated agent are developed in Rust.", "install_methods": [ { @@ -21,7 +21,7 @@ "cpu": 2, "ram": 2048, "hdd": 10, - "os": "Debian", + "os": "debian", "version": "12" } } @@ -37,4 +37,4 @@ } ], "status": "🚧" -} \ No newline at end of file +} diff --git a/json/mattermost.json b/json/mattermost.json new file mode 100644 index 000000000..b4b279452 --- /dev/null +++ b/json/mattermost.json @@ -0,0 +1,34 @@ +{ + "name": "Mattermost", + "slug": "mattermost", + "categories": [ + 25 + ], + "date_created": "2025-01-30", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 8065, + "documentation": null, + "website": "https://mattermost.com/", + "logo": "https://avatars.githubusercontent.com/u/9828093?s=200&v=4", + "description": "Mattermost is an open source platform for secure collaboration across the entire software development lifecycle. It's written in Go and React and runs as a single Linux binary with MySQL or PostgreSQL. It has a slimilar interface and features to Slack or Discord.", + "install_methods": [ + { + "type": "default", + "script": "ct/mattermost.sh", + "resources": { + "cpu": 1, + "ram": 2048, + "hdd": 8, + "os": "ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/minio.json b/json/minio.json new file mode 100644 index 000000000..5d307bb32 --- /dev/null +++ b/json/minio.json @@ -0,0 +1,39 @@ +{ + "name": "MinIO", + "slug": "minio", + "categories": [ + 8 + ], + "date_created": "2025-02-13", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9000, + "documentation": "https://min.io/docs/minio/linux/index.html", + "website": "https://min.io/", + "logo": "https://raw.githubusercontent.com/minio/minio/refs/heads/master/.github/logo.svg", + "description": "MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.", + "install_methods": [ + { + "type": "default", + "script": "ct/minio.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 5, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "minioadmin", + "password": null + }, + "notes": [ + { + "text": "Application credentials: `cat ~/minio.creds`", + "type": "info" + } + ] +} diff --git a/json/nextpvr.json b/json/nextpvr.json index 60680701e..9df15532f 100644 --- a/json/nextpvr.json +++ b/json/nextpvr.json @@ -21,7 +21,7 @@ "cpu": 1, "ram": 1024, "hdd": 5, - "os": "Debian", + "os": "debian", "version": "12" } } diff --git a/json/nxwitness.json b/json/nxwitness.json new file mode 100644 index 000000000..b9b587f29 --- /dev/null +++ b/json/nxwitness.json @@ -0,0 +1,34 @@ +{ + "name": "Nx Witness", + "slug": "nxwitness", + "categories": [ + 15 + ], + "date_created": "2025-02-13", + "type": "ct", + "updateable": true, + "privileged": true, + "interface_port": 7001, + "documentation": "https://support.networkoptix.com/hc/en-us/articles/360006863413-Access-the-Nx-Witness-User-Manual", + "website": "https://www.networkoptix.com/nx-witness", + "logo": "https://www.networkoptix.com/hs-fs/hubfs/raw_assets/public/NetworkOptix-NB/images/logo.png?width=300&height=75&name=logo.png", + "description": "Nx Witness is a professional video management system (VMS) designed for IP cameras and surveillance systems. It provides real-time video streaming, recording, and remote access with an intuitive user interface. The software supports AI-based video analytics, integrates with third-party security systems, and offers advanced search and event management features. It is used for security monitoring, business intelligence, and large-scale surveillance deployments.", + "install_methods": [ + { + "type": "default", + "script": "ct/nxwitness.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/onedev.json b/json/onedev.json index a7ae2134f..b0e3883bf 100644 --- a/json/onedev.json +++ b/json/onedev.json @@ -14,17 +14,16 @@ "logo": "https://docs.onedev.io/img/logo.svg", "description": "Git server with CI/CD, kanban, and packages.", "install_methods": [ - { - "type": "default", - "script": "ct/onedev.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 4, - "os": "Debian", - "version": "12" - } - } + { + "type": "default", + "script": "ct/onedev.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 4, + "os": "debian", + "version": "12" + }} ], "default_credentials": { "username": null, diff --git a/json/opnsense-vm.json b/json/opnsense-vm.json new file mode 100644 index 000000000..e2c92b52e --- /dev/null +++ b/json/opnsense-vm.json @@ -0,0 +1,39 @@ +{ + "name": "OPNsense", + "slug": "opnsense-vm", + "categories": [ + 4 + ], + "date_created": "2025-02-11", + "type": "vm", + "updateable": false, + "privileged": false, + "interface_port": 443, + "documentation": "https://docs.opnsense.org/", + "website": "https://opnsense.org/", + "logo": "https://raw.githubusercontent.com/opnsense/core/master/src/opnsense/scripts/OPNsense/CaptivePortal/htdocs_default/images/default-logo.png", + "description": "OPNsense is an open-source firewall and routing platform based on FreeBSD. It provides advanced security features, including intrusion detection, VPN support, traffic shaping, and web filtering, with an intuitive web interface for easy management. Known for its reliability and regular updates, OPNsense is a popular choice for both businesses and home networks.", + "install_methods": [ + { + "type": "default", + "script": "vm/opnsense-vm.sh", + "resources": { + "cpu": 4, + "ram": 8192, + "hdd": 10, + "os": "FreeBSD", + "version": "latest" + } + } + ], + "default_credentials": { + "username": "root", + "password": "opnsense" + }, + "notes": [ + { + "text": "It will fail with default settings if there is no vmbr0 and vmbr1 on your node. Use advanced settings in this case.", + "type": "warning" + } + ] +} diff --git a/json/paperless-ai.json b/json/paperless-ai.json new file mode 100644 index 000000000..16a0fb8a2 --- /dev/null +++ b/json/paperless-ai.json @@ -0,0 +1,34 @@ +{ + "name": "PaperlessAI", + "slug": "paperless-ai", + "categories": [ + 20 + ], + "date_created": "2025-02-06", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": null, + "website": "https://github.com/clusterzx/paperless-ai", + "logo": "https://raw.githubusercontent.com/clusterzx/paperless-ai/refs/heads/main/icon.png", + "description": "An automated document analyzer for Paperless-ngx using OpenAI API, Ollama and all OpenAI API compatible Services to automatically analyze and tag your documents.It features: Automode, Manual Mode, Ollama and OpenAI, a Chat function to query your documents with AI, a modern and intuitive Webinterface.", + "install_methods": [ + { + "type": "default", + "script": "ct/paperless-ai.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 5, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/paperless-ngx.json b/json/paperless-ngx.json index bcd658895..c4e6e9bdd 100644 --- a/json/paperless-ngx.json +++ b/json/paperless-ngx.json @@ -6,7 +6,7 @@ ], "date_created": "2024-05-02", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": 8000, "documentation": null, diff --git a/json/paymenter.json b/json/paymenter.json new file mode 100644 index 000000000..fc23da1a5 --- /dev/null +++ b/json/paymenter.json @@ -0,0 +1,34 @@ +{ + "name": "Paymenter", + "slug": "paymenter", + "categories": [ + 21 + ], + "date_created": "2025-01-28", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://paymenter.org/docs", + "website": "https://paymenter.org/", + "logo": "https://avatars.githubusercontent.com/u/115177786?s=200&v=4", + "description": "Paymenter is an open source webshop solution for hosting companies. It's developed to provide an more easy way to manage your hosting company.", + "install_methods": [ + { + "type": "default", + "script": "ct/paymenter.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 5, + "os":"Debian", + "version":"12" + } + } + ], + "default_credentials": { + "username": "admin@paymenter.org", + "password": "paymenter" + }, + "notes": [] +} diff --git a/json/pbs-microcode.json b/json/pbs-microcode.json new file mode 100644 index 000000000..1541a82a8 --- /dev/null +++ b/json/pbs-microcode.json @@ -0,0 +1,43 @@ +{ + "name": "Proxmox Backup Server Processor Microcode", + "slug": "pbs-microcode", + "categories": [ + 1 + ], + "date_created": "2025-02-07", + "type": "misc", + "updateable": false, + "privileged": false, + "interface_port": null, + "documentation": null, + "website": null, + "logo": "https://github.com/community-scripts/ProxmoxVE/blob/main/misc/images/processor.png?raw=true", + "description": "Processor Microcode is a layer of low-level software that runs on the processor and provides patches or updates to its firmware. Microcode updates can fix hardware bugs, improve performance, and enhance security features of the processor. This script is adapted for the Proxmox Backup Server environment and will only run on bare metal systems. If running in a virtualized environment, the script will exit. Note that firmware update mechanisms, such as Intel's Management Engine (ME) or AMD's Platform Security Processor (PSP), may vary depending on your processor and its implementation. Please consult your processor's documentation to verify if firmware updates can be applied through the operating system.", + "install_methods": [ + { + "type": "default", + "script": "misc/pbs_microcode.sh", + "resources": { + "cpu": null, + "ram": null, + "hdd": null, + "os": null, + "version": null + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Execute within the Proxmox Backup Server shell on a bare metal system. The script will exit if it detects that it is running in a virtualized environment.", + "type": "info" + }, + { + "text": "After a reboot, you can check whether any microcode updates are currently in effect by running the following command: `journalctl -k | grep -E \"microcode\" | head -n 1`", + "type": "info" + } + ] +} diff --git a/json/peanut.json b/json/peanut.json index cf9750cc6..4972043d0 100644 --- a/json/peanut.json +++ b/json/peanut.json @@ -19,8 +19,8 @@ "script": "ct/peanut.sh", "resources": { "cpu": 2, - "ram": 2048, - "hdd": 4, + "ram": 3072, + "hdd": 7, "os": "debian", "version": "12" } diff --git a/json/pf2etools.json b/json/pf2etools.json index a9e4473c9..37f204f58 100644 --- a/json/pf2etools.json +++ b/json/pf2etools.json @@ -4,7 +4,7 @@ "categories": [ 24 ], - "date_created": "2025-01-02", + "date_created": "2025-02-13", "type": "ct", "updateable": true, "privileged": false, diff --git a/json/pocketid.json b/json/pocketid.json index 70315ece5..58fd59067 100644 --- a/json/pocketid.json +++ b/json/pocketid.json @@ -11,7 +11,7 @@ "interface_port": 80, "documentation": "https://stonith404.github.io/pocket-id/introduction", "website": "https://github.com/stonith404/pocket-id", - "logo": "https://raw.githubusercontent.com/stonith404/pocket-id/refs/heads/main/docs/static/img/pocket-id.png", + "logo": "https://raw.githubusercontent.com/pocket-id/pocket-id/refs/heads/main/backend/resources/images/logoDark.svg", "description": "Pocket ID is a simple OIDC provider that allows users to authenticate with their passkeys to your services.", "install_methods": [ { diff --git a/json/podman-homeassistant.json b/json/podman-homeassistant.json index 65817a45f..51f7c222e 100644 --- a/json/podman-homeassistant.json +++ b/json/podman-homeassistant.json @@ -31,10 +31,6 @@ "password": null }, "notes": [ - { - "text": "Doesn't work with ZFS", - "type": "warning" - }, { "text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.", "type": "warning" @@ -42,6 +38,10 @@ { "text": "config path: `/var/lib/containers/storage/volumes/hass_config/_data`", "type": "info" + }, + { + "text": "Options to Install Portainer or Portainer Agent", + "type": "warning" } ], "status": "✅" diff --git a/json/podman.json b/json/podman.json index 74141f2c2..4ff4dd07b 100644 --- a/json/podman.json +++ b/json/podman.json @@ -32,7 +32,7 @@ }, "notes": [ { - "text": "Doesn't work with ZFS", + "text": "Options to Install Portainer or Portainer Agent", "type": "warning" } ], diff --git a/json/privatebin.json b/json/privatebin.json new file mode 100644 index 000000000..922891199 --- /dev/null +++ b/json/privatebin.json @@ -0,0 +1,34 @@ +{ + "name": "PrivateBin", + "slug": "privatebin", + "categories": [ + 12 + ], + "date_created": "2025-01-29", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://github.com/PrivateBin/PrivateBin/wiki", + "website": "https://github.com/PrivateBin/PrivateBin", + "logo": "https://raw.githubusercontent.com/PrivateBin/PrivateBin/refs/heads/master/img/icon.svg", + "description": "PrivateBin is a minimalist, open-source pastebin where the server has zero knowledge of pasted data. Data is encrypted/decrypted in the browser using 256-bit AES.", + "install_methods": [ + { + "type": "default", + "script": "ct/privatebin.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/prometheus-paperless-ngx-exporter.json b/json/prometheus-paperless-ngx-exporter.json new file mode 100644 index 000000000..36d06cd4c --- /dev/null +++ b/json/prometheus-paperless-ngx-exporter.json @@ -0,0 +1,43 @@ +{ + "name": "Prometheus Paperless NGX Exporter", + "slug": "prometheus-paperless-ngx-exporter", + "categories": [ + 9 + ], + "date_created": "2025-02-07", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": null, + "website": "https://github.com/hansmi/prometheus-paperless-exporter", + "logo": "https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/resources/logo/web/svg/square.svg", + "description": "Prometheus metrics exporter for Paperless-NGX, a document management system transforming physical documents into a searchable online archive. The exporter relies on Paperless' REST API.", + "install_methods": [ + { + "type": "default", + "script": "ct/prometheus-paperless-ngx-exporter.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 2, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Please adjust the Paperless URL in the systemd unit file: /etc/systemd/system/prometheus-paperless-ngx-exporter.service", + "type": "info" + }, + { + "text": "Please adjust the Paperless authentication token in the configuration file: /etc/prometheus-paperless-ngx-exporter/paperless_auth_token_file", + "type": "info" + } + ] +} diff --git a/json/prometheus-pve-exporter.json b/json/prometheus-pve-exporter.json index 021eb3637..fd477be0f 100644 --- a/json/prometheus-pve-exporter.json +++ b/json/prometheus-pve-exporter.json @@ -1,6 +1,6 @@ { "name": "Prometheus Proxmox VE Exporter", - "slug": "prometheus-proxmox-ve-exporter", + "slug": "prometheus-pve-exporter", "categories": [ 1, 9 diff --git a/json/pbs.json b/json/proxmox-backup-server.json similarity index 86% rename from json/pbs.json rename to json/proxmox-backup-server.json index 8039ad527..75e97e8ca 100644 --- a/json/pbs.json +++ b/json/proxmox-backup-server.json @@ -1,12 +1,12 @@ { "name": "Proxmox Backup Server", - "slug": "pbs", + "slug": "proxmox-backup-server", "categories": [ 1 ], "date_created": "2024-05-02", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": 8007, "documentation": "https://pbs.proxmox.com/docs/", @@ -16,7 +16,7 @@ "install_methods": [ { "type": "default", - "script": "ct/pbs.sh", + "script": "ct/proxmox-backup-server.sh", "resources": { "cpu": 2, "ram": 2048, @@ -27,12 +27,12 @@ } ], "default_credentials": { - "username": null, + "username": "root", "password": null }, "notes": [ { - "text": "Set a root password if using autologin. This will be the PBS password. `sudo passwd root`", + "text": "Set a root password if using autologin. This will be the PBS password. `passwd root`", "type": "warning" } ], diff --git a/json/proxmox-datacenter-manager.json b/json/proxmox-datacenter-manager.json index a97c4760f..28da38d34 100644 --- a/json/proxmox-datacenter-manager.json +++ b/json/proxmox-datacenter-manager.json @@ -14,17 +14,17 @@ "logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png", "description": "The Proxmox Datacenter Manager project has been developed with the objective of providing a centralized overview of all your individual nodes and clusters. It also enables basic management like migrations of virtual guests without any cluster network requirements. ", "install_methods": [ - { - "type": "default", - "script": "ct/proxmox-datacenter-manager.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 10, - "os": "Debian", - "version": "12" - } + { + "type": "default", + "script": "ct/proxmox-datacenter-manager.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "debian", + "version": "12" } + } ], "default_credentials": { "username": null, diff --git a/json/proxmox-mail-gateway.json b/json/proxmox-mail-gateway.json new file mode 100644 index 000000000..3028dbd20 --- /dev/null +++ b/json/proxmox-mail-gateway.json @@ -0,0 +1,39 @@ +{ + "name": "Promox Mail Gateway", + "slug": "proxmox-mail-gateway", + "categories": [ + 1 + ], + "date_created": "2025-02-04", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8006, + "documentation": "https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html", + "website": "https://www.proxmox.com/en/products/proxmox-mail-gateway/overview", + "logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png", + "description": "Proxmox Mail Gateway is the leading open-source email security solution helping you to protect your mail server against all email threats from the moment they emerge.", + "install_methods": [ + { + "type": "default", + "script": "ct/proxmox-mail-gateway.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "root", + "password": null + }, + "notes": [ + { + "text": "Set a root password if using autologin. This will be the PMG password. `passwd root`", + "type": "warning" + } + ] +} diff --git a/json/radicale.json b/json/radicale.json new file mode 100644 index 000000000..eb8596018 --- /dev/null +++ b/json/radicale.json @@ -0,0 +1,43 @@ +{ + "name": "Radicale", + "slug": "radicale", + "categories": [ + 6 + ], + "date_created": "2025-02-02", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 5232, + "documentation": "https://radicale.org/master.html#documentation-1", + "website": "https://radicale.org/", + "logo": "https://radicale.org/assets/logo.svg", + "description": "Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts)", + "install_methods": [ + { + "type": "default", + "script": "ct/radicale.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "To view the user credentials : `cat radicale.creds`", + "type": "info" + }, + { + "text": "This application requires additional configuration. Please refer to https://github.com/community-scripts/ProxmoxVE/discussions/2073.", + "type": "info" + } + ] + } \ No newline at end of file diff --git a/json/rustdeskserver.json b/json/rustdeskserver.json new file mode 100644 index 000000000..7536a6a31 --- /dev/null +++ b/json/rustdeskserver.json @@ -0,0 +1,39 @@ +{ + "name": "RustDesk Server", + "slug": "rustdeskserver", + "categories": [ + 21 + ], + "date_created": "2025-02-13", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://rustdesk.com/docs/en/", + "website": "https://rustdesk.com/", + "logo": "https://rustdesk.com/_astro/logo.BKb61-he.svg", + "description": "RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration.", + "install_methods": [ + { + "type": "default", + "script": "ct/rustdeskserver.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Check our configuration guide for help: `https://github.com/community-scripts/ProxmoxVE/discussions/2388`", + "type": "info" + } + ] +} diff --git a/json/searxng.json b/json/searxng.json new file mode 100644 index 000000000..62f5f2ca5 --- /dev/null +++ b/json/searxng.json @@ -0,0 +1,34 @@ +{ + "name": "SearXNG", + "slug": "searxng", + "categories": [ + 0 + ], + "date_created": "2025-02-07", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8888, + "documentation": "https://docs.searxng.org/", + "website": "https://github.com/searxng/searxng", + "logo": "https://raw.githubusercontent.com/searxng/searxng/master/src/brand/searxng-wordmark.svg", + "description": "SearXNG is a free internet metasearch engine which aggregates results from up to 215 search services. Users are neither tracked nor profiled. Additionally, SearXNG can be used over Tor for online anonymity.", + "install_methods": [ + { + "type": "default", + "script": "ct/searxng.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 7, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/json/seelf.json b/json/seelf.json new file mode 100644 index 000000000..2ceb461df --- /dev/null +++ b/json/seelf.json @@ -0,0 +1,39 @@ +{ + "name": "seelf", + "slug": "seelf", + "categories": [ + 4 + ], + "date_created": "2025-02-04", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://yuukanoo.github.io/seelf/guide/quickstart.html", + "website": "https://yuukanoo.github.io/seelf/", + "logo": "https://yuukanoo.github.io/seelf/logo-dark.svg", + "description": "seelf is a self-hosted software which makes it easy to deploy your own applications on your own hardware using an easy to use interface.", + "install_methods": [ + { + "type": "default", + "script": "ct/seelf.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Initial admin email and password: `cat ~/seelf.creds`", + "type": "info" + } + ] +} \ No newline at end of file diff --git a/json/semaphore.json b/json/semaphore.json index a4056986e..7c9e0854f 100644 --- a/json/semaphore.json +++ b/json/semaphore.json @@ -21,7 +21,7 @@ "cpu": 2, "ram": 2048, "hdd": 4, - "os": "Debian", + "os": "debian", "version": "12" } } diff --git a/json/stirling-pdf.json b/json/stirling-pdf.json index 4fddbb783..b71a03fb6 100644 --- a/json/stirling-pdf.json +++ b/json/stirling-pdf.json @@ -11,7 +11,7 @@ "interface_port": 8080, "documentation": null, "website": "https://github.com/Stirling-Tools/Stirling-PDF", - "logo": "https://raw.githubusercontent.com/Stirling-Tools/Stirling-PDF/main/docs/stirling-pdf.png", + "logo": "https://raw.githubusercontent.com/Stirling-Tools/Stirling-PDF/refs/heads/main/docs/stirling.svg", "description": "Stirling-PDF is a powerful locally hosted web based PDF manipulation tool that allows you to perform various operations on PDF files, such as splitting merging, converting, reorganizing, adding images, rotating, compressing, and more.", "install_methods": [ { diff --git a/json/suwayomi-server.json b/json/suwayomi-server.json new file mode 100644 index 000000000..b28a99132 --- /dev/null +++ b/json/suwayomi-server.json @@ -0,0 +1,39 @@ +{ + "name": "Suwayomi-Server", + "slug": "suwayomi-server", + "categories": [ + 13 + ], + "date_created": "2025-02-07", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 4567, + "documentation": "https://github.com/Suwayomi/Suwayomi-Server/wiki", + "website": "https://github.com/Suwayomi/Suwayomi-Server", + "logo": "https://github.com/Suwayomi/Suwayomi-Server/raw/master/server/src/main/resources/icon/faviconlogo.png", + "description": "A free and open source manga reader server that runs extensions built for Mihon (Tachiyomi).", + "install_methods": [ + { + "type": "default", + "script": "ct/suwayomiserver.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "This application is conflicting with Kaspersky products. You need to disable Kaspersky in order to use this application.", + "type": "info" + } + ] +} \ No newline at end of file diff --git a/json/tasmocompiler.json b/json/tasmocompiler.json new file mode 100644 index 000000000..be7400407 --- /dev/null +++ b/json/tasmocompiler.json @@ -0,0 +1,34 @@ +{ + "name": "TasmoCompiler", + "slug": "tasmocompiler", + "categories": [ + 16 + ], + "date_created": "2025-02-10", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://github.com/benzino77/tasmocompiler/blob/master/README.md", + "website": "https://github.com/benzino77/tasmocompiler", + "logo": "https://github.com/benzino77/tasmocompiler/raw/master/docs/logo/tasmocompiler-symbol.svg", + "description": "TasmoCompiler is a simple web GUI which allows you to compile fantastic Tasmota firmware with your own settings.", + "install_methods": [ + { + "type": "default", + "script": "ct/tasmocompiler.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/json/ubuntu2204-vm.json b/json/ubuntu2204-vm.json index 401881c76..7f6b1ab24 100644 --- a/json/ubuntu2204-vm.json +++ b/json/ubuntu2204-vm.json @@ -30,6 +30,11 @@ "username": null, "password": null }, - "notes": [], - "status": "🧪" + "notes": [ + { + "text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´", + "type": "info" + } + ], + "status": "🧪" } diff --git a/json/ubuntu2404-vm.json b/json/ubuntu2404-vm.json index e6c967dd1..6f4bef622 100644 --- a/json/ubuntu2404-vm.json +++ b/json/ubuntu2404-vm.json @@ -30,6 +30,11 @@ "username": null, "password": null }, - "notes": [], - "status": "🧪" + "notes": [ + { + "text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´", + "type": "info" + } + ], + "status": "🧪" } diff --git a/json/ubuntu2410-vm.json b/json/ubuntu2410-vm.json index 780ad2c50..e0f203ac0 100644 --- a/json/ubuntu2410-vm.json +++ b/json/ubuntu2410-vm.json @@ -30,6 +30,11 @@ "username": null, "password": null }, - "notes": [], - "status": "🚧" + "notes": [ + { + "text": "after installation, checkout: ´https://github.com/community-scripts/ProxmoxVE/discussions/272´", + "type": "info" + } + ], + "status": "🧪" } diff --git a/json/wallos.json b/json/wallos.json index 83fdd8d37..0ff7ac1c3 100644 --- a/json/wallos.json +++ b/json/wallos.json @@ -1,34 +1,34 @@ { - "name": "Wallos", - "slug": "wallos", - "categories": [ - 0 - ], - "date_created": "2024-10-24", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 80, - "documentation": "https://github.com/ellite/wallos", - "website": "https://wallosapp.com/", - "logo": "https://raw.githubusercontent.com/ellite/Wallos/refs/heads/main/images/icon/android-chrome-192x192.png", - "description": "Wallos is a personal finance and budgeting tool that provides an intuitive interface for tracking expenses, managing subscriptions, and monitoring financial health. It features APIs for categories, notifications, payments, and user settings, making it suitable for automation and custom integrations. Additionally, it supports multi-language functionality.", - "install_methods": [ - { - "type": "default", - "script": "ct/wallos.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 5, - "os": "Debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] + "name": "Wallos", + "slug": "wallos", + "categories": [ + 23 + ], + "date_created": "2024-10-24", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://github.com/ellite/wallos", + "website": "https://wallosapp.com/", + "logo": "https://raw.githubusercontent.com/ellite/Wallos/refs/heads/main/images/icon/android-chrome-192x192.png", + "description": "Wallos is a personal finance and budgeting tool that provides an intuitive interface for tracking expenses, managing subscriptions, and monitoring financial health. It features APIs for categories, notifications, payments, and user settings, making it suitable for automation and custom integrations. Additionally, it supports multi-language functionality.", + "install_methods": [ + { + "type": "default", + "script": "ct/wallos.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 5, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] } diff --git a/json/watcharr.json b/json/watcharr.json new file mode 100644 index 000000000..e2f3476f6 --- /dev/null +++ b/json/watcharr.json @@ -0,0 +1,34 @@ +{ + "name": "Watcharr", + "slug": "watcharr", + "categories": [ + 13 + ], + "date_created": "2025-02-12", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3080, + "documentation": "https://watcharr.app/docs/introduction", + "website": "https://watcharr.app/", + "logo": "https://watcharr.app/img/favicon.png", + "description": "Open source, self-hostable watched list for all your content with user authentication, modern and clean UI and a very simple setup.", + "install_methods": [ + { + "type": "default", + "script": "ct/watcharr.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/json/wikijs.json b/json/wikijs.json index 6bad2d320..5ea462345 100644 --- a/json/wikijs.json +++ b/json/wikijs.json @@ -18,9 +18,9 @@ "type": "default", "script": "ct/wikijs.sh", "resources": { - "cpu": 1, - "ram": 512, - "hdd": 3, + "cpu": 2, + "ram": 2048, + "hdd": 7, "os": "debian", "version": "12" } @@ -32,4 +32,4 @@ }, "notes": [], "status": "✅" -} \ No newline at end of file +} diff --git a/json/zerotier-one.json b/json/zerotier-one.json new file mode 100644 index 000000000..02d79f626 --- /dev/null +++ b/json/zerotier-one.json @@ -0,0 +1,34 @@ +{ + "name": "Zerotier-One", + "slug": "zerotier-one", + "categories": [ + 4 + ], + "date_created": "2024-05-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3443, + "documentation": "https://docs.zerotier.com/", + "website": "https://www.zerotier.com/", + "logo": "https://www.zerotier.com/wp-content/uploads/2025/01/Logo-White.svg", + "description": "ZeroTier is a secure network overlay that allows you to manage all of your network resources as if they were on the same LAN. The software-defined solution can be deployed in minutes from anywhere. No matter how many devices you need to connect, or where they are in the world, ZeroTier makes global networking simple.", + "install_methods": [ + { + "type": "default", + "script": "ct/zerotier-one.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "password" + }, + "notes": [] +} diff --git a/json/zitadel.json b/json/zitadel.json new file mode 100644 index 000000000..8a147db3b --- /dev/null +++ b/json/zitadel.json @@ -0,0 +1,43 @@ +{ + "name": "Zitadel", + "slug": "Zitadel", + "categories": [ + 6 + ], + "date_created": "2025-02-10", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://zitadel.com/docs/guides/overview", + "website": "https://zitadel.com", + "logo": "https://raw.githubusercontent.com/zitadel/zitadel/refs/heads/main/console/src/assets/icons/android-chrome-512x512.png", + "description": "Zitadel is an open-source identity and access management (IAM) solution designed to provide secure authentication, authorization, and user management for modern applications and services. Built with a focus on flexibility, scalability, and security, Zitadel offers a comprehensive set of features for developers and organizations looking to implement robust identity management.", + "install_methods": [ + { + "type": "default", + "script": "ct/zitadel.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "zitadel-admin@zitadel.localhost", + "password": "Password1!" + }, + "notes": [ + { + "text": "Application credentials: `cat ~/zitadel.creds`", + "type": "info" + }, + { + "text": "Change the ExternalDomain value in `/opt/zitadel/config.yaml` to your domain/hostname/IP and run `bash zitadel-rerun.sh`", + "type": "info" + } + ] +} diff --git a/json/zoraxy.json b/json/zoraxy.json index 32fa62742..4c9fc2650 100644 --- a/json/zoraxy.json +++ b/json/zoraxy.json @@ -6,7 +6,7 @@ ], "date_created": "2024-05-02", "type": "ct", - "updateable": false, + "updateable": true, "privileged": false, "interface_port": 8000, "documentation": null, diff --git a/misc/add-lxc-iptag.sh b/misc/add-lxc-iptag.sh index 7ef23341f..e838f1df8 100644 --- a/misc/add-lxc-iptag.sh +++ b/misc/add-lxc-iptag.sh @@ -102,7 +102,7 @@ while true; do esac done -if ! pveversion | grep -Eq "pve-manager/8.[0-3]"; then +if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0 or later." msg_error "Exiting..." diff --git a/misc/api.func b/misc/api.func new file mode 100644 index 000000000..00748d58b --- /dev/null +++ b/misc/api.func @@ -0,0 +1,123 @@ +# Copyright (c) 2021-2025 community-scripts ORG +# Author: michelroegl-brunner +# License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE + +post_to_api() { + + if ! command -v curl &> /dev/null; then + return + fi + + if [ "$DIAGNOSTICS" = "no" ]; then + return + fi + + if [ -z "$RANDOM_UUID" ]; then + return + fi + + local API_URL="http://api.community-scripts.org/upload" + local pve_version="not found" + pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') + + JSON_PAYLOAD=$(cat < /dev/null; then + return + fi + + if [ "$POST_UPDATE_DONE" = true ]; then + return 0 + fi + local API_URL="http://api.community-scripts.org/upload/updatestatus" + local status="${1:-failed}" + local error="${2:-No error message}" + + JSON_PAYLOAD=$(cat < /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + post_update_to_api "failed" "${command}" echo -e "\n$error_message\n" } @@ -138,7 +143,7 @@ root_check() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -789,42 +794,6 @@ advanced_settings() { fi } -post_to_api() { - local API_URL="http://api.community-scripts.org/upload" - local pve_version="not found" - pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') - - JSON_PAYLOAD=$( - cat < " prompt + echo -ne "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " + read -r prompt # Check if the input is 'yes', otherwise exit with status 1 if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" @@ -1010,7 +975,8 @@ check_container_storage() { if (( usage > 80 )); then # Prompt the user for confirmation to continue echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" - read -r -p "Continue anyway? " prompt + echo -ne "Continue anyway? " + read -r prompt # Check if the input is 'y' or 'yes', otherwise exit with status 1 if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" @@ -1067,6 +1033,7 @@ build_container() { else export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/install.func)" fi + export RANDOM_UUID="$RANDOM_UUID" export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" export tz="$timezone" @@ -1096,7 +1063,7 @@ build_container() { $PW " # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/ct/create_lxc.sh)" || exit + bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/ct/create_lxc.sh)" || exit $? LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -1158,7 +1125,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/install/$var_install.sh)" || exit + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/install/$var_install.sh)" || exit $? } @@ -1204,4 +1171,36 @@ EOF if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi + + post_update_to_api "done" "none" } + + +exit_script() { + exit_code=$? # Capture the exit status of the last executed command + #200 exit codes indicate error in create_lxc.sh + #100 exit codes indicate error in install.func + +if [ $exit_code -ne 0 ]; then # Check if exit code is nonzero + case $exit_code in + 200) post_update_to_api "failed" "create_lxc.sh: Error during LXC creation" ;; + 201) post_update_to_api "failed" "create_lxc.sh Invalid Storage class" ;; + 202) post_update_to_api "failed" "create_lxc.sh Invalid Menu aborted" ;; + 203) post_update_to_api "failed" "create_lxc.sh CTID was unset" ;; + 204) post_update_to_api "failed" "create_lxc.sh PCT_OSTYPE was unset" ;; + 205) post_update_to_api "failed" "create_lxc.sh ID cannot be less than 100" ;; + 206) post_update_to_api "failed" "create_lxc.sh ID already in use" ;; + 207) post_update_to_api "failed" "create_lxc.sh Template not found" ;; + 208) post_update_to_api "failed" "create_lxc.sh Error downloading template" ;; + 101) post_update_to_api "failed" "create_lxc.sh No Network connection" ;; + *) post_update_to_api "failed" "Unknown error, exit code: $exit_code" ;; + esac +fi +} + + +trap 'exit_script' EXIT +trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM + diff --git a/misc/clean-orphaned-lvm.sh b/misc/clean-orphaned-lvm.sh index d8ad78207..533ef50ec 100644 --- a/misc/clean-orphaned-lvm.sh +++ b/misc/clean-orphaned-lvm.sh @@ -22,26 +22,18 @@ function find_orphaned_lvm { orphaned_volumes=() while read -r lv vg size; do - container_id=$(echo "$lv" | grep -oE "[0-9]+" | head -1) - - # Exclude system-critical LVs - if [[ "$lv" == "data" || "$lv" == "root" || "$lv" == "swap" ]]; then + # Exclude system-critical LVs and Ceph OSDs + if [[ "$lv" == "data" || "$lv" == "root" || "$lv" == "swap" || "$lv" =~ ^osd-block- ]]; then continue fi - + container_id=$(echo "$lv" | grep -oE "[0-9]+" | head -1) # Check if the ID exists as a VM or LXC container if [ -f "/etc/pve/lxc/${container_id}.conf" ] || [ -f "/etc/pve/qemu-server/${container_id}.conf" ]; then continue fi - orphaned_volumes+=("$lv" "$vg" "$size") done < <(lvs --noheadings -o lv_name,vg_name,lv_size --separator ' ' | awk '{print $1, $2, $3}') - if [ ${#orphaned_volumes[@]} -eq 0 ]; then - echo -e "✅ No orphaned LVM volumes found.\n" - exit 0 - fi - # Display orphaned volumes echo -e "❗ The following orphaned LVM volumes were found:\n" printf "%-25s %-10s %-10s\n" "LV Name" "VG" "Size" diff --git a/misc/filebrowser.sh b/misc/filebrowser.sh index a9ea1186b..ec57f7ded 100644 --- a/misc/filebrowser.sh +++ b/misc/filebrowser.sh @@ -26,8 +26,10 @@ INFO="${BL}ℹ️${CL}" APP="FileBrowser" INSTALL_PATH="/usr/local/bin/filebrowser" SERVICE_PATH="/etc/systemd/system/filebrowser.service" -DB_PATH="/root/filebrowser.db" +DB_PATH="/usr/local/community-scripts/filebrowser.db" IP=$(hostname -I | awk '{print $1}') +DEFAULT_PORT=8080 + header_info function msg_info() { @@ -69,6 +71,9 @@ if [ -f "$INSTALL_PATH" ]; then fi echo -e "${YW}⚠️ ${APP} is not installed.${CL}" +read -r -p "Enter port number (Default: ${DEFAULT_PORT}): " PORT +PORT=${PORT:-$DEFAULT_PORT} + read -r -p "Would you like to install ${APP}? (y/n): " install_prompt if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Installing ${APP}" @@ -76,38 +81,50 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then curl -fsSL https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null msg_ok "Installed ${APP}" + msg_info "Creating FileBrowser directory" + mkdir -p /usr/local/community-scripts + chown root:root /usr/local/community-scripts + chmod 755 /usr/local/community-scripts + msg_ok "Directory created successfully" + read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then msg_info "Configuring No Authentication" - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' --auth.method=noauth &>/dev/null + cd /usr/local/community-scripts + filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null + filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null + filebrowser config init --auth.method=noauth &>/dev/null + filebrowser config set --auth.method=noauth &>/dev/null + filebrowser users add ID 1 --perm.admin &>/dev/null msg_ok "No Authentication configured" else msg_info "Setting up default authentication" - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null + cd /usr/local/community-scripts + filebrowser config init -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null + filebrowser config set -a '0.0.0.0' -p "$PORT" -d "$DB_PATH" &>/dev/null + filebrowser users add admin helper-scripts.com --perm.admin --database "$DB_PATH" &>/dev/null msg_ok "Default authentication configured (admin:helper-scripts.com)" fi msg_info "Creating service" - cat </etc/systemd/system/filebrowser.service + cat < "$SERVICE_PATH" [Unit] Description=Filebrowser After=network-online.target [Service] User=root -WorkingDirectory=/root/ -ExecStart=/usr/local/bin/filebrowser -r / +WorkingDirectory=/usr/local/community-scripts +ExecStart=/usr/local/bin/filebrowser -r / -d "$DB_PATH" -p "$PORT" +Restart=always [Install] -WantedBy=default.target +WantedBy=multi-user.target EOF systemctl enable -q --now filebrowser.service msg_ok "Service created successfully" - echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:8080${CL}" + echo -e "${CM} ${GN}${APP} is reachable at: ${BL}http://$IP:$PORT${CL}" else echo -e "${YW}⚠️ Installation skipped. Exiting.${CL}" exit 0 diff --git a/misc/fstrim.sh b/misc/fstrim.sh index 27a9b9ed2..b155ef4ae 100644 --- a/misc/fstrim.sh +++ b/misc/fstrim.sh @@ -2,8 +2,9 @@ # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) -# License: MIT -# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +set -o pipefail function header_info() { clear @@ -16,11 +17,13 @@ function header_info() { /____/ EOF } + BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") + header_info echo "Loading..." @@ -29,50 +32,66 @@ if [ "$ROOT_FS" != "ext4" ]; then echo "Root filesystem is not ext4. Exiting script." exit 1 fi +whiptail --backtitle "Proxmox VE Helper Scripts" \ + --title "Proxmox VE LXC Filesystem Trim" \ + --yesno "The LXC containers will undergo the fstrim command. Proceed?" 10 58 || exit -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Filesystem Trim" --yesno "The LXC containers will undergo the fstrim command. Proceed?" 10 58 || exit NODE=$(hostname) EXCLUDE_MENU=() MSG_MAX_LENGTH=0 + while read -r TAG ITEM; do OFFSET=2 ((${#ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=${#ITEM}+OFFSET EXCLUDE_MENU+=("$TAG" "$ITEM " "OFF") done < <(pct list | awk 'NR>1') -excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Containers on $NODE" --checklist "\nSelect containers to skip from trimming:\n" \ - 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + +excluded_containers_raw=$(whiptail --backtitle "Proxmox VE Helper Scripts" \ + --title "Containers on $NODE" \ + --checklist "\nSelect containers to skip from trimming:\n" \ + 16 $((MSG_MAX_LENGTH + 23)) 6 "${EXCLUDE_MENU[@]}" 3>&1 1>&2 2>&3) + +if [ $? -ne 0 ]; then + exit +fi + +excluded_containers=$(echo "$excluded_containers_raw" | tr -d '"') function trim_container() { local container=$1 header_info echo -e "${BL}[Info]${GN} Trimming ${BL}$container${CL} \n" - local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') + + local before_trim + before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') echo -e "${RD}Data before trim $before_trim%${CL}" - pct fstrim $container - local after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') + + pct fstrim "$container" + + local after_trim + after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') echo -e "${GN}Data after trim $after_trim%${CL}" + sleep 1.5 } - - for container in $(pct list | awk '{if(NR>1) print $1}'); do - if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then + if [[ " ${excluded_containers} " =~ " $container " ]]; then header_info echo -e "${BL}[Info]${GN} Skipping ${BL}$container${CL}" sleep 1 else - template=$(pct config $container | grep -q "template:" && echo "true" || echo "false") + template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false") if [ "$template" == "true" ]; then header_info echo -e "${BL}[Info]${GN} Skipping ${container} ${RD}$container is a template ${CL} \n" sleep 1 continue fi - trim_container $container + trim_container "$container" fi done wait header_info -echo -e "${GN} Finished, LXC Containers Trimmed. ${CL} \n" +echo -e "${GN}Finished, LXC Containers Trimmed.${CL} \n" diff --git a/misc/install.func b/misc/install.func index 2ab1dca71..4ee21fec4 100644 --- a/misc/install.func +++ b/misc/install.func @@ -55,6 +55,7 @@ catch_errors() { # This function handles errors error_handler() { + source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" @@ -62,8 +63,11 @@ error_handler() { local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message" - if [[ "$line_number" -eq 23 ]]; then + if [[ "$line_number" -eq 44 ]]; then echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" + post_update_to_api "failed" "No error message, script ran in silent mode" + else + post_update_to_api "failed" "${command}" fi } diff --git a/misc/lxc-delete.sh b/misc/lxc-delete.sh index 2e76d5963..df9685de0 100644 --- a/misc/lxc-delete.sh +++ b/misc/lxc-delete.sh @@ -7,12 +7,12 @@ function header_info { clear cat <<"EOF" - ____ ____ ____ _ __ __ _______ _ __ __ _ ________ ____ ________ __________________ - / __ \/ __ \/ __ \ |/ // |/ / __ \ |/ / / / | |/ / ____/ / __ \/ ____/ / / ____/_ __/ ____/ - / /_/ / /_/ / / / / // /|_/ / / / / / / / | / / / / / / __/ / / / __/ / / / __/ - / ____/ _, _/ /_/ / |/ / / / /_/ / | / /___/ / /___ / /_/ / /___/ /___/ /___ / / / /___ -/_/ /_/ |_|\____/_/|_/_/ /_/\____/_/|_| /_____/_/|_\____/ /_____/_____/_____/_____/ /_/ /_____/ - + ____ __ _ ________ ____ __ __ + / __ \_________ _ ______ ___ ____ _ __ / / | |/ / ____/ / __ \___ / /__ / /____ + / /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ / / | / / / / / / _ \/ / _ \/ __/ _ \ + / ____/ / / /_/ /> < / /___/ / /___ / /_/ / __/ / __/ /_/ __/ +/_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| /_____/_/|_\____/ /_____/\___/_/\___/\__/\___/ + EOF } @@ -33,29 +33,26 @@ set -eEuo pipefail YW=$(echo "\033[33m") BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") -CM='\xE2\x9C\x94\033' GN=$(echo "\033[1;92m") CL=$(echo "\033[m") +TAB=" " +CM="${TAB}✔️${TAB}${CL}" header_info echo "Loading..." -whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Deletion" --yesno "This Will Delete LXC Containers. Proceed?" 10 58 || exit +whiptail --backtitle "Proxmox VE Helper Scripts" --title "Proxmox VE LXC Deletion" --yesno "This will delete LXC containers. Proceed?" 10 58 || exit NODE=$(hostname) - -# Get list of containers with ID and hostname containers=$(pct list | tail -n +2 | awk '{print $0 " " $4}') -# Exit if no containers are found if [ -z "$containers" ]; then - whiptail --title "LXC Container Delete" --msgbox "There are no LXC Container available!" 10 60 + whiptail --title "LXC Container Delete" --msgbox "No LXC containers available!" 10 60 exit 1 fi menu_items=() FORMAT="%-10s %-15s %-10s" -# Format container data for menu display while read -r container; do container_id=$(echo $container | awk '{print $1}') container_name=$(echo $container | awk '{print $2}') @@ -64,49 +61,50 @@ while read -r container; do menu_items+=("$container_id" "$formatted_line" "OFF") done <<< "$containers" -# Display selection menu CHOICES=$(whiptail --title "LXC Container Delete" \ - --checklist "Choose LXC container to delete:" 25 60 13 \ + --checklist "Select LXC containers to delete:" 25 60 13 \ "${menu_items[@]}" 3>&2 2>&1 1>&3) if [ -z "$CHOICES" ]; then whiptail --title "LXC Container Delete" \ - --msgbox "No containers have been selected!" 10 60 + --msgbox "No containers selected!" 10 60 exit 1 fi -# Process selected containers +read -p "Delete containers manually or automatically? (Default: manual) m/a: " DELETE_MODE +DELETE_MODE=${DELETE_MODE:-m} + selected_ids=$(echo "$CHOICES" | tr -d '"' | tr -s ' ' '\n') for container_id in $selected_ids; do status=$(pct status $container_id) - # Stop container if running if [ "$status" == "status: running" ]; then - echo -e "${BL}[Info]${GN} Stop container $container_id...${CL}" + echo -e "${BL}[Info]${GN} Stopping container $container_id...${CL}" pct stop $container_id & sleep 5 echo -e "${BL}[Info]${GN} Container $container_id stopped.${CL}" fi - # Confirm deletion - read -p "Are you sure you want to delete Container $container_id? (y/N): " CONFIRM - if [[ "$CONFIRM" =~ ^[Yy]$ ]]; then - echo -e "${BL}[Info]${GN} Deleting container $container_id...${CL}" + if [[ "$DELETE_MODE" == "a" ]]; then + echo -e "${BL}[Info]${GN} Automatically deleting container $container_id...${CL}" pct destroy "$container_id" -f & pid=$! spinner $pid - if [ $? -eq 0 ]; then - echo "Container $container_id was successfully deleted." - else - whiptail --title "Error" --msgbox "Error deleting container $container_id." 10 60 - fi - elif [[ "$CONFIRM" =~ ^[Nn]$ ]]; then - echo -e "${BL}[Info]${RD} Skipping container $container_id...${CL}" + [ $? -eq 0 ] && echo "Container $container_id deleted." || whiptail --title "Error" --msgbox "Failed to delete container $container_id." 10 60 else - echo -e "${RD}[Error]${CL} Invalid input, skipping container $container_id." + read -p "Delete container $container_id? (y/N): " CONFIRM + if [[ "$CONFIRM" =~ ^[Yy]$ ]]; then + echo -e "${BL}[Info]${GN} Deleting container $container_id...${CL}" + pct destroy "$container_id" -f & + pid=$! + spinner $pid + [ $? -eq 0 ] && echo "Container $container_id deleted." || whiptail --title "Error" --msgbox "Failed to delete container $container_id." 10 60 + else + echo -e "${BL}[Info]${RD} Skipping container $container_id...${CL}" + fi fi done header_info -echo -e "${GN}The deletion process has been completed.${CL}\n" +echo -e "${GN}Deletion process completed.${CL}\n" diff --git a/misc/pbs_microcode.sh b/misc/pbs_microcode.sh new file mode 100644 index 000000000..f3b88fde8 --- /dev/null +++ b/misc/pbs_microcode.sh @@ -0,0 +1,176 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2025 tteck +# Copyright (c) 2025 DonPablo1010 +# Adapted for the Proxmox Backup Server - Baremetal Only +# License: MIT +# This script searches for CPU microcode packages (Intel/AMD) and offers the option to install them. +# A system reboot is required to apply the changes. +# IMPORTANT: This script will only proceed if running on bare metal. If running in a VM, it will exit. + +function header_info { + clear + cat <<"EOF" + ____ __ ____ __ + / __ \_________ ________ ______________ _____ / |/ (_)_____________ _________ ____/ /__ + / /_/ / ___/ __ \/ ___/ _ \/ ___/ ___/ __ \/ ___/ / /|_/ / / ___/ ___/ __ \/ ___/ __ \/ __ / _ \ + / ____/ / / /_/ / /__/ __(__ |__ ) /_/ / / / / / / / /__/ / / /_/ / /__/ /_/ / /_/ / __/ +/_/ /_/ \____/\___/\___/____/____/\____/_/ /_/ /_/_/\___/_/ \____/\___/\____/\__,_/\___/ + + Proxmox Backup Server Processor Microcode Updater +EOF +} + +# Color definitions +RD=$(echo "\033[01;31m") +YW=$(echo "\033[33m") +GN=$(echo "\033[1;92m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" + +msg_info() { echo -ne " ${HOLD} ${YW}$1..."; } +msg_ok() { echo -e "${BFR} ${CM} ${GN}$1${CL}"; } +msg_error() { echo -e "${BFR} ${CROSS} ${RD}$1${CL}"; } + +header_info + +# Check if running on bare metal using systemd-detect-virt. +virt=$(systemd-detect-virt) +if [ "$virt" != "none" ]; then + msg_error "This script must be run on bare metal. Detected virtual environment: $virt" + exit 1 +fi + +# Attempt to obtain the current loaded microcode revision +current_microcode=$(journalctl -k | grep -i 'microcode: Current revision:' | grep -oP 'Current revision: \K0x[0-9a-f]+') +[ -z "$current_microcode" ] && current_microcode="Not found." + +intel() { + if ! dpkg -s iucode-tool >/dev/null 2>&1; then + msg_info "Installing iucode-tool (Intel microcode updater)" + apt-get install -y iucode-tool &>/dev/null + msg_ok "Installed iucode-tool" + else + msg_ok "Intel iucode-tool is already installed" + sleep 1 + fi + + intel_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//') + [ -z "$intel_microcode" ] && { + whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Found" --msgbox "No microcode packages were found.\nTry again later." 10 68 + msg_info "Exiting" + sleep 1 + msg_ok "Done" + exit + } + + MICROCODE_MENU=() + MSG_MAX_LENGTH=0 + + while read -r TAG ITEM; do + OFFSET=2 + (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=$(( ${#ITEM} + OFFSET )) + MICROCODE_MENU+=("$TAG" "$ITEM " "OFF") + done < <(echo "$intel_microcode") + + microcode=$(whiptail --backtitle "Proxmox Backup Server Helper Scripts" \ + --title "Current Microcode Revision: ${current_microcode}" \ + --radiolist "\nSelect a microcode package to install:\n" \ + 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + + [ -z "$microcode" ] && { + whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Selected" --msgbox "No microcode package was selected." 10 68 + msg_info "Exiting" + sleep 1 + msg_ok "Done" + exit + } + + msg_info "Downloading Intel processor microcode package $microcode" + wget -q http://ftp.debian.org/debian/pool/non-free-firmware/i/intel-microcode/$microcode + msg_ok "Downloaded Intel processor microcode package $microcode" + + msg_info "Installing $microcode (this might take a while)" + dpkg -i $microcode &>/dev/null + msg_ok "Installed $microcode" + + msg_info "Cleaning up" + rm $microcode + msg_ok "Clean up complete" + echo -e "\nA system reboot is required to apply the changes.\n" +} + +amd() { + amd_microcode=$(curl -fsSL "https://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/" | grep -o 'href="[^"]*amd64.deb"' | sed 's/href="//;s/"//') + + [ -z "$amd_microcode" ] && { + whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Found" --msgbox "No microcode packages were found.\nTry again later." 10 68 + msg_info "Exiting" + sleep 1 + msg_ok "Done" + exit + } + + MICROCODE_MENU=() + MSG_MAX_LENGTH=0 + + while read -r TAG ITEM; do + OFFSET=2 + (( ${#ITEM} + OFFSET > MSG_MAX_LENGTH )) && MSG_MAX_LENGTH=$(( ${#ITEM} + OFFSET )) + MICROCODE_MENU+=("$TAG" "$ITEM " "OFF") + done < <(echo "$amd_microcode") + + microcode=$(whiptail --backtitle "Proxmox Backup Server Helper Scripts" \ + --title "Current Microcode Revision: ${current_microcode}" \ + --radiolist "\nSelect a microcode package to install:\n" \ + 16 $((MSG_MAX_LENGTH + 58)) 6 "${MICROCODE_MENU[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + + [ -z "$microcode" ] && { + whiptail --backtitle "Proxmox Backup Server Helper Scripts" --title "No Microcode Selected" --msgbox "No microcode package was selected." 10 68 + msg_info "Exiting" + sleep 1 + msg_ok "Done" + exit + } + + msg_info "Downloading AMD processor microcode package $microcode" + wget -q https://ftp.debian.org/debian/pool/non-free-firmware/a/amd64-microcode/$microcode + msg_ok "Downloaded AMD processor microcode package $microcode" + + msg_info "Installing $microcode (this might take a while)" + dpkg -i $microcode &>/dev/null + msg_ok "Installed $microcode" + + msg_info "Cleaning up" + rm $microcode + msg_ok "Clean up complete" + echo -e "\nA system reboot is required to apply the changes.\n" +} + +# Check if this is a Proxmox Backup Server by verifying the presence of the datastore config. +if [ ! -f /etc/proxmox-backup/user.cfg ]; then + header_info + msg_error "Proxmox Backup Server not detected!" + exit +fi + +whiptail --backtitle "Proxmox Backup Server Helper Scripts" \ + --title "Proxmox Backup Server Processor Microcode" \ + --yesno "This script searches for CPU microcode packages and offers the option to install them.\nProceed?" 10 68 || exit + +msg_info "Checking CPU vendor" +cpu=$(lscpu | grep -oP 'Vendor ID:\s*\K\S+' | head -n 1) +if [ "$cpu" == "GenuineIntel" ]; then + msg_ok "${cpu} detected" + sleep 1 + intel +elif [ "$cpu" == "AuthenticAMD" ]; then + msg_ok "${cpu} detected" + sleep 1 + amd +else + msg_error "CPU vendor ${cpu} is not supported" + exit +fi diff --git a/misc/post-pmg-install.sh b/misc/post-pmg-install.sh index c5f4ed302..8c17e3139 100644 --- a/misc/post-pmg-install.sh +++ b/misc/post-pmg-install.sh @@ -121,9 +121,9 @@ EOF whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58 msg_info "Disabling subscription nag" # Normal GUI: - echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script # JS-Library used when accessing via mobile device browser - echo "DPkg::Post-Invoke { \"dpkg -V pmg-gui | grep -q '/pmgmanagerlib-mobile\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from Mobile UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script + echo "DPkg::Post-Invoke { \"dpkg -V pmg-gui | grep -q '/pmgmanagerlib-mobile\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from Mobile UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js; }; fi\"; };" >>/etc/apt/apt.conf.d/no-nag-script apt --reinstall install proxmox-widget-toolkit pmg-gui &>/dev/null msg_ok "Disabled subscription nag (Delete browser cache)" ;; diff --git a/misc/post-pve-install.sh b/misc/post-pve-install.sh index 4290c50f6..aeba762cd 100644 --- a/misc/post-pve-install.sh +++ b/misc/post-pve-install.sh @@ -231,7 +231,7 @@ while true; do esac done -if ! pveversion | grep -Eq "pve-manager/8.[0-3]"; then +if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.0 or later." echo -e "Exiting..." diff --git a/vm/archlinux-vm.sh b/vm/archlinux-vm.sh index 6f08a0023..8ad66e7c0 100644 --- a/vm/archlinux-vm.sh +++ b/vm/archlinux-vm.sh @@ -4,6 +4,9 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + + function header_info { clear cat <<"EOF" @@ -17,6 +20,12 @@ EOF } header_info echo -e "\n Loading..." +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="arch-linux-vm" +var_os="arch-linux" +var_version=" " GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) @@ -56,10 +65,13 @@ THIN="discard=on,ssd=1," set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "${commad}" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -111,7 +123,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -164,6 +176,7 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}" echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}" @@ -181,6 +194,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -377,6 +391,7 @@ arch_check pve_check ssh_check start_script +post_to_api_vm msg_info "Validating Storage" while read -r line; do @@ -493,5 +508,6 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Arch Linux VM" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 857c0ad60..6abb669b1 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -4,6 +4,8 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -19,6 +21,11 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="debian12vm" +var_os="debian" +var_version="12" YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -56,11 +63,14 @@ THIN="discard=on,ssd=1," set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + post_update_to_api "failed" "${command}" echo -e "\n$error_message\n" cleanup_vmid } @@ -74,6 +84,7 @@ function cleanup_vmid() { function cleanup() { popd >/dev/null + post_update_to_api "done" "none" rm -rf $TEMP_DIR } @@ -111,7 +122,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -164,6 +175,7 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}" echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}" @@ -181,6 +193,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -378,6 +391,8 @@ pve_check ssh_check start_script +post_to_api_vm + msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -439,7 +454,7 @@ done msg_info "Creating a Debian 12 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ diff --git a/vm/docker-vm.sh b/vm/docker-vm.sh index db855d504..38bf0e1e7 100644 --- a/vm/docker-vm.sh +++ b/vm/docker-vm.sh @@ -4,6 +4,8 @@ # Author: thost96 (thost96) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -19,6 +21,12 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="debian12vm" +var_os="debian" +var_version="12" +DISK_SIZE="8G" YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -36,10 +44,13 @@ THIN="discard=on,ssd=1," set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "${command}" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -91,7 +102,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -144,6 +155,7 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" @@ -160,6 +172,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -341,6 +354,7 @@ arch_check pve_check ssh_check start_script +post_to_api_vm msg_info "Validating Storage" while read -r line; do @@ -417,7 +431,7 @@ msg_ok "Added Docker and Docker Compose Plugin to Debian 12 Qcow2 Disk Image suc msg_info "Creating a Docker VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts,debian12,docker -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags community-script,debian12,docker -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ @@ -465,4 +479,5 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Docker VM" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 87ba35c90..f31dbe8ab 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -5,6 +5,9 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + + function header_info { clear cat <<"EOF" @@ -21,6 +24,13 @@ echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) VERSIONS=(stable beta dev) +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="homeassistant-os" +var_os="homeassistant" +DISK_SIZE="32G" +# for version in "${VERSIONS[@]}"; do eval "$version=$(curl -s https://raw.githubusercontent.com/home-assistant/version/master/$version.json | grep "ova" | cut -d '"' -f 4)" done @@ -41,6 +51,8 @@ SPINNER_PID="" set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi @@ -48,6 +60,7 @@ function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "${command}" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -115,7 +128,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -167,6 +180,8 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" + var_version="${stable}" echo -e "${DGN}Using HAOS Version: ${BGN}${BRANCH}${CL}" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" @@ -184,11 +199,13 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" if BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$stable" "Stable " ON \ "$beta" "Beta " OFF \ "$dev" "Dev " OFF \ 3>&1 1>&2 2>&3); then + var_version="${BRANCH}" echo -e "${DGN}Using HAOS Version: ${BGN}$BRANCH${CL}" else exit-script @@ -376,6 +393,9 @@ pve_check ssh_check start_script + +post_to_api_vm + msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -463,4 +483,7 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Home Assistant OS VM" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" + + diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 816dea9f2..ce417ca85 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -5,6 +5,9 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + + function header_info { cat <<"EOF" __ ____ __ __ _ __ ____ __ ____ _____ ________ ______ @@ -20,6 +23,14 @@ header_info echo -e "Loading..." GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') NEXTID=$(pvesh get /cluster/nextid) +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="mikrotik-router-os" +var_os="mikrotik" +var_version=" " +DISK_SIZE="1G" +# YW=$(echo "\033[33m") BL=$(echo "\033[36m") HA=$(echo "\033[1;34m") @@ -39,6 +50,8 @@ shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_exit() { trap - ERR local reason="Unknown failure occurred." @@ -62,7 +75,7 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null -if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then +if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -86,6 +99,7 @@ function msg_ok() { echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function default_settings() { + METHOD="default" echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" VMID=$NEXTID echo -e "${DGN}Using Hostname: ${BGN}mikrotik-routeros-chr${CL}" @@ -107,6 +121,7 @@ function default_settings() { echo -e "${BL}Creating a Mikrotik RouterOS CHR VM using the above default settings${CL}" } function advanced_settings() { + METHOD="advanced" VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then @@ -203,6 +218,8 @@ function start_script() { fi } start_script + +post_to_api_vm msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -287,4 +304,5 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Mikrotik RouterOS CHR VM" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index d93b7b95f..ad0dc5417 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -5,6 +5,8 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -17,6 +19,14 @@ EOF } header_info echo -e "\n Loading..." +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="turnkey-nextcloud" +var_os="turnkey-nextcloud" +var_version=" " +DISK_SIZE="12G" +# GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) NAME="TurnKey Nexcloud VM" @@ -36,10 +46,13 @@ THIN="discard=on,ssd=1" set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "${command}" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -91,7 +104,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -142,6 +155,7 @@ function default_settings() { VLAN="" MTU="" START_VM="no" + METHOD="default" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" @@ -158,6 +172,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -340,6 +355,8 @@ pve_check ssh_check start_script +post_to_api_vm + msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -422,4 +439,5 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started $NAME" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" diff --git a/vm/openwrt.sh b/vm/openwrt.sh index f7488f958..60192ae7e 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -7,6 +7,8 @@ # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Based on work from https://i12bretro.github.io/tutorials/0405.html +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -21,6 +23,14 @@ EOF } header_info echo -e "Loading..." +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="openwrt-vm" +var_os="openwrt" +var_version=" " +DISK_SIZE="0.5G" +# GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') GEN_MAC_LAN=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) @@ -39,10 +49,13 @@ CROSS="${RD}✗${CL}" set -Eeo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "$command" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -157,7 +170,7 @@ function msg_error() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -209,6 +222,7 @@ function default_settings() { LAN_VLAN=",tag=999" MTU="" START_VM="yes" + METHOD="default" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" @@ -227,6 +241,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -399,6 +414,7 @@ arch_check pve_check ssh_check start_script +post_to_api_vm msg_info "Validating Storage" while read -r line; do @@ -432,7 +448,7 @@ msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." msg_info "Getting URL for OpenWrt Disk Image" response=$(curl -s https://openwrt.org) -stableversion=$(echo "$response" | sed -n 's/.*Current stable release - OpenWrt \([0-9.]\+\).*/\1/p') +stableversion=$(echo "$response" | sed -n 's/.*Current stable release - OpenWrt \([0-9.]\+\).*/\1/p' | head -n 1) URL="https://downloads.openwrt.org/releases/$stableversion/targets/x86/64/openwrt-$stableversion-x86-64-generic-ext4-combined.img.gz" sleep 2 @@ -518,4 +534,5 @@ VLAN_FINISH="" if [ "$VLAN" == "" ] && [ "$VLAN2" != "999" ]; then VLAN_FINISH=" Please remember to adjust the VLAN tags to suit your network." fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n${VLAN_FINISH}" diff --git a/vm/opnsense-vm.sh b/vm/opnsense-vm.sh new file mode 100644 index 000000000..0d298e4e0 --- /dev/null +++ b/vm/opnsense-vm.sh @@ -0,0 +1,677 @@ +#!/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 <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + +function header_info { + clear + cat <<"EOF" + ____ ____ _ __ + / __ \/ __ \/ | / /_______ ____ ________ + / / / / /_/ / |/ / ___/ _ \/ __ \/ ___/ _ \ +/ /_/ / ____/ /| (__ ) __/ / / (__ ) __/ +\____/_/ /_/ |_/____/\___/_/ /_/____/\___/ + +EOF +} +header_info +echo -e "Loading..." +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="opnsense-vm" +var_os="opnsense" +var_version="25.1" +# +GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +GEN_MAC_LAN=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') +NEXTID=$(pvesh get /cluster/nextid) +YW=$(echo "\033[33m") +BL=$(echo "\033[36m") +HA=$(echo "\033[1;34m") +RD=$(echo "\033[01;31m") +BGN=$(echo "\033[4;92m") +GN=$(echo "\033[1;92m") +DGN=$(echo "\033[32m") +CL=$(echo "\033[m") +BFR="\\r\\033[K" +HOLD="-" +CM="${GN}✓${CL}" +CROSS="${RD}✗${CL}" +set -Eeo pipefail +trap 'error_handler $LINENO "$BASH_COMMAND"' ERR +trap cleanup EXIT +function error_handler() { + local exit_code="$?" + local line_number="$1" + local command="$2" + post_update_to_api "failed" "$command" + local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" + echo -e "\n$error_message\n" + cleanup_vmid +} + +function cleanup_vmid() { + if qm status $VMID &>/dev/null; then + qm stop $VMID &>/dev/null + qm destroy $VMID &>/dev/null + fi +} + +function cleanup() { + popd >/dev/null + post_update_to_api "done" "none" + rm -rf $TEMP_DIR +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null +function send_line_to_vm() { + echo -e "${DGN}Sending line: ${YW}$1${CL}" + for ((i = 0; i < ${#1}; i++)); do + character=${1:i:1} + case $character in + " ") character="spc" ;; + "-") character="minus" ;; + "=") character="equal" ;; + ",") character="comma" ;; + ".") character="dot" ;; + "/") character="slash" ;; + "'") character="apostrophe" ;; + ";") character="semicolon" ;; + '\') character="backslash" ;; + '`') character="grave_accent" ;; + "[") character="bracket_left" ;; + "]") character="bracket_right" ;; + "_") character="shift-minus" ;; + "+") character="shift-equal" ;; + "?") character="shift-slash" ;; + "<") character="shift-comma" ;; + ">") character="shift-dot" ;; + '"') character="shift-apostrophe" ;; + ":") character="shift-semicolon" ;; + "|") character="shift-backslash" ;; + "~") character="shift-grave_accent" ;; + "{") character="shift-bracket_left" ;; + "}") character="shift-bracket_right" ;; + "A") character="shift-a" ;; + "B") character="shift-b" ;; + "C") character="shift-c" ;; + "D") character="shift-d" ;; + "E") character="shift-e" ;; + "F") character="shift-f" ;; + "G") character="shift-g" ;; + "H") character="shift-h" ;; + "I") character="shift-i" ;; + "J") character="shift-j" ;; + "K") character="shift-k" ;; + "L") character="shift-l" ;; + "M") character="shift-m" ;; + "N") character="shift-n" ;; + "O") character="shift-o" ;; + "P") character="shift-p" ;; + "Q") character="shift-q" ;; + "R") character="shift-r" ;; + "S") character="shift-s" ;; + "T") character="shift-t" ;; + "U") character="shift-u" ;; + "V") character="shift-v" ;; + "W") character="shift-w" ;; + "X") character="shift=x" ;; + "Y") character="shift-y" ;; + "Z") character="shift-z" ;; + "!") character="shift-1" ;; + "@") character="shift-2" ;; + "#") character="shift-3" ;; + '$') character="shift-4" ;; + "%") character="shift-5" ;; + "^") character="shift-6" ;; + "&") character="shift-7" ;; + "*") character="shift-8" ;; + "(") character="shift-9" ;; + ")") character="shift-0" ;; + esac + qm sendkey $VMID "$character" + done + qm sendkey $VMID ret +} + +TEMP_DIR=$(mktemp -d) +pushd $TEMP_DIR >/dev/null + +if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "OPNsense VM" --yesno "This will create a New OPNsense VM. Proceed?" 10 58); then + : +else + header_info && echo -e "⚠ User exited script \n" && exit +fi + +function msg_info() { + local msg="$1" + echo -ne " ${HOLD} ${YW}${msg}..." +} + +function msg_ok() { + local msg="$1" + echo -e "${BFR} ${CM} ${GN}${msg}${CL}" +} + +function msg_error() { + local msg="$1" + echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" +} + +function pve_check() { + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + msg_error "This version of Proxmox Virtual Environment is not supported" + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function arch_check() { + if [ "$(dpkg --print-architecture)" != "amd64" ]; then + echo -e "\n ${CROSS} This script will not work with PiMox! \n" + echo -e "Exiting..." + sleep 2 + exit + fi +} + +function ssh_check() { + if command -v pveversion >/dev/null 2>&1; then + if [ -n "${SSH_CLIENT:+x}" ]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then + echo "you've been warned" + else + clear + exit + fi + fi + fi +} + +function exit-script() { + clear + echo -e "⚠ User exited script \n" + exit +} + +function default_settings() { + VMID="$NEXTID" + FORMAT=",efitype=4m" + MACHINE="" + DISK_CACHE="" + HN="opnsense" + CPU_TYPE="" + CORE_COUNT="4" + RAM_SIZE="8192" + BRG="vmbr0" + IP_ADDR="" + WAN_IP_ADDR="" + LAN_GW="" + WAN_GW="" + NETMASK="" + WAN_NETMASK="" + VLAN="" + MAC=$GEN_MAC + WAN_MAC=$GEN_MAC_LAN + WAN_BRG="vmbr1" + MTU="" + START_VM="yes" + METHOD="default" + + echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" + echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}" + echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}" + echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}" + if ! grep -q "^iface ${BRG}" /etc/network/interfaces; then + msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" + exit + else + echo -e "${DGN}Using LAN Bridge: ${BGN}${BRG}${CL}" + fi + echo -e "${DGN}Using LAN VLAN: ${BGN}Default${CL}" + echo -e "${DGN}Using LAN MAC Address: ${BGN}${MAC}${CL}" + echo -e "${DGN}Using WAN MAC Address: ${BGN}${WAN_MAC}${CL}" + if ! grep -q "^iface ${WAN_BRG}" /etc/network/interfaces; then + msg_error "Bridge '${WAN_BRG}' does not exist in /etc/network/interfaces" + exit + else + echo -e "${DGN}Using WAN Bridge: ${BGN}${WAN_BRG}${CL}" + fi + echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}" + echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}" + echo -e "${BL}Creating a OPNsense VM using the above default settings${CL}" +} + +function advanced_settings() { + local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' + METHOD="advanced" + while true; do + if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z "$VMID" ]; then + VMID="$NEXTID" + fi + if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then + echo -e "${CROSS}${RD} ID $VMID is already in use${CL}" + sleep 2 + continue + fi + echo -e "${DGN}Virtual Machine ID: ${BGN}$VMID${CL}" + break + else + exit-script + fi + done + + if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \ + "i440fx" "Machine i440fx" ON \ + "q35" "Machine q35" OFF \ + 3>&1 1>&2 2>&3); then + if [ $MACH = q35 ]; then + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT="" + MACHINE=" -machine q35" + else + echo -e "${DGN}Using Machine Type: ${BGN}$MACH${CL}" + FORMAT=",efitype=4m" + MACHINE="" + fi + else + exit-script + fi + + if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "KVM64 (Default)" ON \ + "1" "Host" OFF \ + 3>&1 1>&2 2>&3); then + if [ $CPU_TYPE1 = "1" ]; then + echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}" + CPU_TYPE=" -cpu host" + else + echo -e "${DGN}Using CPU Model: ${BGN}KVM64${CL}" + CPU_TYPE="" + fi + else + exit-script + fi + + if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \ + "0" "None (Default)" ON \ + "1" "Write Through" OFF \ + 3>&1 1>&2 2>&3); then + if [ $DISK_CACHE = "1" ]; then + echo -e "${DGN}Using Disk Cache: ${BGN}Write Through${CL}" + DISK_CACHE="cache=writethrough," + else + echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" + DISK_CACHE="" + fi + else + exit-script + fi + + if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 OPNsense --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $VM_NAME ]; then + HN="OPNsense" + else + HN=$(echo ${VM_NAME,,} | tr -d ' ') + fi + echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}" + else + exit-script + fi + + if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 4 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $CORE_COUNT ]; then + CORE_COUNT="2" + fi + echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}" + else + exit-script + fi + + if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 8192 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $RAM_SIZE ]; then + RAM_SIZE="8192" + fi + echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}" + else + exit-script + fi + + if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Bridge" 8 58 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $BRG ]; then + BRG="vmbr0" + fi + if ! grep -q "^iface ${BRG}" /etc/network/interfaces; then + msg_error "Bridge '${BRG}' does not exist in /etc/network/interfaces" + exit + fi + echo -e "${DGN}Using LAN Bridge: ${BGN}$BRG${CL}" + else + exit-script + fi + + if IP_ADDR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN IP" 8 58 $IP_ADDR --title "LAN IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $IP_ADDR ]; then + echo -e "${DGN}Using DHCP AS LAN IP ADDRESS${CL}" + else + if [[ -n "$IP_ADDR" && ! "$IP_ADDR" =~ $ip_regex ]]; then + msg_error "Invalid IP Address format for LAN IP. Needs to be 0.0.0.0, was $IP_ADDR" + exit + fi + echo -e "${DGN}Using LAN IP ADDRESS: ${BGN}$IP_ADDR${CL}" + if LAN_GW=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN GATEWAY IP" 8 58 $LAN_GW --title "LAN GATEWAY IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $LAN_GW ]; then + echo -e "${DGN}Gateway needs to be set if ip is not dhcp${CL}" + exit-script + fi + if [[ -n "$LAN_GW" && ! "$LAN_GW" =~ $ip_regex ]]; then + msg_error "Invalid IP Address format for Gateway. Needs to be 0.0.0.0, was $LAN_GW" + exit + fi + echo -e "${DGN}Using LAN GATEWAY ADDRESS: ${BGN}$LAN_GW${CL}" + fi + if NETMASK=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN netmmask (24 for example)" 8 58 $NETMASK --title "LAN NETMASK" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $NETMASK ]; then + echo -e "${DGN}Netmask needs to be set if ip is not dhcp${CL}" + fi + if [[ -n "$NETMASK" && ! ("$NETMASK" =~ ^[0-9]+$ && "$NETMASK" -ge 1 && "$NETMASK" -le 32) ]]; then + msg_error "Invalid LAN NETMASK format. Needs to be 1-32, was $NETMASK" + exit + fi + echo -e "${DGN}Using LAN NETMASK: ${BGN}$NETMASK${CL}" + else + exit-script + fi + fi + else + exit-script + fi + + if WAN_BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Bridge" 8 58 vmbr1 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $WAN_BRG ]; then + WAN_BRG="vmbr1" + fi + if ! grep -q "^iface ${WAN_BRG}" /etc/network/interfaces; then + msg_error "WAN Bridge '${WAN_BRG}' does not exist in /etc/network/interfaces" + exit + fi + echo -e "${DGN}Using WAN Bridge: ${BGN}$WAN_BRG${CL}" + else + exit-script + fi + + if WAN_IP_ADDR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN IP" 8 58 $WAN_IP_ADDR --title "WAN IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $WAN_IP_ADDR ]; then + echo -e "${DGN}Using DHCP AS WAN IP ADDRESS${CL}" + else + if [[ -n "$WAN_IP_ADDR" && ! "$WAN_IP_ADDR" =~ $ip_regex ]]; then + msg_error "Invalid IP Address format for WAN IP. Needs to be 0.0.0.0, was $WAN_IP_ADDR" + exit + fi + echo -e "${DGN}Using WAN IP ADDRESS: ${BGN}$WAN_IP_ADDR${CL}" + if WAN_GW=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN GATEWAY IP" 8 58 $WAN_GW --title "WAN GATEWAY IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $WAN_GW ]; then + echo -e "${DGN}Gateway needs to be set if ip is not dhcp${CL}" + exit-script + fi + if [[ -n "$WAN_GW" && ! "$WAN_GW" =~ $ip_regex ]]; then + msg_error "Invalid IP Address format for WAN Gateway. Needs to be 0.0.0.0, was $WAN_GW" + exit + fi + echo -e "${DGN}Using WAN GATEWAY ADDRESS: ${BGN}$WAN_GW${CL}" + else + exit-script + fi + if WAN_NETMASK=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN netmmask (24 for example)" 8 58 $WAN_NETMASK --title "WAN NETMASK" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $WAN_NETMASK ]; then + echo -e "${DGN}WAN Netmask needs to be set if ip is not dhcp${CL}" + fi + if [[ -n "$WAN_NETMASK" && ! ("$WAN_NETMASK" =~ ^[0-9]+$ && "$WAN_NETMASK" -ge 1 && "$WAN_NETMASK" -le 32) ]]; then + msg_error "Invalid WAN NETMASK format. Needs to be 1-32, was $WAN_NETMASK" + exit + fi + echo -e "${DGN}Using WAN NETMASK: ${BGN}$WAN_NETMASK${CL}" + else + exit-script + fi + fi + else + exit-script + fi + if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN MAC Address" 8 58 $GEN_MAC --title "WAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC1 ]; then + MAC="$GEN_MAC" + else + MAC="$MAC1" + fi + echo -e "${DGN}Using LAN MAC Address: ${BGN}$MAC${CL}" + else + exit-script + fi + + if MAC2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN MAC Address" 8 58 $GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then + if [ -z $MAC2 ]; then + WAN_MAC="$GEN_MAC_LAN" + else + WAN_MAC="$MAC2" + fi + echo -e "${DGN}Using WAN MAC Address: ${BGN}$WAN_MAC${CL}" + else + exit-script + fi + + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OPNsense VM?" --no-button Do-Over 10 58); then + echo -e "${RD}Creating a OPNsense VM using the above advanced settings${CL}" + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +function start_script() { + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then + header_info + echo -e "${BL}Using Default Settings${CL}" + default_settings + else + header_info + echo -e "${RD}Using Advanced Settings${CL}" + advanced_settings + fi +} + +arch_check +pve_check +ssh_check +start_script +post_to_api_vm + +msg_info "Validating Storage" +while read -r line; do + TAG=$(echo $line | awk '{print $1}') + TYPE=$(echo $line | awk '{printf "%-10s", $2}') + FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') + ITEM=" Type: $TYPE Free: $FREE " + OFFSET=2 + if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then + MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) + fi + STORAGE_MENU+=("$TAG" "$ITEM" "OFF") +done < <(pvesm status -content images | awk 'NR>1') +VALID=$(pvesm status -content images | awk 'NR>1') +if [ -z "$VALID" ]; then + msg_error "Unable to detect a valid storage location." + exit +elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then + STORAGE=${STORAGE_MENU[0]} +else + while [ -z "${STORAGE:+x}" ]; do + STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ + "Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit + done +fi +msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." +msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." +msg_info "Retrieving the URL for the OPNsense Qcow2 Disk Image" +URL=https://download.freebsd.org/releases/VM-IMAGES/14.2-RELEASE/amd64/Latest/FreeBSD-14.2-RELEASE-amd64.qcow2.xz +sleep 2 +msg_ok "${CL}${BL}${URL}${CL}" +wget -q --show-progress $URL +echo -en "\e[1A\e[0K" +FILE=Fressbsd.qcow2 +unxz -cv $(basename $URL) > ${FILE} +msg_ok "Downloaded ${CL}${BL}${FILE}${CL}" + +STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') +case $STORAGE_TYPE in +nfs | dir) + DISK_EXT=".qcow2" + DISK_REF="$VMID/" + DISK_IMPORT="-format qcow2" + THIN="" + ;; +btrfs) + DISK_EXT=".raw" + DISK_REF="$VMID/" + DISK_IMPORT="-format raw" + FORMAT=",efitype=4m" + THIN="" + ;; +esac +for i in {0,1}; do + disk="DISK$i" + eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-} + eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk} +done + +msg_info "Creating a OPNsense VM" +qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ + -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci +pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null +qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null +qm set $VMID \ + -efidisk0 ${DISK0_REF}${FORMAT} \ + -scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \ + -boot order=scsi0 \ + -serial0 socket >/dev/null \ + -tags community-scripts +qm resize $VMID scsi0 10G >/dev/null + DESCRIPTION=$(cat < + + Logo + + +

OPNsense VM

+ +

+ + spend Coffee + +

+ + + + GitHub + + + + Discussions + + + + Issues + + +EOF +) + qm set "$VMID" -description "$DESCRIPTION" >/dev/null + +msg_info "Bridge interfaces are being added." +qm set $VMID \ + -net0 virtio,bridge=${BRG},macaddr=${MAC}${VLAN}${MTU} 2>/dev/null +msg_ok "Bridge interfaces have been successfully added." + +msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})" + msg_ok "Starting OPNsense VM (Patience this takes 20-30 minutes)" + qm start $VMID + sleep 90 + send_line_to_vm "root" + send_line_to_vm "fetch https://raw.githubusercontent.com/opnsense/update/master/src/bootstrap/opnsense-bootstrap.sh.in" + qm set $VMID \ + -net1 virtio,bridge=${WAN_BRG},macaddr=${WAN_MAC} &>/dev/null + sleep 10 + send_line_to_vm "sh ./opnsense-bootstrap.sh.in -y -f -r 25.1" + msg_ok "OPNsense VM is being installed, do not close the terminal, or the installation will fail." + #We need to wait for the OPNsense build proccess to finish, this takes a few minutes + sleep 1000 + send_line_to_vm "root" + send_line_to_vm "opnsense" + send_line_to_vm "2" + + if [ "$IP_ADDR" != "" ]; then + send_line_to_vm "1" + send_line_to_vm "n" + send_line_to_vm "${IP_ADDR}" + send_line_to_vm "${NETMASK}" + send_line_to_vm "${LAN_GW}" + send_line_to_vm "n" + send_line_to_vm " " + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm " " + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm "n" + else + send_line_to_vm "1" + send_line_to_vm "y" + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm " " + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm "n" + fi + #we need to wait for the Config changes to be saved + sleep 20 + if [ "$WAN_IP_ADDR" != "" ]; then + send_line_to_vm "2" + send_line_to_vm "2" + send_line_to_vm "n" + send_line_to_vm "${WAN_IP_ADDR}" + send_line_to_vm "${NETMASK}" + send_line_to_vm "${LAN_GW}" + send_line_to_vm "n" + send_line_to_vm " " + send_line_to_vm "n" + send_line_to_vm " " + send_line_to_vm "n" + send_line_to_vm "n" + send_line_to_vm "n" + fi + sleep 10 + send_line_to_vm "0" + msg_ok "Started OPNsense VM" + +msg_ok "Completed Successfully!\n" +if [ "$IP_ADDR" != "" ]; then + echo -e "${INFO}${YW} Access it using the following URL:${CL}" + echo -e "${TAB}${GATEWAY}${BGN}http://${IP_ADDR}${CL}" +else + echo -e "${INFO}${YW} LAN IP was DHCP.${CL}" + echo -e "${INFO}${BGN}To find the IP login to the VM shell${CL}" +fi diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index e004866c1..4c49e9a23 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -5,6 +5,8 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -17,6 +19,14 @@ EOF } header_info echo -e "\n Loading..." +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="turnkey-owncloud-vm" +var_os="owncloud" +var_version="12" +DISK_SIZE="12G" +# GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) NAME="TurnKey ownCloud VM" @@ -36,10 +46,13 @@ THIN="discard=on,ssd=1" set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "$command" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -91,7 +104,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -142,6 +155,7 @@ function default_settings() { VLAN="" MTU="" START_VM="no" + METHOD="default" echo -e "${DGN}Using Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}" echo -e "${DGN}Using Disk Cache: ${BGN}None${CL}" @@ -158,6 +172,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -340,6 +355,8 @@ pve_check ssh_check start_script +post_to_api_vm + msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') @@ -422,4 +439,5 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started $NAME" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 0db35f733..371034305 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -5,6 +5,8 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { cat <<"EOF" ____ _ __ ___ @@ -22,6 +24,14 @@ EOF clear header_info echo -e "Loading..." +#API VARIABLES +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="pimox-haos-vm" +var_os="pimox-haos" +var_version=" " +DISK_SIZE="32G" +# GEN_MAC=$(echo '00 60 2f'$(od -An -N3 -t xC /dev/urandom) | sed -e 's/ /:/g' | tr '[:lower:]' '[:upper:]') USEDID=$(pvesh get /cluster/resources --type vm --output-format yaml | egrep -i 'vmid' | awk '{print substr($2, 1, length($2)-0) }') NEXTID=$(pvesh get /cluster/nextid) @@ -48,11 +58,14 @@ shopt -s expand_aliases alias die='EXIT=$? LINE=$LINENO error_exit' trap die ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_exit() { trap - ERR local reason="Unknown failure occurred." local msg="${1:-$reason}" local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE" + post_update_to_api "failed" "unknown" echo -e "$flag $msg" 1>&2 [ ! -z ${VMID-} ] && cleanup_vmid exit $EXIT @@ -106,6 +119,7 @@ function msg_error() { } function default_settings() { + METHOD="default" echo -e "${DGN}Using HAOS Version: ${BGN}${STABLE}${CL}" BRANCH=${STABLE} echo -e "${DGN}Using Virtual Machine ID: ${BGN}$NEXTID${CL}" @@ -129,6 +143,7 @@ function default_settings() { echo -e "${BL}Creating a HAOS VM using the above default settings${CL}" } function advanced_settings() { + METHOD="advanced" BRANCH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \ "$STABLE" "Stable" ON \ "$BETA" "Beta" OFF \ @@ -250,6 +265,7 @@ function START_SCRIPT() { } ARCH_CHECK START_SCRIPT +post_to_api_vm while read -r line; do TAG=$(echo $line | awk '{print $1}') TYPE=$(echo $line | awk '{printf "%-10s", $2}') @@ -322,4 +338,5 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Home Assistant OS VM" fi +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" diff --git a/vm/ubuntu2204-vm.sh b/vm/ubuntu2204-vm.sh index 501321973..2da417537 100644 --- a/vm/ubuntu2204-vm.sh +++ b/vm/ubuntu2204-vm.sh @@ -4,6 +4,8 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -19,6 +21,11 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="ubuntu-2204-vm" +var_os="ubuntu" +var_version="2204" YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -56,10 +63,13 @@ THIN="discard=on,ssd=1," set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "$command" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -111,7 +121,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -164,6 +174,7 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}" echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}" @@ -181,6 +192,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -377,6 +389,7 @@ arch_check pve_check ssh_check start_script +post_to_api_vm msg_info "Validating Storage" while read -r line; do @@ -439,7 +452,7 @@ done msg_info "Creating a Ubuntu 22.04 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ @@ -493,7 +506,7 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Ubuntu 22.04 VM" fi - +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" echo -e "Setup Cloud-Init before starting \n More info at https://github.com/community-scripts/ProxmoxVE/discussions/272 \n" diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh index b6b18809b..acabade15 100644 --- a/vm/ubuntu2404-vm.sh +++ b/vm/ubuntu2404-vm.sh @@ -5,6 +5,8 @@ # License: MIT # https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -20,6 +22,11 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="ubuntu-2404-vm" +var_os="ubuntu" +var_version="2404" YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -57,10 +64,13 @@ THIN="discard=on,ssd=1," set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "$command" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -112,7 +122,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -165,6 +175,7 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}" echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}" @@ -182,6 +193,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -377,6 +389,7 @@ arch_check pve_check ssh_check start_script +post_to_api_vm msg_info "Validating Storage" while read -r line; do @@ -439,7 +452,7 @@ done msg_info "Creating a Ubuntu 24.04 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ @@ -493,7 +506,7 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Ubuntu 24.04 VM" fi - +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" echo -e "Setup Cloud-Init before starting \n More info at https://github.com/community-scripts/ProxmoxVE/discussions/272 \n" diff --git a/vm/ubuntu2410-vm.sh b/vm/ubuntu2410-vm.sh index a512d81d6..69e2f5359 100644 --- a/vm/ubuntu2410-vm.sh +++ b/vm/ubuntu2410-vm.sh @@ -4,6 +4,8 @@ # Author: MickLesk (CanbiZ) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + function header_info { clear cat <<"EOF" @@ -19,6 +21,11 @@ header_info echo -e "\n Loading..." GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//') NEXTID=$(pvesh get /cluster/nextid) +RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" +METHOD="" +NSAPP="ubuntu-2410-vm" +var_os="ubuntu" +var_version="2410" YW=$(echo "\033[33m") BL=$(echo "\033[36m") @@ -56,10 +63,13 @@ THIN="discard=on,ssd=1," set -e trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM function error_handler() { local exit_code="$?" local line_number="$1" local command="$2" + post_update_to_api "failed" "$command" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message\n" cleanup_vmid @@ -111,7 +121,7 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then + if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported" echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." @@ -164,6 +174,7 @@ function default_settings() { VLAN="" MTU="" START_VM="yes" + METHOD="default" echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}" echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}" @@ -181,6 +192,7 @@ function default_settings() { } function advanced_settings() { + METHOD="advanced" while true; do if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then if [ -z "$VMID" ]; then @@ -377,6 +389,7 @@ arch_check pve_check ssh_check start_script +post_to_api_vm msg_info "Validating Storage" while read -r line; do @@ -406,7 +419,7 @@ else fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." -msg_info "Retrieving the URL for the Ubuntu 24.0 Disk Image" +msg_info "Retrieving the URL for the Ubuntu 24.10 Disk Image" URL=https://cloud-images.ubuntu.com/oracular/current/oracular-server-cloudimg-amd64.img sleep 2 msg_ok "${CL}${BL}${URL}${CL}" @@ -439,7 +452,7 @@ done msg_info "Creating a Ubuntu 24.10 VM" qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ - -name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci + -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm set $VMID \ @@ -493,7 +506,7 @@ if [ "$START_VM" == "yes" ]; then qm start $VMID msg_ok "Started Ubuntu 24.10 VM" fi - +post_update_to_api "done" "none" msg_ok "Completed Successfully!\n" echo -e "Setup Cloud-Init before starting \n More info at https://github.com/community-scripts/ProxmoxVE/discussions/272 \n"