mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-07 16:29:18 +00:00
Compare commits
48 Commits
9383613029
...
df84bd6a09
Author | SHA1 | Date | |
---|---|---|---|
|
df84bd6a09 | ||
|
315949b446 | ||
|
531fe6b056 | ||
|
bcc6342f83 | ||
|
ca902c50fb | ||
|
69fe688418 | ||
|
2d9fcbb635 | ||
|
0573adc83c | ||
|
c0cf76f0d5 | ||
|
77d2df5a0f | ||
|
82ba836743 | ||
|
8c1b48453c | ||
|
ae0684b696 | ||
|
aab63c8db2 | ||
|
e7ac005592 | ||
|
6fb6c58454 | ||
|
0d63e66379 | ||
|
cfb755a862 | ||
|
4a60a29f1d | ||
|
ec27945abd | ||
|
d6ead654ad | ||
|
4f66476de5 | ||
|
e4354c1d53 | ||
|
8a6ea7cbac | ||
|
96d691c862 | ||
|
82ee63a6db | ||
|
102669cd11 | ||
|
ae120c1e23 | ||
|
c056dd97ea | ||
|
5b2cbd3e99 | ||
|
cadae9796e | ||
|
9eb5cc022a | ||
|
52898b4edf | ||
|
e45aba86bd | ||
|
be4e6503d7 | ||
|
59deaa0a19 | ||
|
a4803d178d | ||
|
259203ee51 | ||
|
944328625a | ||
|
3d38ad0288 | ||
|
c46f15cdc1 | ||
|
e2aa5fe627 | ||
|
493c2c931c | ||
|
ce545bd499 | ||
|
0ba2ea9183 | ||
|
cff3fa8696 | ||
|
871fd6517d | ||
|
3a876c99ef |
69
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
69
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -5,24 +5,44 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
**IMPORTANT:** Failure to comply with the following guidelines may result in immediate closure.
|
# 🐞 **Script Issue Report**
|
||||||
- Prior to submitting, kindly search the closed issues to check if the problem you are reporting has already been addressed and resolved. If you come across a closed issue that pertains to your problem, please leave a comment on that issue instead of creating a new one.
|
Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently.
|
||||||
- If the default Linux distribution is not adhered to, script support will be discontinued.
|
|
||||||
- When encountering the error message `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, make sure to run the script in verbose mode to accurately determine the underlying issue.
|
## ⚠️ **IMPORTANT**
|
||||||
- For suggestions, questions, or feature/script requests, please use the [Discussions section.](https://github.com/community-scripts/ProxmoxVE/discussions)
|
- 🔍 **Search first:** Before submitting, check if the issue has already been reported or resolved in [closed issues](https://github.com/community-scripts/ProxmoxVE/issues?q=is%3Aissue+is%3Aclosed). If found, comment on that issue instead of creating a new one.
|
||||||
|
Alternatively, check the **[Discussions](https://github.com/community-scripts/ProxmoxVE/discussions)** under the *"Announcement"* or *"Guide"* categories for relevant information.
|
||||||
|
- 🛠️ **Supported environments only:** Ensure you are using a default Linux distribution. Custom setups may not be supported.
|
||||||
|
- 🔎 If you encounter `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, rerun the script with verbose mode before submitting the issue.
|
||||||
|
- 💡 For general questions, feature requests, or suggestions, use the [Discussions section](https://github.com/community-scripts/ProxmoxVE/discussions).
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: guidelines
|
id: guidelines
|
||||||
attributes:
|
attributes:
|
||||||
label: Please verify that you have read and understood the guidelines.
|
label: ✅ Have you read and understood the above guidelines?
|
||||||
placeholder: "yes"
|
placeholder: "yes"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: input
|
||||||
id: bug
|
id: script_name
|
||||||
attributes:
|
attributes:
|
||||||
label: A clear and concise description of the issue.
|
label: 📜 What is the name of the script you are using?
|
||||||
|
placeholder: "e.g., NextcloudPi, Zigbee2MQTT"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: script_command
|
||||||
|
attributes:
|
||||||
|
label: 📂 What was the exact command used to execute the script?
|
||||||
|
placeholder: "e.g., bash -c \"$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zigbee2mqtt.sh)\" or \"update\""
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: issue_description
|
||||||
|
attributes:
|
||||||
|
label: 📝 Provide a clear and concise description of the issue.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@ -30,19 +50,19 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
attributes:
|
attributes:
|
||||||
label: What settings are you currently utilizing?
|
label: ⚙️ What settings are you using?
|
||||||
options:
|
options:
|
||||||
- label: Default Settings
|
- label: Default Settings
|
||||||
- label: Advanced Settings
|
- label: Advanced Settings
|
||||||
|
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: "If using Advanced Settings, please try Default Settings before creating an issue."
|
value: "💡 **Tip:** If you are using Advanced Settings, please test with Default Settings before submitting an issue."
|
||||||
|
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: distribution
|
id: linux_distribution
|
||||||
attributes:
|
attributes:
|
||||||
label: Which Linux distribution are you employing?
|
label: 🖥️ Which Linux distribution are you using?
|
||||||
options:
|
options:
|
||||||
-
|
-
|
||||||
- Alpine
|
- Alpine
|
||||||
@ -51,21 +71,30 @@ body:
|
|||||||
- Ubuntu 20.04
|
- Ubuntu 20.04
|
||||||
- Ubuntu 22.04
|
- Ubuntu 22.04
|
||||||
- Ubuntu 24.04
|
- Ubuntu 24.04
|
||||||
|
- Ubuntu 24.10
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: screenshot
|
id: steps_to_reproduce
|
||||||
attributes:
|
attributes:
|
||||||
label: If relevant, including screenshots or a code block can be helpful in clarifying the issue.
|
label: 🔄 Steps to reproduce the issue.
|
||||||
placeholder: "Code blocks begin and conclude by enclosing the code with three backticks (```) above and below it."
|
placeholder: "e.g., Step 1: ..., Step 2: ..."
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: reproduce
|
id: error_output
|
||||||
attributes:
|
attributes:
|
||||||
label: Please provide detailed steps to reproduce the issue.
|
label: ❌ Paste the full error output (if available).
|
||||||
placeholder: "First do this, then this ..."
|
placeholder: "Include any relevant logs or error messages."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional_context
|
||||||
|
attributes:
|
||||||
|
label: 🖼️ Additional context (optional).
|
||||||
|
placeholder: "Include screenshots, code blocks (use triple backticks ```), or any other relevant information."
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
44
.github/pull_request_template.md
vendored
44
.github/pull_request_template.md
vendored
@ -1,31 +1,39 @@
|
|||||||
> [!NOTE]
|
> **🛠️ Note:**
|
||||||
> We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.
|
> We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal!
|
||||||
|
> 🎮 **Note for game-related scripts:** These have a lower likelihood of being merged.
|
||||||
|
|
||||||
## Description
|
---
|
||||||
|
|
||||||
|
## ✍️ Description
|
||||||
Provide a summary of the changes made and/or reference the issue being addressed.
|
Provide a summary of the changes made and/or reference the issue being addressed.
|
||||||
|
|
||||||
Fixes # (issue)
|
-
|
||||||
|
|
||||||
## Type of change
|
- - -
|
||||||
Please check the relevant option(s):
|
|
||||||
|
|
||||||
|
- Related Issue: # (issue number, if applicable)
|
||||||
|
- Related PR: # (if applicable)
|
||||||
|
- Related Discussion: [Link](https://github.com/community-scripts/ProxmoxVE/discussions)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛠️ Type of Change
|
||||||
|
Please check the relevant options:
|
||||||
- [ ] Bug fix (non-breaking change that resolves an issue)
|
- [ ] Bug fix (non-breaking change that resolves an issue)
|
||||||
- [ ] New feature (non-breaking change that adds functionality)
|
- [ ] New feature (non-breaking change that adds functionality)
|
||||||
- [ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
|
- [ ] 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.)
|
- [ ] New script (a fully functional and thoroughly tested script or set of scripts)
|
||||||
|
|
||||||
## Prerequisites
|
---
|
||||||
The following efforts must be made for the PR to be considered. Please check when completed:
|
|
||||||
- [ ] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
|
## ✅ Prerequisites
|
||||||
- [ ] Testing performed (I have tested my changes, ensuring everything works as expected)
|
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.)
|
||||||
- [ ] Documentation updated (I have updated any relevant documentation)
|
- [ ] Documentation updated (I have updated any relevant documentation)
|
||||||
|
|
||||||
## Additional Information (optional)
|
---
|
||||||
Provide any additional context or screenshots about the feature or fix here.
|
|
||||||
|
|
||||||
|
## 📋 Additional Information (optional)
|
||||||
|
Provide any extra context or screenshots about the feature or fix here.
|
||||||
|
|
||||||
## Related Pull Requests / Discussions
|
|
||||||
|
|
||||||
If there are other pull requests or discussions related to this change, please link them here:
|
|
||||||
- Related PR #
|
|
||||||
|
1
.github/workflows/changelog-pr.yml
vendored
1
.github/workflows/changelog-pr.yml
vendored
@ -63,6 +63,7 @@ jobs:
|
|||||||
const { data: pulls } = await github.rest.pulls.list({
|
const { data: pulls } = await github.rest.pulls.list({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
base: "main",
|
||||||
state: "closed",
|
state: "closed",
|
||||||
sort: "updated",
|
sort: "updated",
|
||||||
direction: "desc",
|
direction: "desc",
|
||||||
|
79
.github/workflows/deploy-pages.yml
vendored
79
.github/workflows/deploy-pages.yml
vendored
@ -1,79 +0,0 @@
|
|||||||
# Sample workflow for building and deploying a Next.js site to GitHub Pages
|
|
||||||
#
|
|
||||||
# To get started with Next.js see: https://nextjs.org/docs/getting-started
|
|
||||||
#
|
|
||||||
name: Deploy Next.js site to Pages
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
paths:
|
|
||||||
- frontend/**
|
|
||||||
- json/**
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: "pages"
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: frontend # Set default working directory for all run steps
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Detect package manager
|
|
||||||
id: detect-package-manager
|
|
||||||
run: |
|
|
||||||
if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then
|
|
||||||
echo "manager=yarn" >> $GITHUB_OUTPUT
|
|
||||||
echo "command=install" >> $GITHUB_OUTPUT
|
|
||||||
echo "runner=yarn" >> $GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then
|
|
||||||
echo "manager=npm" >> $GITHUB_OUTPUT
|
|
||||||
echo "command=ci" >> $GITHUB_OUTPUT
|
|
||||||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "Unable to determine package manager"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "20"
|
|
||||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
|
||||||
cache-dependency-path: frontend/package-lock.json # Specify the path to package-lock.json
|
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v5
|
|
||||||
with:
|
|
||||||
static_site_generator: next
|
|
||||||
- name: Install dependencies
|
|
||||||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} --legacy-peer-deps
|
|
||||||
- name: Build with Next.js
|
|
||||||
run: ${{ steps.detect-package-manager.outputs.runner }} next build
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-pages-artifact@v3
|
|
||||||
with:
|
|
||||||
path: frontend/out
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v4
|
|
78
.github/workflows/frontend-cicd.yml
vendored
Normal file
78
.github/workflows/frontend-cicd.yml
vendored
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
# Based on https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml
|
||||||
|
|
||||||
|
name: Frontend CI/CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- frontend/**
|
||||||
|
- json/**
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
types: [opened, synchronize, reopened, edited]
|
||||||
|
paths:
|
||||||
|
- frontend/**
|
||||||
|
- json/**
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: pages-${{ github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: frontend # Set default working directory for all run steps
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: frontend/package-lock.json
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci --prefer-offline --legacy-peer-deps
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: npm run test
|
||||||
|
|
||||||
|
- name: Configure Next.js for pages
|
||||||
|
uses: actions/configure-pages@v5
|
||||||
|
with:
|
||||||
|
static_site_generator: next
|
||||||
|
|
||||||
|
- name: Build with Next.js
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: frontend/out
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
107
CHANGELOG.md
107
CHANGELOG.md
@ -16,6 +16,107 @@ All LXC instances created using this repository come pre-installed with Midnight
|
|||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||||
|
|
||||||
|
## 2024-12-13
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Fix Keycloak Update Function [@MickLesk](https://github.com/MickLesk) ([#762](https://github.com/community-scripts/ProxmoxVE/pull/762))
|
||||||
|
- Fix config bug in Alpine Vaultwarden [@havardthom](https://github.com/havardthom) ([#775](https://github.com/community-scripts/ProxmoxVE/pull/775))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Change MISC from red to green [@MickLesk](https://github.com/MickLesk) ([#815](https://github.com/community-scripts/ProxmoxVE/pull/815))
|
||||||
|
- Update some JSON Files for Website [@MickLesk](https://github.com/MickLesk) ([#812](https://github.com/community-scripts/ProxmoxVE/pull/812))
|
||||||
|
- Update Notes & Documentation for Proxmox Backup Server [@MickLesk](https://github.com/MickLesk) ([#804](https://github.com/community-scripts/ProxmoxVE/pull/804))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- Github: Optimize Issue Template & PR Template [@MickLesk](https://github.com/MickLesk) ([#802](https://github.com/community-scripts/ProxmoxVE/pull/802))
|
||||||
|
|
||||||
|
## 2024-12-12
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Update jellyfin.sh / Fix infinite loop [@gerpo](https://github.com/gerpo) ([#792](https://github.com/community-scripts/ProxmoxVE/pull/792))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Fix port and website in nextcloudpi.json [@PhoenixEmik](https://github.com/PhoenixEmik) ([#790](https://github.com/community-scripts/ProxmoxVE/pull/790))
|
||||||
|
- Add post-install note to mqtt.json [@havardthom](https://github.com/havardthom) ([#783](https://github.com/community-scripts/ProxmoxVE/pull/783))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- Filter pull requests on main branch in changelog-pr.yml [@havardthom](https://github.com/havardthom) ([#793](https://github.com/community-scripts/ProxmoxVE/pull/793))
|
||||||
|
- Fix Z-Wave JS UI Breaking Change in CHANGELOG.md [@havardthom](https://github.com/havardthom) ([#781](https://github.com/community-scripts/ProxmoxVE/pull/781))
|
||||||
|
|
||||||
|
## 2024-12-09
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Fix PostgreSQL password bug in Umami install [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#750](https://github.com/community-scripts/ProxmoxVE/pull/750))
|
||||||
|
|
||||||
|
## 2024-12-08
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Use MongoDB 4.4 in Unifi for non-AVX users [@havardthom](https://github.com/havardthom) ([#691](https://github.com/community-scripts/ProxmoxVE/pull/691))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Move homarr to Dashboards section [@CrazyWolf13](https://github.com/CrazyWolf13) ([#740](https://github.com/community-scripts/ProxmoxVE/pull/740))
|
||||||
|
|
||||||
|
## 2024-12-07
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Zigbee2MQTT: Remove dev branch choice until v2.0.0 release [@havardthom](https://github.com/havardthom) ([#702](https://github.com/community-scripts/ProxmoxVE/pull/702))
|
||||||
|
- Fix Hoarder build failure by installing Chromium stable [@vhsdream](https://github.com/vhsdream) ([#723](https://github.com/community-scripts/ProxmoxVE/pull/723))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Bugfix: Include script name in website search [@havardthom](https://github.com/havardthom) ([#731](https://github.com/community-scripts/ProxmoxVE/pull/731))
|
||||||
|
|
||||||
|
### ❔ Unlabelled
|
||||||
|
|
||||||
|
- Fix broken build.func [@havardthom](https://github.com/havardthom) ([#736](https://github.com/community-scripts/ProxmoxVE/pull/736))
|
||||||
|
|
||||||
|
## 2024-12-06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- Fix bugs in Komga update [@DysfunctionalProgramming](https://github.com/DysfunctionalProgramming) ([#717](https://github.com/community-scripts/ProxmoxVE/pull/717))
|
||||||
|
- Bookstack: Fix Update function composer [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#700](https://github.com/community-scripts/ProxmoxVE/pull/700))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- fix: note component in json-editor getting out of focus when typing and revert theme switch animation [@BramSuurdje](https://github.com/BramSuurdje) ([#706](https://github.com/community-scripts/ProxmoxVE/pull/706))
|
||||||
|
|
||||||
|
### 🧰 Maintenance
|
||||||
|
|
||||||
|
- Update frontend CI/CD workflow [@havardthom](https://github.com/havardthom) ([#703](https://github.com/community-scripts/ProxmoxVE/pull/703))
|
||||||
|
|
||||||
|
## 2024-12-05
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- PostgreSQL: Change authentication method from peer to md5 for UNIX sockets [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#650](https://github.com/community-scripts/ProxmoxVE/pull/650))
|
||||||
|
- Fix stdout in unifi.sh [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#688](https://github.com/community-scripts/ProxmoxVE/pull/688))
|
||||||
|
- Fix `rm` bug in Vikunja update [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#692](https://github.com/community-scripts/ProxmoxVE/pull/692))
|
||||||
|
|
||||||
## 2024-12-04
|
## 2024-12-04
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
@ -94,13 +195,17 @@ Do not break established syntax in this file, as it is automatically updated by
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
### 💥 Breaking Changes
|
||||||
|
|
||||||
|
- Fix Z-Wave JS UI script [@MickLesk](https://github.com/MickLesk) ([#546](https://github.com/community-scripts/ProxmoxVE/pull/546))
|
||||||
|
- [Migration guide](https://github.com/community-scripts/ProxmoxVE/discussions/635)
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
- Add vitest, add json validation tests, fix broken json files [@havardthom](https://github.com/havardthom) ([#566](https://github.com/community-scripts/ProxmoxVE/pull/566))
|
- Add vitest, add json validation tests, fix broken json files [@havardthom](https://github.com/havardthom) ([#566](https://github.com/community-scripts/ProxmoxVE/pull/566))
|
||||||
- Add update script to Pocketbase [@dsiebel](https://github.com/dsiebel) ([#535](https://github.com/community-scripts/ProxmoxVE/pull/535))
|
- Add update script to Pocketbase [@dsiebel](https://github.com/dsiebel) ([#535](https://github.com/community-scripts/ProxmoxVE/pull/535))
|
||||||
- Fix MongoDB install in Unifi script [@havardthom](https://github.com/havardthom) ([#564](https://github.com/community-scripts/ProxmoxVE/pull/564))
|
- Fix MongoDB install in Unifi script [@havardthom](https://github.com/havardthom) ([#564](https://github.com/community-scripts/ProxmoxVE/pull/564))
|
||||||
- Remove changing DISK_REF for zfspool mikrotik-routeros.sh [@tjcomserv](https://github.com/tjcomserv) ([#529](https://github.com/community-scripts/ProxmoxVE/pull/529))
|
- Remove changing DISK_REF for zfspool mikrotik-routeros.sh [@tjcomserv](https://github.com/tjcomserv) ([#529](https://github.com/community-scripts/ProxmoxVE/pull/529))
|
||||||
- Fix Z-Wave JS UI script [@MickLesk](https://github.com/MickLesk) ([#546](https://github.com/community-scripts/ProxmoxVE/pull/546))
|
|
||||||
|
|
||||||
### 🌐 Website
|
### 🌐 Website
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
|
# Co-Author: MickLesk
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
@ -9,15 +10,25 @@
|
|||||||
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
|
# if [ "$VERBOSE" == "yes" ]; then set -x; fi
|
||||||
|
|
||||||
# This function sets color variables for formatting output in the terminal
|
# This function sets color variables for formatting output in the terminal
|
||||||
|
# Colors
|
||||||
YW=$(echo "\033[33m")
|
YW=$(echo "\033[33m")
|
||||||
|
YWB=$(echo "\033[93m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
RD=$(echo "\033[01;31m")
|
RD=$(echo "\033[01;31m")
|
||||||
GN=$(echo "\033[1;92m")
|
GN=$(echo "\033[1;92m")
|
||||||
|
|
||||||
|
# Formatting
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
CM="${GN}✓${CL}"
|
UL=$(echo "\033[4m")
|
||||||
CROSS="${RD}✗${CL}"
|
BOLD=$(echo "\033[1m")
|
||||||
BFR="\\r\\033[K"
|
BFR="\\r\\033[K"
|
||||||
HOLD=" "
|
HOLD=" "
|
||||||
|
TAB=" "
|
||||||
|
|
||||||
|
# Icons
|
||||||
|
CM="${TAB}✔️${TAB}${CL}"
|
||||||
|
CROSS="${TAB}✖️${TAB}${CL}"
|
||||||
|
INFO="${TAB}💡${TAB}${CL}"
|
||||||
|
|
||||||
# This sets error handling options and defines the error_handler function to handle errors
|
# This sets error handling options and defines the error_handler function to handle errors
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
@ -36,19 +47,24 @@ function error_handler() {
|
|||||||
|
|
||||||
# This function displays a spinner.
|
# This function displays a spinner.
|
||||||
function spinner() {
|
function spinner() {
|
||||||
local chars="/-\|"
|
local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||||
local spin_i=0
|
local spin_i=0
|
||||||
printf "\e[?25l"
|
local interval=0.1
|
||||||
while true; do
|
printf "\e[?25l"
|
||||||
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
|
|
||||||
sleep 0.1
|
local color="${YWB}"
|
||||||
done
|
|
||||||
|
while true; do
|
||||||
|
printf "\r ${color}%s${CL}" "${frames[spin_i]}"
|
||||||
|
spin_i=$(( (spin_i + 1) % ${#frames[@]} ))
|
||||||
|
sleep "$interval"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function displays an informational message with a yellow color.
|
# This function displays an informational message with a yellow color.
|
||||||
function msg_info() {
|
function msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${HOLD} ${YW}${msg} "
|
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||||
spinner &
|
spinner &
|
||||||
SPINNER_PID=$!
|
SPINNER_PID=$!
|
||||||
}
|
}
|
||||||
@ -58,7 +74,7 @@ function msg_ok() {
|
|||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function displays a error message with a red color.
|
# This function displays a error message with a red color.
|
||||||
@ -66,7 +82,7 @@ function msg_error() {
|
|||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This checks for the presence of valid Container Storage and Template Storage locations
|
# This checks for the presence of valid Container Storage and Template Storage locations
|
||||||
@ -105,7 +121,7 @@ function select_storage() {
|
|||||||
local TAG=$(echo $line | awk '{print $1}')
|
local TAG=$(echo $line | awk '{print $1}')
|
||||||
local TYPE=$(echo $line | awk '{printf "%-10s", $2}')
|
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 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 ITEM="Type: $TYPE Free: $FREE "
|
||||||
local OFFSET=2
|
local OFFSET=2
|
||||||
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
|
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
|
||||||
local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
|
local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
|
||||||
@ -123,11 +139,14 @@ function select_storage() {
|
|||||||
"Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \
|
"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 \
|
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||||
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted."
|
"${MENU[@]}" 3>&1 1>&2 2>&3) || exit "Menu aborted."
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "${CROSS}${RD} Menu aborted by user.${CL}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
printf $STORAGE
|
printf "%s" "$STORAGE"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test if required variables are set
|
# Test if required variables are set
|
||||||
[[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable."
|
[[ "${CTID:-}" ]] || exit "You need to set 'CTID' variable."
|
||||||
[[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable."
|
[[ "${PCT_OSTYPE:-}" ]] || exit "You need to set 'PCT_OSTYPE' variable."
|
||||||
|
@ -39,18 +39,14 @@ function update_script() {
|
|||||||
apt-get -y upgrade &>/dev/null
|
apt-get -y upgrade &>/dev/null
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
msg_info "Downloading Keycloak v$RELEASE"
|
msg_info "Updating Keycloak to v$RELEASE"
|
||||||
cd /opt
|
cd /opt
|
||||||
wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz
|
wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz
|
||||||
$STD tar -xvf keycloak-$RELEASE.tar.gz
|
|
||||||
|
|
||||||
msg_info "Merging configuration files"
|
|
||||||
cp -r keycloak/conf keycloak-$RELEASE
|
|
||||||
cp -r keycloak/providers keycloak-$RELEASE
|
|
||||||
cp -r keycloak/themes keycloak-$RELEASE
|
|
||||||
|
|
||||||
msg_info "Updating Keycloak"
|
|
||||||
mv keycloak keycloak.old
|
mv keycloak keycloak.old
|
||||||
|
tar -xzf keycloak-$RELEASE.tar.gz
|
||||||
|
cp -r keycloak.old/conf keycloak-$RELEASE
|
||||||
|
cp -r keycloak.old/providers keycloak-$RELEASE
|
||||||
|
cp -r keycloak.old/themes keycloak-$RELEASE
|
||||||
mv keycloak-$RELEASE keycloak
|
mv keycloak-$RELEASE keycloak
|
||||||
|
|
||||||
msg_info "Delete temporary installation files"
|
msg_info "Delete temporary installation files"
|
||||||
|
@ -12,7 +12,7 @@ import { cn } from "@/lib/utils";
|
|||||||
import { PlusCircle, Trash2 } from "lucide-react";
|
import { PlusCircle, Trash2 } from "lucide-react";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { ScriptSchema, type Script } from "../_schemas/schemas";
|
import { ScriptSchema, type Script } from "../_schemas/schemas";
|
||||||
import { memo, useCallback } from "react";
|
import { memo, useCallback, useRef } from "react";
|
||||||
|
|
||||||
type NoteProps = {
|
type NoteProps = {
|
||||||
script: Script;
|
script: Script;
|
||||||
@ -27,6 +27,8 @@ function Note({
|
|||||||
setIsValid,
|
setIsValid,
|
||||||
setZodErrors,
|
setZodErrors,
|
||||||
}: NoteProps) {
|
}: NoteProps) {
|
||||||
|
const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
|
||||||
|
|
||||||
const addNote = useCallback(() => {
|
const addNote = useCallback(() => {
|
||||||
setScript({
|
setScript({
|
||||||
...script,
|
...script,
|
||||||
@ -49,6 +51,12 @@ function Note({
|
|||||||
setIsValid(result.success);
|
setIsValid(result.success);
|
||||||
setZodErrors(result.success ? null : result.error);
|
setZodErrors(result.success ? null : result.error);
|
||||||
setScript(updated);
|
setScript(updated);
|
||||||
|
// Restore focus after state update
|
||||||
|
if (key === "text") {
|
||||||
|
setTimeout(() => {
|
||||||
|
inputRefs.current[index]?.focus();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
}, [script, setScript, setIsValid, setZodErrors]);
|
}, [script, setScript, setIsValid, setZodErrors]);
|
||||||
|
|
||||||
const removeNote = useCallback((index: number) => {
|
const removeNote = useCallback((index: number) => {
|
||||||
@ -58,46 +66,51 @@ function Note({
|
|||||||
});
|
});
|
||||||
}, [script, setScript]);
|
}, [script, setScript]);
|
||||||
|
|
||||||
const NoteItem = memo(({ note, index }: { note: Script["notes"][number], index: number }) => (
|
const NoteItem = memo(
|
||||||
<div className="space-y-2 border p-4 rounded">
|
({ note, index }: { note: Script["notes"][number]; index: number }) => (
|
||||||
<Input
|
<div className="space-y-2 border p-4 rounded">
|
||||||
placeholder="Note Text"
|
<Input
|
||||||
value={note.text}
|
placeholder="Note Text"
|
||||||
onChange={(e) => updateNote(index, "text", e.target.value)}
|
value={note.text}
|
||||||
/>
|
onChange={(e) => updateNote(index, "text", e.target.value)}
|
||||||
<Select
|
ref={(el) => {
|
||||||
value={note.type}
|
inputRefs.current[index] = el;
|
||||||
onValueChange={(value) => updateNote(index, "type", value)}
|
}}
|
||||||
>
|
/>
|
||||||
<SelectTrigger className="flex-1">
|
<Select
|
||||||
<SelectValue placeholder="Type" />
|
value={note.type}
|
||||||
</SelectTrigger>
|
onValueChange={(value) => updateNote(index, "type", value)}
|
||||||
<SelectContent>
|
>
|
||||||
{Object.keys(AlertColors).map((type) => (
|
<SelectTrigger className="flex-1">
|
||||||
<SelectItem key={type} value={type}>
|
<SelectValue placeholder="Type" />
|
||||||
<span className="flex items-center gap-2">
|
</SelectTrigger>
|
||||||
{type.charAt(0).toUpperCase() + type.slice(1)}{" "}
|
<SelectContent>
|
||||||
<div
|
{Object.keys(AlertColors).map((type) => (
|
||||||
className={cn(
|
<SelectItem key={type} value={type}>
|
||||||
"size-4 rounded-full border",
|
<span className="flex items-center gap-2">
|
||||||
AlertColors[type as keyof typeof AlertColors],
|
{type.charAt(0).toUpperCase() + type.slice(1)}{" "}
|
||||||
)}
|
<div
|
||||||
/>
|
className={cn(
|
||||||
</span>
|
"size-4 rounded-full border",
|
||||||
</SelectItem>
|
AlertColors[type as keyof typeof AlertColors],
|
||||||
))}
|
)}
|
||||||
</SelectContent>
|
/>
|
||||||
</Select>
|
</span>
|
||||||
<Button
|
</SelectItem>
|
||||||
size="sm"
|
))}
|
||||||
variant="destructive"
|
</SelectContent>
|
||||||
type="button"
|
</Select>
|
||||||
onClick={() => removeNote(index)}
|
<Button
|
||||||
>
|
size="sm"
|
||||||
<Trash2 className="mr-2 h-4 w-4" /> Remove Note
|
variant="destructive"
|
||||||
</Button>
|
type="button"
|
||||||
</div>
|
onClick={() => removeNote(index)}
|
||||||
));
|
>
|
||||||
|
<Trash2 className="mr-2 h-4 w-4" /> Remove Note
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
NoteItem.displayName = 'NoteItem';
|
NoteItem.displayName = 'NoteItem';
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ export const formattedBadge = (type: string) => {
|
|||||||
<Badge className="text-yellow-500/75 border-yellow-500/75">LXC</Badge>
|
<Badge className="text-yellow-500/75 border-yellow-500/75">LXC</Badge>
|
||||||
);
|
);
|
||||||
case "misc":
|
case "misc":
|
||||||
return <Badge className="text-red-500/75 border-red-500/75">MISC</Badge>;
|
return <Badge className="text-green-500/75 border-green-500/75">MISC</Badge>;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
@ -95,7 +95,7 @@ export default function CommandMenu() {
|
|||||||
{category.scripts.map((script) => (
|
{category.scripts.map((script) => (
|
||||||
<CommandItem
|
<CommandItem
|
||||||
key={`script:${script.slug}`}
|
key={`script:${script.slug}`}
|
||||||
value={script.slug}
|
value={`${script.slug}-${script.name}`}
|
||||||
onSelect={() => {
|
onSelect={() => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
router.push(`/scripts?id=${script.slug}`);
|
router.push(`/scripts?id=${script.slug}`);
|
||||||
|
@ -30,24 +30,6 @@
|
|||||||
--chart-3: 197 37% 24%;
|
--chart-3: 197 37% 24%;
|
||||||
--chart-4: 43 74% 66%;
|
--chart-4: 43 74% 66%;
|
||||||
--chart-5: 27 87% 67%;
|
--chart-5: 27 87% 67%;
|
||||||
--expo-out: linear(
|
|
||||||
0 0%,
|
|
||||||
0.1684 2.66%,
|
|
||||||
0.3165 5.49%,
|
|
||||||
0.446 8.52%,
|
|
||||||
0.5581 11.78%,
|
|
||||||
0.6535 15.29%,
|
|
||||||
0.7341 19.11%,
|
|
||||||
0.8011 23.3%,
|
|
||||||
0.8557 27.93%,
|
|
||||||
0.8962 32.68%,
|
|
||||||
0.9283 38.01%,
|
|
||||||
0.9529 44.08%,
|
|
||||||
0.9711 51.14%,
|
|
||||||
0.9833 59.06%,
|
|
||||||
0.9915 68.74%,
|
|
||||||
1 100%
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::selection {
|
::selection {
|
||||||
@ -81,42 +63,6 @@
|
|||||||
--chart-4: 280 65% 60%;
|
--chart-4: 280 65% 60%;
|
||||||
--chart-5: 340 75% 55%;
|
--chart-5: 340 75% 55%;
|
||||||
}
|
}
|
||||||
|
|
||||||
::view-transition-group(root) {
|
|
||||||
animation-duration: 0.7bun s;
|
|
||||||
animation-timing-function: var(--expo-out);
|
|
||||||
}
|
|
||||||
|
|
||||||
::view-transition-new(root) {
|
|
||||||
animation-name: reveal-light;
|
|
||||||
}
|
|
||||||
|
|
||||||
::view-transition-old(root),
|
|
||||||
.dark::view-transition-old(root) {
|
|
||||||
animation: none;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
.dark::view-transition-new(root) {
|
|
||||||
animation-name: reveal-dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes reveal-dark {
|
|
||||||
from {
|
|
||||||
clip-path: polygon(50% -71%, -50% 71%, -50% 71%, 50% -71%);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
clip-path: polygon(50% -71%, -50% 71%, 50% 171%, 171% 50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes reveal-light {
|
|
||||||
from {
|
|
||||||
clip-path: polygon(171% 50%, 50% 171%, 50% 171%, 171% 50%);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
clip-path: polygon(171% 50%, 50% 171%, -50% 71%, 50% -71%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
|
@ -25,7 +25,9 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
msg_info "Installing Alpine-Vaultwarden"
|
msg_info "Installing Alpine-Vaultwarden"
|
||||||
$STD apk add vaultwarden
|
$STD apk add vaultwarden
|
||||||
sed -i -e 's/# export ADMIN_TOKEN=.*/export ADMIN_TOKEN='\'''\''/' -e '/^# export ROCKET_ADDRESS=0\.0\.0\.0/s/^# //' -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden
|
sed -i -e 's|export WEB_VAULT_ENABLED=.*|export WEB_VAULT_ENABLED=true|' /etc/conf.d/vaultwarden
|
||||||
|
echo -e "export ADMIN_TOKEN=''" >>/etc/conf.d/vaultwarden
|
||||||
|
echo -e "export ROCKET_ADDRESS=0.0.0.0" >>/etc/conf.d/vaultwarden
|
||||||
msg_ok "Installed Alpine-Vaultwarden"
|
msg_ok "Installed Alpine-Vaultwarden"
|
||||||
|
|
||||||
msg_info "Installing Web-Vault"
|
msg_info "Installing Web-Vault"
|
||||||
|
@ -22,7 +22,8 @@ $STD apt-get install -y \
|
|||||||
sudo \
|
sudo \
|
||||||
gnupg \
|
gnupg \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
chromium \
|
chromium/stable \
|
||||||
|
chromium-common/stable \
|
||||||
mc
|
mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
|
|||||||
local all postgres peer
|
local all postgres peer
|
||||||
# TYPE DATABASE USER ADDRESS METHOD
|
# TYPE DATABASE USER ADDRESS METHOD
|
||||||
# "local" is for Unix domain socket connections only
|
# "local" is for Unix domain socket connections only
|
||||||
local all all peer
|
local all all md5
|
||||||
# IPv4 local connections:
|
# IPv4 local connections:
|
||||||
host all all 127.0.0.1/32 scram-sha-256
|
host all all 127.0.0.1/32 scram-sha-256
|
||||||
host all all 0.0.0.0/24 md5
|
host all all 0.0.0.0/24 md5
|
||||||
|
@ -37,7 +37,7 @@ msg_ok "Installed Node.js"
|
|||||||
msg_info "Setting up postgresql"
|
msg_info "Setting up postgresql"
|
||||||
DB_NAME=umamidb
|
DB_NAME=umamidb
|
||||||
DB_USER=umami
|
DB_USER=umami
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
|
@ -30,16 +30,15 @@ msg_ok "Installed Eclipse Temurin JRE"
|
|||||||
|
|
||||||
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
|
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
|
||||||
msg_ok "No AVX Support Detected"
|
msg_ok "No AVX Support Detected"
|
||||||
msg_info "Installing MongoDB 4.2"
|
msg_info "Installing MongoDB 4.4"
|
||||||
if ! dpkg -l | grep -q "libssl1.1"; then
|
if ! dpkg -l | grep -q "libssl1.1"; then
|
||||||
wget -q http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_amd64.deb
|
wget -q http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_amd64.deb
|
||||||
$STD dpkg -i libssl1.1_1.1.1n-0+deb10u6_amd64.deb
|
$STD dpkg -i libssl1.1_1.1.1n-0+deb10u6_amd64.deb
|
||||||
$STD apt-get install -f -y # Fix any broken dependencies
|
|
||||||
fi
|
fi
|
||||||
wget -qO- https://www.mongodb.org/static/pgp/server-4.2.asc | gpg --dearmor > /usr/share/keyrings/mongodb-server-4.2.gpg
|
wget -qO- https://www.mongodb.org/static/pgp/server-4.4.asc | gpg --dearmor > /usr/share/keyrings/mongodb-server-4.4.gpg
|
||||||
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-4.2.gpg] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" >/etc/apt/sources.list.d/mongodb-org-4.2.list
|
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" >/etc/apt/sources.list.d/mongodb-org-4.4.list
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y mongodb-org=4.2.17
|
$STD apt-get install -y mongodb-org
|
||||||
else
|
else
|
||||||
msg_info "Installing MongoDB 7.0"
|
msg_info "Installing MongoDB 7.0"
|
||||||
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
|
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
|
||||||
|
@ -40,20 +40,8 @@ msg_info "Setting up Zigbee2MQTT Repository"
|
|||||||
$STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
|
$STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
|
||||||
msg_ok "Set up Zigbee2MQTT Repository"
|
msg_ok "Set up Zigbee2MQTT Repository"
|
||||||
|
|
||||||
read -r -p "Switch to Edge/dev branch? (y/N) " prompt
|
|
||||||
if [[ $prompt == "y" ]]; then
|
|
||||||
DEV="y"
|
|
||||||
else
|
|
||||||
DEV="n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Installing Zigbee2MQTT"
|
msg_info "Installing Zigbee2MQTT"
|
||||||
cd /opt/zigbee2mqtt
|
cd /opt/zigbee2mqtt
|
||||||
if [[ $DEV == "y" ]]; then
|
|
||||||
$STD git fetch origin dev:dev
|
|
||||||
$STD git checkout dev
|
|
||||||
$STD git pull
|
|
||||||
fi
|
|
||||||
$STD npm ci
|
$STD npm ci
|
||||||
msg_ok "Installed Zigbee2MQTT"
|
msg_ok "Installed Zigbee2MQTT"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 5006,
|
"interface_port": 5006,
|
||||||
"documentation": null,
|
"documentation": "https://github.com/community-scripts/ProxmoxVE/discussions/807",
|
||||||
"website": "https://actualbudget.org/",
|
"website": "https://actualbudget.org/",
|
||||||
"logo": "https://raw.githubusercontent.com/actualbudget/actual/master/packages/desktop-client/public/maskable-512x512.png",
|
"logo": "https://raw.githubusercontent.com/actualbudget/actual/master/packages/desktop-client/public/maskable-512x512.png",
|
||||||
"description": "Actual Budget is a super fast and privacy-focused app for managing your finances. At its heart is the well proven and much loved Envelope Budgeting methodology.",
|
"description": "Actual Budget is a super fast and privacy-focused app for managing your finances. At its heart is the well proven and much loved Envelope Budgeting methodology.",
|
||||||
|
@ -33,11 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "After the script finishes, reboot the LXC then run `tailscale up` in the LXC console",
|
"text": "After the script finishes, reboot the LXC then run `tailscale up` in the LXC console",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Adguard Home can be updated via the user interface.",
|
"text": "Adguard Home can be updated via the user interface.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "AdventureLog uses an initial local IP, if you change your LXC-IP, you need to change the IP here: `/opt/adventurelog/backend/server/.env` and here: `/opt/adventurelog/frontend/.env`",
|
||||||
|
"type": "warning"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Resource and network settings are adjustable post LXC creation.",
|
"text": "Resource and network settings are adjustable post LXC creation.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": "alpine"
|
"password": "alpine"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "To Update Alpine: `apk update && apk upgrade`",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Apache-Cassandra Configuration: `nano /etc/cassandra/cassandra.yaml`",
|
"text": "Apache-Cassandra Configuration: `nano /etc/cassandra/cassandra.yaml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Show Login Credentials: `cat CouchDB.creds`",
|
"text": "Show Login Credentials: `cat CouchDB.creds`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Within the LXC console, run `cat rpc.secret` to display the rpc-secret. Copy this token and paste it into the Aria2 RPC Secret Token box within the AriaNG Settings. Then, click the reload AriaNG button.",
|
"text": "Within the LXC console, run `cat rpc.secret` to display the rpc-secret. Copy this token and paste it into the Aria2 RPC Secret Token box within the AriaNG Settings. Then, click the reload AriaNG button.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -9,7 +9,7 @@
|
|||||||
"updateable": false,
|
"updateable": false,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 13378,
|
"interface_port": 13378,
|
||||||
"documentation": null,
|
"documentation": "https://www.audiobookshelf.org/guides/",
|
||||||
"website": "https://www.audiobookshelf.org/",
|
"website": "https://www.audiobookshelf.org/",
|
||||||
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/audiobookshelf.svg",
|
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/audiobookshelf.svg",
|
||||||
"description": "Audiobookshelf is a Self-hosted audiobook and podcast server.",
|
"description": "Audiobookshelf is a Self-hosted audiobook and podcast server.",
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 7474,
|
"interface_port": 7474,
|
||||||
"documentation": null,
|
"documentation": "https://autobrr.com/configuration/autobrr",
|
||||||
"website": "https://autobrr.com/",
|
"website": "https://autobrr.com/",
|
||||||
"logo": "https://raw.githubusercontent.com/autobrr/autobrr/master/.github/images/logo.png",
|
"logo": "https://raw.githubusercontent.com/autobrr/autobrr/master/.github/images/logo.png",
|
||||||
"description": "Autobrr is a torrent downloading tool that automates the process of downloading torrents. It is designed to be modern and user-friendly, providing users with a convenient and efficient way to download torrent files. With Autobrr, you can schedule and manage your torrent downloads, and have the ability to automatically download torrents based on certain conditions, such as time of day or availability of seeds. This can save you time and effort, allowing you to focus on other tasks while your torrents are being downloaded in the background.",
|
"description": "Autobrr is a torrent downloading tool that automates the process of downloading torrents. It is designed to be modern and user-friendly, providing users with a convenient and efficient way to download torrent files. With Autobrr, you can schedule and manage your torrent downloads, and have the ability to automatically download torrents based on certain conditions, such as time of day or availability of seeds. This can save you time and effort, allowing you to focus on other tasks while your torrents are being downloaded in the background.",
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Blocky Configuration Path: `/opt/blocky/config.yml`",
|
"text": "Blocky Configuration Path: `/opt/blocky/config.yml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Add Calibre-Web Extras via `update`",
|
"text": "Add Calibre-Web Extras via `update`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
||||||
|
"type": "warning"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Set a root password if using autologin. This will be the Cockpit password.`sudo passwd root`",
|
"text": "Set a root password if using autologin. This will be the Cockpit password.`sudo passwd root`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,11 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c '$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/update-lxcs-cron.sh)' -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`",
|
"text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c '$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/misc/update-lxcs-cron.sh)' -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -32,12 +32,8 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Primary and Worker Private Keys Must Match.",
|
"text": "Configuration Path: `/opt/cronicle/conf/config.json` (Primary and Worker Private Keys Must Match)",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Configuration Path: `/opt/cronicle/conf/config.json`",
|
|
||||||
"type": "warning"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -10,7 +10,7 @@
|
|||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 8084,
|
"interface_port": 8084,
|
||||||
"documentation": null,
|
"documentation": null,
|
||||||
"website": null,
|
"website": "https://daemonsync.me/",
|
||||||
"logo": "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fimg.informer.com%2Ficons_mac%2Fpng%2F128%2F350%2F350335.png&f=1&nofb=1",
|
"logo": "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fimg.informer.com%2Ficons_mac%2Fpng%2F128%2F350%2F350335.png&f=1&nofb=1",
|
||||||
"description": "Sync files from app to server, share photos & videos, back up your data and stay secure inside local network.",
|
"description": "Sync files from app to server, share photos & videos, back up your data and stay secure inside local network.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Options to add Immich and/or Home Assistant",
|
"text": "Options to add Immich and/or Home Assistant",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -30,5 +30,10 @@
|
|||||||
"username": "admin",
|
"username": "admin",
|
||||||
"password": "public"
|
"password": "public"
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Setup-Steps: Access Control ➡ Authentication ➡ Create ➡ Next ➡ Next ➡ Create ➡ Users ➡ Add ➡ Username / Password (to authenicate with MQTT) ➡ Save. You're now ready to enjoy a high-performance MQTT Broker.",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "entering `evcc configure` in the LXC terminal will guide you through the creation of a configuration file for evcc.",
|
"text": "entering `evcc configure` in the LXC terminal will guide you through the creation of a configuration file for evcc.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
||||||
|
"type": "warning"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,11 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Discussions (explore more advanced methods): `https://github.com/tteck/Proxmox/discussions/2711`",
|
"text": "Discussions (explore more advanced methods): `https://github.com/tteck/Proxmox/discussions/2711`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "go2rtc Interface port:`1984`",
|
"text": "go2rtc Interface port:`1984`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -9,10 +9,10 @@
|
|||||||
"updateable": false,
|
"updateable": false,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": null,
|
"interface_port": null,
|
||||||
"documentation": "https://github.com/tteck/Proxmox/discussions/2505#discussion-6226037",
|
"documentation": "https://github.com/community-scripts/ProxmoxVE/discussions/805",
|
||||||
"website": null,
|
"website": null,
|
||||||
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/lxc.svg",
|
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/lxc.svg",
|
||||||
"description": "This maintains SSD performance by managing unused blocks. Thin-provisioned storage systems also require management to prevent unnecessary storage use. VMs automate fstrim, while LXC containers need manual or automated fstrim processes for optimal performance.\r\nThis is designed to work with SSDs on ext4 filesystems only.",
|
"description": "This maintains SSD performance by managing unused blocks. Thin-provisioned storage systems also require management to prevent unnecessary storage use. VMs automate fstrim, while LXC containers need manual or automated fstrim processes for optimal performance.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
"type": "default",
|
"type": "default",
|
||||||
@ -33,6 +33,10 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "This is designed to work with SSDs on ext4 filesystems only.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -30,14 +30,5 @@
|
|||||||
"username": "admin",
|
"username": "admin",
|
||||||
"password": "admin"
|
"password": "admin"
|
||||||
},
|
},
|
||||||
"notes": [
|
"notes": []
|
||||||
{
|
|
||||||
"text": "password: `admin`",
|
|
||||||
"type": "warning"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "username: `admin`",
|
|
||||||
"type": "warning"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
@ -34,6 +34,10 @@
|
|||||||
{
|
{
|
||||||
"text": "The disk must have a minimum size of 32GB and its size cannot be changed during the creation of the VM.",
|
"text": "The disk must have a minimum size of 32GB and its size cannot be changed during the creation of the VM.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "After the script completes, click on the VM, then on the Summary or Console tab to find the VM IP.",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Configuration settings: `/etc/headscale/config.yaml`",
|
"text": "Configuration settings: `/etc/headscale/config.yaml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "To check if HiveMQ is listening to the default port for MQTT `lsof -i :1883`",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
"name": "Homarr",
|
"name": "Homarr",
|
||||||
"slug": "homarr",
|
"slug": "homarr",
|
||||||
"categories": [
|
"categories": [
|
||||||
18
|
15
|
||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
|
@ -32,16 +32,20 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "config path: `/root/.homeassistant`",
|
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Requires `6.8.4-3-pve` or newer kernel",
|
"text": "Requires PVE 8.2.2 with kernel 6.8.4-3-pve or newer",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Use Ubuntu 24.04 ONLY",
|
"text": "Use Ubuntu 24.04 ONLY",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "config path: `/root/.homeassistant`",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -38,6 +38,10 @@
|
|||||||
{
|
{
|
||||||
"text": "config path: `/var/lib/docker/volumes/hass_config/_data`",
|
"text": "config path: `/var/lib/docker/volumes/hass_config/_data`",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Portainer Interface: LXC-IP: 9443",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "env file location: `/opt/.env`",
|
"text": ".env file location: `/opt/.env`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Configuration (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/`",
|
"text": "Configuration (bookmarks.yaml, services.yaml, widgets.yaml) path: `/opt/homepage/config/`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Configuration Path: `/opt/homer/assets/config.yml`",
|
"text": "Configuration Path: `/opt/homer/assets/config.yml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "A backup is rendered ineffective when it remains stored on the host",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,11 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "FFmpeg path: /usr/lib/jellyfin-ffmpeg/ffmpeg",
|
"text": "FFmpeg path: /usr/lib/jellyfin-ffmpeg/ffmpeg",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -32,8 +32,8 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Configuration Path: `/opt/mafl/data/config.yml`\r\n",
|
"text": "Configuration Path: `/opt/mafl/data/config.yml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Configuration Path: `/opt/magicmirror/config/config.js`",
|
"text": "Configuration Path: `/opt/magicmirror/config/config.js`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,31 +33,35 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Virtual machines without the QEMU guest agent installed must be excluded.",
|
||||||
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Prior to generating any new CT/VM not found in this repository, it's necessary to halt Proxmox VE Monitor-All by running `systemctl stop ping-instances`.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "To make setup changes, first stop the service: `systemctl stop ping-instances`",
|
"text": "To make setup changes, first stop the service: `systemctl stop ping-instances`",
|
||||||
"type": "Info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "To edit pause time: `nano /usr/local/bin/ping-instances.sh`",
|
"text": "To edit pause time: `nano /usr/local/bin/ping-instances.sh`",
|
||||||
"type": "Info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "To add excluded instances: `nano /etc/systemd/system/ping-instances.service`",
|
"text": "To add excluded instances: `nano /etc/systemd/system/ping-instances.service`",
|
||||||
"type": "Info"
|
"type": "info"
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "To edit pause time: `nano /usr/local/bin/ping-instances.sh`",
|
|
||||||
"type": "Info"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "After changes have been saved, `systemctl daemon-reload` and start the service: `systemctl start ping-instances`",
|
"text": "After changes have been saved, `systemctl daemon-reload` and start the service: `systemctl start ping-instances`",
|
||||||
"type": "Info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Monitor-All logs: `cat /var/log/ping-instances.log`",
|
"text": "Monitor-All logs: `cat /var/log/ping-instances.log`",
|
||||||
"type": "Info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "You can find post-install info here: `https://github.com/community-scripts/ProxmoxVE/discussions/782`",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Database credentials: `cat mysql.creds`",
|
"text": "Database credentials: `cat mysql.creds`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "With an option to install the MySQL 8.4 LTS release instead of MySQL 8.0",
|
"text": "With an option to install the MySQL 8.4 LTS release instead of MySQL 8.0",
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "To change Navidrome music folder path, `nano /var/lib/navidrome/navidrome.toml`",
|
"text": "To change Navidrome music folder path, `nano /var/lib/navidrome/navidrome.toml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -8,9 +8,9 @@
|
|||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": false,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 433,
|
"interface_port": 4443,
|
||||||
"documentation": null,
|
"documentation": null,
|
||||||
"website": "https://www.turnkeylinux.org/nextcloud",
|
"website": "https://github.com/nextcloud/nextcloudpi",
|
||||||
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/nextcloud.svg",
|
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/nextcloud.svg",
|
||||||
"description": "NextCloudPi is a popular self-hosted solution for file collaboration and data storage. It is built on the NextCloud software, which is an open-source platform for data management.",
|
"description": "NextCloudPi is a popular self-hosted solution for file collaboration and data storage. It is built on the NextCloud software, which is an open-source platform for data management.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "To install themes, type `update` in the LXC console.",
|
"text": "To install themes, type `update` in the LXC console.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Manually edit `/etc/notifiarr/notifiarr.conf`to enter the API key from Notifiarr.com, and create a password for the UI.",
|
"text": "Manually edit `/etc/notifiarr/notifiarr.conf`to enter the API key from Notifiarr.com, and create a password for the UI.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Configuration Path: `/etc/OliveTin/config.yaml`",
|
"text": "Configuration Path: `/etc/OliveTin/config.yaml`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -16,7 +16,7 @@
|
|||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
"type": "default",
|
"type": "default",
|
||||||
"script": "/ct/onedev.sh",
|
"script": "ct/onedev.sh",
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 2,
|
"cpu": 2,
|
||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Show Login Credentials: `cat /opt/openobserve/data/.env`",
|
"text": "Show Login Credentials: `cat /opt/openobserve/data/.env`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Show Login Credentials, type `update` in the LXC console",
|
"text": "Show Login Credentials, type `update` in the LXC console",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -9,7 +9,7 @@
|
|||||||
"updateable": false,
|
"updateable": false,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 8007,
|
"interface_port": 8007,
|
||||||
"documentation": null,
|
"documentation": "https://pbs.proxmox.com/docs/",
|
||||||
"website": "https://www.proxmox.com/en/proxmox-backup-server/overview",
|
"website": "https://www.proxmox.com/en/proxmox-backup-server/overview",
|
||||||
"logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png",
|
"logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png",
|
||||||
"description": "Proxmox Backup Server is an enterprise backup solution, for backing up and restoring VMs, containers, and physical hosts. By supporting incremental, fully deduplicated backups, Proxmox Backup Server significantly reduces network load and saves valuable storage space.",
|
"description": "Proxmox Backup Server is an enterprise backup solution, for backing up and restoring VMs, containers, and physical hosts. By supporting incremental, fully deduplicated backups, Proxmox Backup Server significantly reduces network load and saves valuable storage space.",
|
||||||
@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Set a root password if using autologin. This will be the PBS password.",
|
"text": "Set a root password if using autologin. This will be the PBS password. `sudo passwd root`",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "To set your password, log in to the container, and type the following: `pihole -a -p`",
|
"text": "To set your password, log in to the container, and type the following: `pihole -a -p`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "With an option to add Unbound",
|
"text": "With an option to add Unbound",
|
||||||
|
@ -30,5 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "After the script completes, click on the VM, then on the Summary or Console tab to find the VM IP.",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -38,6 +38,10 @@
|
|||||||
{
|
{
|
||||||
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
"text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "config path: `/var/lib/containers/storage/volumes/hass_config/_data`",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,11 +33,15 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Proxmox Backup Server ONLY",
|
"text": "Proxmox Backup Server ONLY",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox Backup Server Shell",
|
"text": "Execute within the Proxmox Backup Server Shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "It is recommended to answer “yes” (y) to all options presented during the process.",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "It is recommended to answer “yes” (y) to all options presented during the process.",
|
||||||
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Redis Configuration: `nano /etc/redis/redis.conf`",
|
"text": "Redis Configuration: `nano /etc/redis/redis.conf`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -30,6 +30,10 @@
|
|||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": []
|
"notes": [
|
||||||
}
|
{
|
||||||
|
"text": "Post Install: `https://github.com/community-scripts/ProxmoxVE/discussions/671`",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
"text": "With Privileged/Unprivileged Hardware Acceleration Support",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "The Lounge is running in private mode. Use \"sudo -u thelounge thelounge add name\" to create users.",
|
"text": "The Lounge is running in private mode. Use `sudo -u thelounge thelounge add name` to create users.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -33,11 +33,11 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "The script creates a `*.creds` file in the Proxmox root directory with the password of the newly created TurnKey LXC Appliance.",
|
"text": "The script creates a `*.creds` file in the Proxmox root directory with the password of the newly created TurnKey LXC Appliance.",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Retrieve Password: `cat turnkey-name.creds`",
|
"text": "Retrieve Password: `cat turnkey-name.creds`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "To view the database credentials : `cat umami.creds`",
|
"text": "To view the database credentials : `cat umami.creds`",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "For non-AVX CPUs, MongoDB 4.2 is installed. Please note this is a legacy solution that may present security risks and could become unsupported in future updates.",
|
"text": "For non-AVX CPUs, MongoDB 4.4 is installed. Please note this is a legacy solution that may present security risks and could become unsupported in future updates.",
|
||||||
"type": "warning"
|
"type": "warning"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within the Proxmox shell",
|
"text": "Execute within the Proxmox shell",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -47,7 +47,7 @@
|
|||||||
"type": "warning"
|
"type": "warning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Build Settings for normal LXC: 6GB RAM - 6GB Storage - 4vCPU",
|
"text": "To set the Admin Token, run the command below (or type update) in the LXC Console.",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "Execute within an existing LXC Console",
|
"text": "Execute within an existing LXC Console",
|
||||||
"type": "warning"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,20 +1,42 @@
|
|||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# Co-Author: MickLesk
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
|
# This function sets color variables for formatting output in the terminal
|
||||||
color() {
|
color() {
|
||||||
|
# Colors
|
||||||
YW=$(echo "\033[33m")
|
YW=$(echo "\033[33m")
|
||||||
|
YWB=$(echo "\033[93m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
RD=$(echo "\033[01;31m")
|
RD=$(echo "\033[01;31m")
|
||||||
BGN=$(echo "\033[4;92m")
|
|
||||||
GN=$(echo "\033[1;92m")
|
GN=$(echo "\033[1;92m")
|
||||||
DGN=$(echo "\033[32m")
|
|
||||||
|
# Formatting
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
BOLD=$(echo "\033[1m")
|
||||||
|
TAB=" "
|
||||||
|
|
||||||
|
# System
|
||||||
RETRY_NUM=10
|
RETRY_NUM=10
|
||||||
RETRY_EVERY=3
|
RETRY_EVERY=3
|
||||||
i=$RETRY_NUM
|
i=$RETRY_NUM
|
||||||
CM="${GN}✓${CL}"
|
|
||||||
CROSS="${RD}✗${CL}"
|
# Icons
|
||||||
BFR="\\r\\033[K"
|
CM="${TAB}✔️${TAB}${CL}"
|
||||||
HOLD="-"
|
CROSS="${TAB}✖️${TAB}${CL}"
|
||||||
|
INFO="${TAB}💡${TAB}${CL}"
|
||||||
|
NETWORK="${TAB}📡${TAB}${CL}"
|
||||||
|
OS="${TAB}🖥️${TAB}${CL}"
|
||||||
|
OSVERSION="${TAB}🌟${TAB}${CL}"
|
||||||
|
HOSTNAME="${TAB}🏠${TAB}${CL}"
|
||||||
|
GATEWAY="${TAB}🌐${TAB}${CL}"
|
||||||
|
DEFAULT="${TAB}⚙️${TAB}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes"
|
||||||
verb_ip6() {
|
verb_ip6() {
|
||||||
if [ "$VERBOSE" = "yes" ]; then
|
if [ "$VERBOSE" = "yes" ]; then
|
||||||
STD=""
|
STD=""
|
||||||
@ -27,11 +49,13 @@ verb_ip6() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function catches errors and handles them with the error handler function
|
||||||
catch_errors() {
|
catch_errors() {
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function handles errors
|
||||||
error_handler() {
|
error_handler() {
|
||||||
local exit_code="$?"
|
local exit_code="$?"
|
||||||
local line_number="$1"
|
local line_number="$1"
|
||||||
@ -40,21 +64,25 @@ error_handler() {
|
|||||||
echo -e "\n$error_message\n"
|
echo -e "\n$error_message\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function displays an informational message with a yellow color.
|
||||||
msg_info() {
|
msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${HOLD} ${YW}${msg}..."
|
echo -ne " ${TAB}${YW}${msg}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function displays a success message with a green color.
|
||||||
msg_ok() {
|
msg_ok() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function displays a error message with a red color.
|
||||||
msg_error() {
|
msg_error() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
||||||
setting_up_container() {
|
setting_up_container() {
|
||||||
msg_info "Setting up Container OS"
|
msg_info "Setting up Container OS"
|
||||||
while [ $i -gt 0 ]; do
|
while [ $i -gt 0 ]; do
|
||||||
@ -68,23 +96,26 @@ setting_up_container() {
|
|||||||
|
|
||||||
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then
|
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" = "" ]; then
|
||||||
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||||
echo -e " 🖧 Check Network Settings"
|
echo -e "${NETWORK}Check Network Settings"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
msg_ok "Set up Container OS"
|
msg_ok "Set up Container OS"
|
||||||
msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}"
|
msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function checks the network connection by pinging a known IP address and prompts the user to continue if the internet is not connected
|
||||||
network_check() {
|
network_check() {
|
||||||
set +e
|
set +e
|
||||||
trap - ERR
|
trap - ERR
|
||||||
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then msg_ok "Internet Connected"; else
|
if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then
|
||||||
|
msg_ok "Internet Connected";
|
||||||
|
else
|
||||||
msg_error "Internet NOT Connected"
|
msg_error "Internet NOT Connected"
|
||||||
read -r -p "Would you like to continue anyway? <y/N> " prompt
|
read -r -p "Would you like to continue anyway? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
|
echo -e "${INFO}${RD}Expect Issues Without Internet${CL}"
|
||||||
else
|
else
|
||||||
echo -e " 🖧 Check Network Settings"
|
echo -e "${NETWORK}Check Network Settings"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -94,6 +125,7 @@ network_check() {
|
|||||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function updates the Container OS by running apt-get update and upgrade
|
||||||
update_os() {
|
update_os() {
|
||||||
msg_info "Updating Container OS"
|
msg_info "Updating Container OS"
|
||||||
$STD apk update
|
$STD apk update
|
||||||
@ -101,16 +133,42 @@ update_os() {
|
|||||||
msg_ok "Updated Container OS"
|
msg_ok "Updated Container OS"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function modifies the message of the day (motd) and SSH settings
|
||||||
motd_ssh() {
|
motd_ssh() {
|
||||||
|
# Set terminal to 256-color mode
|
||||||
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
||||||
echo -e "$APPLICATION LXC provided by https://Helper-Scripts.com/\n" >/etc/motd
|
IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1)
|
||||||
|
# Get OS information
|
||||||
|
if [ -f "/etc/os-release" ]; then
|
||||||
|
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||||
|
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||||
|
else
|
||||||
|
OS_NAME="Alpine Linux"
|
||||||
|
OS_VERSION="Unknown"
|
||||||
|
fi
|
||||||
|
# Set MOTD with application info and system details
|
||||||
|
MOTD_FILE="/etc/motd"
|
||||||
|
if [ -f "$MOTD_FILE" ]; then
|
||||||
|
echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| Project: ${GN}ProxmoxVE ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\n" >> "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} ${OS_VERSION}${CL}" >> "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${HOSTNAME}${YW} Hostname: ${GN}$(hostname)${CL}" >> "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"
|
||||||
|
else
|
||||||
|
echo -e "${RD}[WARNING] MOTD file does not exist!${CL}" >&2
|
||||||
|
fi
|
||||||
|
# Configure SSH if enabled
|
||||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
||||||
|
# Enable sshd service
|
||||||
$STD rc-update add sshd
|
$STD rc-update add sshd
|
||||||
|
# Allow root login via SSH
|
||||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
||||||
|
# Start the sshd service
|
||||||
$STD /etc/init.d/sshd start
|
$STD /etc/init.d/sshd start
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function customizes the container and enables passwordless login for the root user
|
||||||
customize() {
|
customize() {
|
||||||
if [[ "$PASSWORD" == "" ]]; then
|
if [[ "$PASSWORD" == "" ]]; then
|
||||||
msg_info "Customizing Container"
|
msg_info "Customizing Container"
|
||||||
|
361
misc/build.func
361
misc/build.func
@ -1,3 +1,9 @@
|
|||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# Co-Author: MickLesk
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
variables() {
|
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.
|
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.
|
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
|
||||||
@ -6,6 +12,7 @@ variables() {
|
|||||||
|
|
||||||
# This function sets various color variables using ANSI escape codes for formatting text in the terminal.
|
# This function sets various color variables using ANSI escape codes for formatting text in the terminal.
|
||||||
color() {
|
color() {
|
||||||
|
# Colors
|
||||||
YW=$(echo "\033[33m")
|
YW=$(echo "\033[33m")
|
||||||
YWB=$(echo "\033[93m")
|
YWB=$(echo "\033[93m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
@ -13,11 +20,39 @@ color() {
|
|||||||
BGN=$(echo "\033[4;92m")
|
BGN=$(echo "\033[4;92m")
|
||||||
GN=$(echo "\033[1;92m")
|
GN=$(echo "\033[1;92m")
|
||||||
DGN=$(echo "\033[32m")
|
DGN=$(echo "\033[32m")
|
||||||
|
|
||||||
|
# Formatting
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
CM="${GN}✓${CL}"
|
UL=$(echo "\033[4m")
|
||||||
CROSS="${RD}✗${CL}"
|
BOLD=$(echo "\033[1m")
|
||||||
BFR="\\r\\033[K"
|
BFR="\\r\\033[K"
|
||||||
HOLD=" "
|
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}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
|
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
|
||||||
@ -39,19 +74,24 @@ error_handler() {
|
|||||||
|
|
||||||
# This function displays a spinner.
|
# This function displays a spinner.
|
||||||
spinner() {
|
spinner() {
|
||||||
local chars="/-\|"
|
local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||||
local spin_i=0
|
local spin_i=0
|
||||||
printf "\e[?25l"
|
local interval=0.1
|
||||||
while true; do
|
printf "\e[?25l"
|
||||||
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
|
|
||||||
sleep 0.1
|
local color="${YWB}"
|
||||||
done
|
|
||||||
|
while true; do
|
||||||
|
printf "\r ${color}%s${CL}" "${frames[spin_i]}"
|
||||||
|
spin_i=$(( (spin_i + 1) % ${#frames[@]} ))
|
||||||
|
sleep "$interval"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function displays an informational message with a yellow color.
|
# This function displays an informational message with a yellow color.
|
||||||
msg_info() {
|
msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${HOLD} ${YW}${msg} "
|
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||||
spinner &
|
spinner &
|
||||||
SPINNER_PID=$!
|
SPINNER_PID=$!
|
||||||
}
|
}
|
||||||
@ -61,7 +101,7 @@ msg_ok() {
|
|||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function displays a error message with a red color.
|
# This function displays a error message with a red color.
|
||||||
@ -69,7 +109,7 @@ msg_error() {
|
|||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the shell is using bash
|
# Check if the shell is using bash
|
||||||
@ -97,7 +137,7 @@ root_check() {
|
|||||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||||
pve_check() {
|
pve_check() {
|
||||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
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 "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
@ -108,17 +148,27 @@ fi
|
|||||||
# This function checks the system architecture and exits if it's not "amd64".
|
# This function checks the system architecture and exits if it's not "amd64".
|
||||||
arch_check() {
|
arch_check() {
|
||||||
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
||||||
echo -e "\n ${CROSS} This script will not work with PiMox! \n"
|
echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
|
||||||
echo -e "\n Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
|
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node.
|
||||||
|
header_info() {
|
||||||
|
apt-get install -y figlet &> /dev/null
|
||||||
|
ascii_art=$(figlet -f slant "$APP")
|
||||||
|
clear
|
||||||
|
cat <<EOF
|
||||||
|
$ascii_art
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.
|
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.
|
||||||
ssh_check() {
|
ssh_check() {
|
||||||
if command -v pveversion >/dev/null 2>&1 && [ -n "${SSH_CLIENT:+x}" ]; then
|
if [ -n "${SSH_CLIENT:+x}" ]; then
|
||||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's advisable to utilize the Proxmox shell rather than SSH, as there may be potential complications with variable retrieval. Proceed using SSH?" 10 72; then
|
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's advisable to utilize the Proxmox shell rather than SSH, as there may be potential complications with variable retrieval. Proceed using SSH?" 10 72; then
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proceed using SSH" "You've chosen to proceed using SSH. If any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proceed using SSH" "You've chosen to proceed using SSH. If any issues arise, please run the script in the Proxmox shell before creating a repository issue." 10 72
|
||||||
else
|
else
|
||||||
@ -129,36 +179,74 @@ ssh_check() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base_settings() {
|
||||||
|
# Default Settings
|
||||||
|
CT_TYPE="1"
|
||||||
|
DISK_SIZE="4"
|
||||||
|
CORE_COUNT="1"
|
||||||
|
RAM_SIZE="1024"
|
||||||
|
VERBOSE="${1:-no}"
|
||||||
|
PW=""
|
||||||
|
CT_ID=$NEXTID
|
||||||
|
HN=$NSAPP
|
||||||
|
BRG="vmbr0"
|
||||||
|
NET="dhcp"
|
||||||
|
GATE=""
|
||||||
|
APT_CACHER=""
|
||||||
|
APT_CACHER_IP=""
|
||||||
|
DISABLEIP6="no"
|
||||||
|
MTU=""
|
||||||
|
SD=""
|
||||||
|
NS=""
|
||||||
|
MAC=""
|
||||||
|
VLAN=""
|
||||||
|
SSH="no"
|
||||||
|
TAGS="community-script;"
|
||||||
|
|
||||||
|
# Override default settings with variables from ct script
|
||||||
|
CT_TYPE=${var_privileged:-$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
|
||||||
|
}
|
||||||
|
|
||||||
# This function displays the default values for various settings.
|
# This function displays the default values for various settings.
|
||||||
echo_default() {
|
echo_default() {
|
||||||
echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}"
|
# Convert CT_TYPE to description
|
||||||
echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}"
|
CT_TYPE_DESC="Unprivileged"
|
||||||
echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}"
|
if [ "$CT_TYPE" -eq 0 ]; then
|
||||||
echo -e "${DGN}Using Root Password: ${BGN}Automatic Login${CL}"
|
CT_TYPE_DESC="Privileged"
|
||||||
echo -e "${DGN}Using Container ID: ${BGN}$NEXTID${CL}"
|
fi
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$NSAPP${CL}"
|
|
||||||
echo -e "${DGN}Using Disk Size: ${BGN}$var_disk${CL}${DGN}GB${CL}"
|
# Output the selected values with icons
|
||||||
echo -e "${DGN}Allocated Cores ${BGN}$var_cpu${CL}"
|
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||||
echo -e "${DGN}Allocated Ram ${BGN}$var_ram${CL}"
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}vmbr0${CL}"
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||||
echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}"
|
||||||
echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${DGN}Using Apt-Cacher IP Address: ${BGN}Default${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MB${CL}"
|
||||||
echo -e "${DGN}Disable IPv6: ${BGN}No${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}"
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}Default${CL}"
|
if [ "$VERB" == "yes" ]; then
|
||||||
echo -e "${DGN}Using DNS Search Domain: ${BGN}Host${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}"
|
||||||
echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}"
|
fi
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}"
|
echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}"
|
||||||
echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}"
|
echo -e " "
|
||||||
echo -e "${DGN}Enable Root SSH Access: ${BGN}No${CL}"
|
|
||||||
echo -e "${DGN}Enable Verbose Mode: ${BGN}No${CL}"
|
|
||||||
echo -e "${BL}Creating a ${APP} LXC using the above default settings${CL}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function is called when the user decides to exit the script. It clears the screen and displays an exit message.
|
# This function is called when the user decides to exit the script. It clears the screen and displays an exit message.
|
||||||
exit-script() {
|
exit_script() {
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,10 +262,10 @@ advanced_settings() {
|
|||||||
"ubuntu" "" OFF \
|
"ubuntu" "" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ -n "$var_os" ]; then
|
if [ -n "$var_os" ]; then
|
||||||
echo -e "${DGN}Using Distribution: ${BGN}$var_os${CL}"
|
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -190,10 +278,10 @@ advanced_settings() {
|
|||||||
"12" "Bookworm" OFF \
|
"12" "Bookworm" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ -n "$var_version" ]; then
|
if [ -n "$var_version" ]; then
|
||||||
echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}"
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -201,20 +289,24 @@ advanced_settings() {
|
|||||||
if [ "$var_os" == "ubuntu" ]; then
|
if [ "$var_os" == "ubuntu" ]; then
|
||||||
var_version=""
|
var_version=""
|
||||||
while [ -z "$var_version" ]; do
|
while [ -z "$var_version" ]; do
|
||||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 3 \
|
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||||
"20.04" "Focal" OFF \
|
"20.04" "Focal" OFF \
|
||||||
"22.04" "Jammy" OFF \
|
"22.04" "Jammy" OFF \
|
||||||
"24.04" "Noble" OFF \
|
"24.04" "Noble" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
"24.10" "Oracular" OFF \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
if [ -n "$var_version" ]; then
|
if [ -n "$var_version" ]; then
|
||||||
echo -e "${DGN}Using $var_os Version: ${BGN}$var_version${CL}"
|
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Setting Default Tag for Advanced Settings
|
||||||
|
TAGS="community-script;"
|
||||||
|
|
||||||
CT_TYPE=""
|
CT_TYPE=""
|
||||||
while [ -z "$CT_TYPE" ]; do
|
while [ -z "$CT_TYPE" ]; do
|
||||||
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||||
@ -222,10 +314,14 @@ advanced_settings() {
|
|||||||
"0" "Privileged" OFF \
|
"0" "Privileged" OFF \
|
||||||
3>&1 1>&2 2>&3); then
|
3>&1 1>&2 2>&3); then
|
||||||
if [ -n "$CT_TYPE" ]; then
|
if [ -n "$CT_TYPE" ]; then
|
||||||
echo -e "${DGN}Using Container Type: ${BGN}$CT_TYPE${CL}"
|
CT_TYPE_DESC="Unprivileged"
|
||||||
|
if [ "$CT_TYPE" -eq 0 ]; then
|
||||||
|
CT_TYPE_DESC="Privileged"
|
||||||
|
fi
|
||||||
|
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -240,23 +336,23 @@ advanced_settings() {
|
|||||||
if PW2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then
|
if PW2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "\nVerify Root Password" 9 58 --title "PASSWORD VERIFICATION" 3>&1 1>&2 2>&3); then
|
||||||
if [[ "$PW1" == "$PW2" ]]; then
|
if [[ "$PW1" == "$PW2" ]]; then
|
||||||
PW="-password $PW1"
|
PW="-password $PW1"
|
||||||
echo -e "${DGN}Using Root Password: ${BGN}********${CL}"
|
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}********${CL}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
whiptail --msgbox "Passwords do not match. Please try again." 8 58
|
whiptail --msgbox "Passwords do not match. Please try again." 8 58
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PW1="Automatic Login"
|
PW1="Automatic Login"
|
||||||
PW=""
|
PW=""
|
||||||
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
echo -e "${VERIFYPW}${BOLD}${DGN}Root Password: ${BGN}$PW1${CL}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -264,9 +360,9 @@ advanced_settings() {
|
|||||||
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CT_ID" ]; then
|
if [ -z "$CT_ID" ]; then
|
||||||
CT_ID="$NEXTID"
|
CT_ID="$NEXTID"
|
||||||
echo -e "${DGN}Using Container ID: ${BGN}$CT_ID${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}$CT_ID${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit
|
exit
|
||||||
@ -278,57 +374,57 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
HN=$(echo ${CT_NAME,,} | tr -d ' ')
|
HN=$(echo ${CT_NAME,,} | tr -d ' ')
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}$HN${CL}"
|
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then
|
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$DISK_SIZE" ]; then
|
if [ -z "$DISK_SIZE" ]; then
|
||||||
DISK_SIZE="$var_disk"
|
DISK_SIZE="$var_disk"
|
||||||
echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
|
echo -e "${DISKSIZE}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||||
else
|
else
|
||||||
if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
|
if ! [[ $DISK_SIZE =~ $INTEGER ]]; then
|
||||||
echo -e "${RD}⚠ DISK SIZE MUST BE AN INTEGER NUMBER!${CL}"
|
echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}"
|
||||||
advanced_settings
|
advanced_settings
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using Disk Size: ${BGN}$DISK_SIZE${CL}"
|
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 $var_cpu --title "CORE COUNT" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$CORE_COUNT" ]; then
|
if [ -z "$CORE_COUNT" ]; then
|
||||||
CORE_COUNT="$var_cpu"
|
CORE_COUNT="$var_cpu"
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}$CORE_COUNT${CL}"
|
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$RAM_SIZE" ]; then
|
if [ -z "$RAM_SIZE" ]; then
|
||||||
RAM_SIZE="$var_ram"
|
RAM_SIZE="$var_ram"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}$RAM_SIZE${CL}"
|
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
|
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z "$BRG" ]; then
|
if [ -z "$BRG" ]; then
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||||
else
|
else
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}$BRG${CL}"
|
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
@ -336,18 +432,18 @@ advanced_settings() {
|
|||||||
exit_status=$?
|
exit_status=$?
|
||||||
if [ $exit_status -eq 0 ]; then
|
if [ $exit_status -eq 0 ]; then
|
||||||
if [ "$NET" = "dhcp" ]; then
|
if [ "$NET" = "dhcp" ]; then
|
||||||
echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then
|
if [[ "$NET" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]]; then
|
||||||
echo -e "${DGN}Using IP Address: ${BGN}$NET${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}IP Address: ${BGN}$NET${CL}"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "$NET is an invalid IPv4 CIDR address. Please enter a valid IPv4 CIDR address or 'dhcp'" 8 58
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -360,13 +456,13 @@ advanced_settings() {
|
|||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58
|
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58
|
||||||
else
|
else
|
||||||
GATE=",gw=$GATE1"
|
GATE=",gw=$GATE1"
|
||||||
echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
GATE=""
|
GATE=""
|
||||||
echo -e "${DGN}Using Gateway IP Address: ${BGN}Default${CL}"
|
echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}Default${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$var_os" == "alpine" ]; then
|
if [ "$var_os" == "alpine" ]; then
|
||||||
@ -375,9 +471,9 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then
|
if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then
|
||||||
APT_CACHER="${APT_CACHER_IP:+yes}"
|
APT_CACHER="${APT_CACHER_IP:+yes}"
|
||||||
echo -e "${DGN}Using APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -386,7 +482,7 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
DISABLEIP6="no"
|
DISABLEIP6="no"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
|
||||||
|
|
||||||
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
|
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $MTU1 ]; then
|
if [ -z $MTU1 ]; then
|
||||||
@ -395,9 +491,9 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
MTU=",mtu=$MTU1"
|
MTU=",mtu=$MTU1"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
|
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
|
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
|
||||||
@ -408,9 +504,9 @@ advanced_settings() {
|
|||||||
SX=$SD
|
SX=$SD
|
||||||
SD="-searchdomain=$SD"
|
SD="-searchdomain=$SD"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using DNS Search Domain: ${BGN}$SX${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}DNS Search Domain: ${BGN}$SX${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
|
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
|
||||||
@ -420,9 +516,9 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
NS="-nameserver=$NX"
|
NS="-nameserver=$NX"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NX${CL}"
|
echo -e "${NETWORK}${BOLD}${DGN}DNS Server IP Address: ${BGN}$NX${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
|
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" 3>&1 1>&2 2>&3); then
|
||||||
@ -431,10 +527,10 @@ advanced_settings() {
|
|||||||
MAC=""
|
MAC=""
|
||||||
else
|
else
|
||||||
MAC=",hwaddr=$MAC1"
|
MAC=",hwaddr=$MAC1"
|
||||||
echo -e "${DGN}Using MAC Address: ${BGN}$MAC1${CL}"
|
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then
|
||||||
@ -444,9 +540,9 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
VLAN=",tag=$VLAN1"
|
VLAN=",tag=$VLAN1"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Using Vlan: ${BGN}$VLAN1${CL}"
|
echo -e "${VLANTAG}${BOLD}${DGN}Vlan: ${BGN}$VLAN1${CL}"
|
||||||
else
|
else
|
||||||
exit-script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$PW" == -password* ]]; then
|
if [[ "$PW" == -password* ]]; then
|
||||||
@ -455,10 +551,10 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
SSH="no"
|
SSH="no"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
else
|
else
|
||||||
SSH="no"
|
SSH="no"
|
||||||
echo -e "${DGN}Enable Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||||
@ -466,14 +562,14 @@ advanced_settings() {
|
|||||||
else
|
else
|
||||||
VERB="no"
|
VERB="no"
|
||||||
fi
|
fi
|
||||||
echo -e "${DGN}Enable Verbose Mode: ${BGN}$VERB${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERB${CL}"
|
||||||
|
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create ${APP} LXC?" 10 58); then
|
||||||
echo -e "${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
header_info
|
header_info
|
||||||
echo -e "${RD}Using Advanced Settings${CL}"
|
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||||
advanced_settings
|
advanced_settings
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -491,27 +587,68 @@ install_script() {
|
|||||||
NEXTID=$(pvesh get /cluster/nextid)
|
NEXTID=$(pvesh get /cluster/nextid)
|
||||||
timezone=$(cat /etc/timezone)
|
timezone=$(cat /etc/timezone)
|
||||||
header_info
|
header_info
|
||||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
while true; do
|
||||||
header_info
|
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \
|
||||||
echo -e "${BL}Using Default Settings${CL}"
|
12 50 4 \
|
||||||
default_settings
|
"1" "Default Settings" \
|
||||||
else
|
"2" "Default Settings (with verbose)" \
|
||||||
header_info
|
"3" "Advanced Settings" \
|
||||||
echo -e "${RD}Using Advanced Settings${CL}"
|
"4" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3)
|
||||||
advanced_settings
|
|
||||||
fi
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
header_info
|
||||||
|
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
|
||||||
|
VERB="no"
|
||||||
|
base_settings "$VERB"
|
||||||
|
echo_default
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
header_info
|
||||||
|
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings (${SEARCH} Verbose)${CL}"
|
||||||
|
VERB="yes"
|
||||||
|
base_settings "$VERB"
|
||||||
|
echo_default
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
header_info
|
||||||
|
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||||
|
advanced_settings
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
4)
|
||||||
|
echo -e "${CROSS}${RD}Exiting.${CL}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo -e "${CROSS}${RD}Invalid option, please try again.${CL}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
check_container_resources() {
|
check_container_resources() {
|
||||||
# Check actual RAM & Cores
|
# Check actual RAM & Cores
|
||||||
current_ram=$(free -m | awk '/^Mem:/{print $2}')
|
current_ram=$(free -m | awk 'NR==2{print $2}')
|
||||||
current_cpu=$(nproc)
|
current_cpu=$(nproc)
|
||||||
|
|
||||||
# Check whether the current RAM is less than the required RAM or the CPU cores are less than required
|
# Check whether the current RAM is less than the required RAM or the CPU cores are less than required
|
||||||
if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then
|
if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then
|
||||||
echo -e "\n⚠️${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}"
|
echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}"
|
||||||
echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n"
|
echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n"
|
||||||
exit 1
|
read -r -p "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? <yes/No> " 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}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e ""
|
echo -e ""
|
||||||
fi
|
fi
|
||||||
@ -524,11 +661,11 @@ check_container_storage() {
|
|||||||
usage=$(( 100 * used_size / total_size ))
|
usage=$(( 100 * used_size / total_size ))
|
||||||
if (( usage > 80 )); then
|
if (( usage > 80 )); then
|
||||||
# Prompt the user for confirmation to continue
|
# Prompt the user for confirmation to continue
|
||||||
echo -e "⚠️${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}"
|
echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}"
|
||||||
read -r -p "Continue anyway? <y/N> " prompt
|
read -r -p "Continue anyway? <y/N> " prompt
|
||||||
# Check if the input is 'y' or 'yes', otherwise exit with status 1
|
# Check if the input is 'y' or 'yes', otherwise exit with status 1
|
||||||
if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
echo -e "❌${HOLD} ${YWB}Exiting based on user input.${CL}"
|
echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -538,7 +675,7 @@ start() {
|
|||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
exit_script
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
SPINNER_PID=""
|
SPINNER_PID=""
|
||||||
@ -548,7 +685,7 @@ start() {
|
|||||||
if ! command -v pveversion >/dev/null 2>&1; then
|
if ! command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
exit_script
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
SPINNER_PID=""
|
SPINNER_PID=""
|
||||||
@ -591,7 +728,7 @@ build_container() {
|
|||||||
export PCT_OPTIONS="
|
export PCT_OPTIONS="
|
||||||
-features $FEATURES
|
-features $FEATURES
|
||||||
-hostname $HN
|
-hostname $HN
|
||||||
-tags proxmox-helper-scripts
|
-tags $TAGS
|
||||||
$SD
|
$SD
|
||||||
$NS
|
$NS
|
||||||
-net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU
|
-net0 name=eth0,bridge=$BRG$MAC,ip=$NET$GATE$VLAN$MTU
|
||||||
@ -661,8 +798,6 @@ EOF
|
|||||||
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
|
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
|
||||||
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
||||||
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
||||||
#http://dl-cdn.alpinelinux.org/alpine/v3.19/main
|
|
||||||
#http://dl-cdn.alpinelinux.org/alpine/v3.19/community
|
|
||||||
EOF'
|
EOF'
|
||||||
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
||||||
fi
|
fi
|
||||||
|
@ -1,18 +1,39 @@
|
|||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# Co-Author: MickLesk
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
# This function sets color variables for formatting output in the terminal
|
# This function sets color variables for formatting output in the terminal
|
||||||
color() {
|
color() {
|
||||||
|
# Colors
|
||||||
YW=$(echo "\033[33m")
|
YW=$(echo "\033[33m")
|
||||||
|
YWB=$(echo "\033[93m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
RD=$(echo "\033[01;31m")
|
RD=$(echo "\033[01;31m")
|
||||||
BGN=$(echo "\033[4;92m")
|
|
||||||
GN=$(echo "\033[1;92m")
|
GN=$(echo "\033[1;92m")
|
||||||
DGN=$(echo "\033[32m")
|
|
||||||
|
# Formatting
|
||||||
CL=$(echo "\033[m")
|
CL=$(echo "\033[m")
|
||||||
|
BFR="\\r\\033[K"
|
||||||
|
BOLD=$(echo "\033[1m")
|
||||||
|
HOLD=" "
|
||||||
|
TAB=" "
|
||||||
|
|
||||||
|
# System
|
||||||
RETRY_NUM=10
|
RETRY_NUM=10
|
||||||
RETRY_EVERY=3
|
RETRY_EVERY=3
|
||||||
CM="${GN}✓${CL}"
|
|
||||||
CROSS="${RD}✗${CL}"
|
# Icons
|
||||||
BFR="\\r\\033[K"
|
CM="${TAB}✔️${TAB}${CL}"
|
||||||
HOLD=" "
|
CROSS="${TAB}✖️${TAB}${CL}"
|
||||||
|
INFO="${TAB}💡${TAB}${CL}"
|
||||||
|
NETWORK="${TAB}📡${TAB}${CL}"
|
||||||
|
OS="${TAB}🖥️${TAB}${CL}"
|
||||||
|
OSVERSION="${TAB}🌟${TAB}${CL}"
|
||||||
|
HOSTNAME="${TAB}🏠${TAB}${CL}"
|
||||||
|
GATEWAY="${TAB}🌐${TAB}${CL}"
|
||||||
|
DEFAULT="${TAB}⚙️${TAB}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes"
|
# This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes"
|
||||||
@ -49,30 +70,34 @@ error_handler() {
|
|||||||
|
|
||||||
# This function displays a spinner.
|
# This function displays a spinner.
|
||||||
spinner() {
|
spinner() {
|
||||||
local chars="/-\|"
|
local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
|
||||||
local spin_i=0
|
local spin_i=0
|
||||||
printf "\e[?25l"
|
local interval=0.1
|
||||||
while true; do
|
printf "\e[?25l"
|
||||||
printf "\r \e[36m%s\e[0m" "${chars:spin_i++%${#chars}:1}"
|
|
||||||
sleep 0.1
|
local color="${YWB}"
|
||||||
done
|
|
||||||
|
while true; do
|
||||||
|
printf "\r ${color}%s${CL}" "${frames[spin_i]}"
|
||||||
|
spin_i=$(( (spin_i + 1) % ${#frames[@]} ))
|
||||||
|
sleep "$interval"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function displays an informational message with a yellow color.
|
# This function displays an informational message with a yellow color.
|
||||||
msg_info() {
|
msg_info() {
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -ne " ${HOLD} ${YW}${msg} "
|
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||||
spinner &
|
spinner &
|
||||||
SPINNER_PID=$!
|
SPINNER_PID=$!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# This function displays a success message with a green color.
|
# This function displays a success message with a green color.
|
||||||
msg_ok() {
|
msg_ok() {
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
|
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function displays a error message with a red color.
|
# This function displays a error message with a red color.
|
||||||
@ -80,7 +105,7 @@ msg_error() {
|
|||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
||||||
@ -102,7 +127,7 @@ setting_up_container() {
|
|||||||
done
|
done
|
||||||
if [ "$(hostname -I)" = "" ]; then
|
if [ "$(hostname -I)" = "" ]; then
|
||||||
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||||
echo -e " 🖧 Check Network Settings"
|
echo -e "${NETWORK}Check Network Settings"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
@ -118,16 +143,16 @@ network_check() {
|
|||||||
ipv4_connected=false
|
ipv4_connected=false
|
||||||
ipv6_connected=false
|
ipv6_connected=false
|
||||||
sleep 1
|
sleep 1
|
||||||
# Check IPv4 connectivity
|
# Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers.
|
||||||
if ping -c 1 -W 1 1.1.1.1 &>/dev/null; then
|
if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then
|
||||||
msg_ok "IPv4 Internet Connected";
|
msg_ok "IPv4 Internet Connected";
|
||||||
ipv4_connected=true
|
ipv4_connected=true
|
||||||
else
|
else
|
||||||
msg_error "IPv4 Internet Not Connected";
|
msg_error "IPv4 Internet Not Connected";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check IPv6 connectivity
|
# Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers.
|
||||||
if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null; then
|
if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then
|
||||||
msg_ok "IPv6 Internet Connected";
|
msg_ok "IPv6 Internet Connected";
|
||||||
ipv6_connected=true
|
ipv6_connected=true
|
||||||
else
|
else
|
||||||
@ -138,9 +163,9 @@ network_check() {
|
|||||||
if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then
|
if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then
|
||||||
read -r -p "No Internet detected,would you like to continue anyway? <y/N> " prompt
|
read -r -p "No Internet detected,would you like to continue anyway? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
echo -e " ⚠️ ${RD}Expect Issues Without Internet${CL}"
|
echo -e "${INFO}${RD}Expect Issues Without Internet${CL}"
|
||||||
else
|
else
|
||||||
echo -e " 🖧 Check Network Settings"
|
echo -e "${NETWORK}Check Network Settings"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -174,13 +199,38 @@ EOF
|
|||||||
|
|
||||||
# This function modifies the message of the day (motd) and SSH settings
|
# This function modifies the message of the day (motd) and SSH settings
|
||||||
motd_ssh() {
|
motd_ssh() {
|
||||||
echo "export TERM='xterm-256color'" >>/root/.bashrc
|
# Set terminal to 256-color mode
|
||||||
echo -e "$APPLICATION LXC provided by https://helper-scripts.com/\n" >/etc/motd
|
grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >> /root/.bashrc
|
||||||
chmod -x /etc/update-motd.d/*
|
|
||||||
if [[ "${SSH_ROOT}" == "yes" ]]; then
|
# Get the current private IP address
|
||||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
|
IP=$(hostname -I | awk '{print $1}') # Private IP
|
||||||
systemctl restart sshd
|
|
||||||
|
# Get OS information (Debian / Ubuntu)
|
||||||
|
if [ -f "/etc/os-release" ]; then
|
||||||
|
OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||||
|
OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
|
||||||
|
elif [ -f "/etc/debian_version" ]; then
|
||||||
|
OS_NAME="Debian"
|
||||||
|
OS_VERSION=$(cat /etc/debian_version)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set MOTD with application info, system details
|
||||||
|
MOTD_FILE="/etc/motd"
|
||||||
|
if [ -f "$MOTD_FILE" ]; then
|
||||||
|
# Start MOTD with application info and link
|
||||||
|
echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\n" >> "$MOTD_FILE"
|
||||||
|
|
||||||
|
# Add system information with icons
|
||||||
|
echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}" >> "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${HOSTNAME}${YW} Hostname: ${GN}$(hostname)${CL}" >> "$MOTD_FILE"
|
||||||
|
echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"
|
||||||
|
else
|
||||||
|
echo "MotD file does not exist!" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Disable default MOTD scripts
|
||||||
|
chmod -x /etc/update-motd.d/*
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function customizes the container by modifying the getty service and enabling auto-login for the root user
|
# This function customizes the container by modifying the getty service and enabling auto-login for the root user
|
||||||
|
Loading…
Reference in New Issue
Block a user