mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-01 03:27:38 +00:00
Compare commits
122 Commits
2025-01-26
...
2025-02-01
Author | SHA1 | Date | |
---|---|---|---|
f40e6e5453 | |||
8a07124457 | |||
41c32af0d6 | |||
3cb4196fee | |||
a33108cd4f | |||
a0d7c5db0e | |||
baef2a0cb9 | |||
f9b84bf5ee | |||
ccab9d1be5 | |||
58a2ece7b7 | |||
aa16f936c8 | |||
c8829beddd | |||
3adc22d837 | |||
71b1288220 | |||
3c58303a9f | |||
b8edf0dd68 | |||
2fa3116c9c | |||
d416ff9cfa | |||
2e2db6603e | |||
72335f2c4e | |||
a359ffc211 | |||
cd4bcefa58 | |||
a0eb173824 | |||
3d42ecb152 | |||
0642c7e2c8 | |||
af04e933e3 | |||
0dfc513a27 | |||
26433efcd8 | |||
343de50ef8 | |||
a38e9070ef | |||
e2b548a7c3 | |||
737b18dea5 | |||
6b777a03c0 | |||
d9b4778360 | |||
7299b77359 | |||
d3882b6818 | |||
2ef0cd0f89 | |||
f2eb24d527 | |||
f520607d85 | |||
1270d87bf8 | |||
7f2481ea12 | |||
05f114ed64 | |||
6924a6fea4 | |||
bb553ae48c | |||
cbb18668dd | |||
c7418171b4 | |||
ed2ead9ef2 | |||
e51c121af2 | |||
8c4e97d6cb | |||
1093fef23c | |||
6fa540f0da | |||
ca7fb9b929 | |||
139f84a934 | |||
8bc50f4d71 | |||
3fa4cf6e07 | |||
63e3619b68 | |||
054b569e33 | |||
cd740e52f4 | |||
37c7205978 | |||
eb9633215c | |||
85a6819760 | |||
20d6162ac1 | |||
0dff2b3363 | |||
c799e67ea5 | |||
645972077e | |||
24dfa9590e | |||
cecf179b34 | |||
1f39208c1c | |||
63061942b9 | |||
87a987ba35 | |||
0680fbfac7 | |||
41a836f990 | |||
ad14b1b1d6 | |||
94d60a79d6 | |||
f10e625e41 | |||
dae705056c | |||
b973ca9d8d | |||
1cf8f80c71 | |||
97002e7047 | |||
d366d24dea | |||
05e46a07cd | |||
af166e3346 | |||
8221614cab | |||
b70cd00764 | |||
31473b2170 | |||
690d6d42d4 | |||
3be6824844 | |||
f903cfd97a | |||
901db73d78 | |||
67b80306a1 | |||
7dc446c8ac | |||
9435b9d046 | |||
2b1b517f20 | |||
7c297d3dac | |||
dbb9b66355 | |||
ff06d417b5 | |||
84b982ffa8 | |||
53c7ab19f8 | |||
d13c1e5722 | |||
be92f947cd | |||
452012529c | |||
661654987d | |||
c3a21069d2 | |||
4de8c1c358 | |||
cd86921467 | |||
38a540b87a | |||
8cd3669edb | |||
adfbff63bc | |||
47bf8e6f86 | |||
43f05b3aba | |||
b17befec88 | |||
719da560d1 | |||
ac25b5a702 | |||
ce1a38eb50 | |||
030174f508 | |||
7e1fb858d7 | |||
5dc1a7d219 | |||
14247ac5a9 | |||
4911a7918a | |||
b06ad8bde8 | |||
8a6364902e | |||
dfd56aebf2 |
7
.github/CONTRIBUTOR_GUIDE/ct/AppName.md
vendored
7
.github/CONTRIBUTOR_GUIDE/ct/AppName.md
vendored
@ -40,8 +40,8 @@
|
||||
- Import the build.func file.
|
||||
- When developing your own script, change the URL to your own repository.
|
||||
|
||||
> [!CAUTION]
|
||||
> Before opening a Pull Request, change the URL to point to the community-scripts repo.
|
||||
> [!IMPORTANT]
|
||||
> You also need to change all apperances of this URL in `misc/build.func` and `misc/install.func`
|
||||
|
||||
Example for development:
|
||||
|
||||
@ -55,6 +55,9 @@ Final script:
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
```
|
||||
|
||||
> [!CAUTION]
|
||||
> Before opening a Pull Request, change the URLs to point to the community-scripts repo.
|
||||
|
||||
### 1.3 **Metadata**
|
||||
|
||||
- Add clear comments for script metadata, including author, copyright, and license information.
|
||||
|
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1 +1,2 @@
|
||||
ko_fi: community_scripts
|
||||
github: community_scripts
|
||||
|
19
.github/workflows/auto-update-app-headers.yml
vendored
19
.github/workflows/auto-update-app-headers.yml
vendored
@ -45,28 +45,26 @@ jobs:
|
||||
|
||||
# Step 6: Check if there are any changes
|
||||
- name: Check if there are any changes
|
||||
id: verify-diff
|
||||
run: |
|
||||
echo "Checking for changes..."
|
||||
git add -A # Untracked Dateien aufnehmen
|
||||
git status
|
||||
if git diff --quiet; then
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes detected."
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
echo "changed=false" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "Changes detected:"
|
||||
git diff --stat
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
git diff --stat --cached
|
||||
echo "changed=true" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
# Step 7: Commit changes (if any) and create a PR
|
||||
# Step 7: Commit and create PR if changes exist
|
||||
- name: Commit and create PR if changes exist
|
||||
if: steps.verify-diff.outputs.changed == 'true'
|
||||
if: env.changed == 'true'
|
||||
run: |
|
||||
git add -A
|
||||
git commit -m "Update .app files"
|
||||
git checkout -b pr-update-app-files
|
||||
git push origin pr-update-app-files --force
|
||||
|
||||
gh pr create --title "[core] update .app files" \
|
||||
--body "This PR is auto-generated by a GitHub Action to update the .app files." \
|
||||
--head pr-update-app-files \
|
||||
@ -77,6 +75,5 @@ jobs:
|
||||
|
||||
# Step 8: Output success message when no changes
|
||||
- name: No changes detected
|
||||
if: steps.verify-diff.outputs.changed == 'false'
|
||||
if: env.changed == 'false'
|
||||
run: echo "No changes to commit. Workflow completed successfully."
|
||||
|
||||
|
126
CHANGELOG.md
126
CHANGELOG.md
@ -17,6 +17,132 @@ All LXC instances created using this repository come pre-installed with Midnight
|
||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
|
||||
|
||||
|
||||
## 2025-02-01
|
||||
|
||||
### Changed
|
||||
|
||||
### 💥 Breaking Changes
|
||||
|
||||
- [DCMA] Delete scripts 5etools and pf2etools - Copyright abuse [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1922](https://github.com/community-scripts/ProxmoxVE/pull/1922))
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New script: Baïkal [@bvdberg01](https://github.com/bvdberg01) ([#1913](https://github.com/community-scripts/ProxmoxVE/pull/1913))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Bug fix: Paymenter [@opastorello](https://github.com/opastorello) ([#1917](https://github.com/community-scripts/ProxmoxVE/pull/1917))
|
||||
|
||||
## 2025-01-31
|
||||
|
||||
### Changed
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New Script: Paymenter [@opastorello](https://github.com/opastorello) ([#1827](https://github.com/community-scripts/ProxmoxVE/pull/1827))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- [Fix] Alpine-IT-Tools, add missing ssh package for root ssh access [@CrazyWolf13](https://github.com/CrazyWolf13) ([#1891](https://github.com/community-scripts/ProxmoxVE/pull/1891))
|
||||
- [Fix] Change Download of Trilium after there change the tag/release logic [@MickLesk](https://github.com/MickLesk) ([#1892](https://github.com/community-scripts/ProxmoxVE/pull/1892))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- [Website] Enhance DataFetcher with better UI components and add reactive data fetching intervals [@BramSuurdje](https://github.com/BramSuurdje) ([#1902](https://github.com/community-scripts/ProxmoxVE/pull/1902))
|
||||
- [Website] Update /data/page.tsx [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1900](https://github.com/community-scripts/ProxmoxVE/pull/1900))
|
||||
|
||||
## 2025-01-30
|
||||
|
||||
### Changed
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New Script: IT-Tools [@nicedevil007](https://github.com/nicedevil007) ([#1862](https://github.com/community-scripts/ProxmoxVE/pull/1862))
|
||||
- New Script: Mattermost [@Dracentis](https://github.com/Dracentis) ([#1856](https://github.com/community-scripts/ProxmoxVE/pull/1856))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Optimize PVE Manager Version-Check [@MickLesk](https://github.com/MickLesk) ([#1866](https://github.com/community-scripts/ProxmoxVE/pull/1866))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- [API] Update build.func to set the status message correct [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1878](https://github.com/community-scripts/ProxmoxVE/pull/1878))
|
||||
- [Website] Update /data/page.tsx [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1876](https://github.com/community-scripts/ProxmoxVE/pull/1876))
|
||||
- Fix IT-Tools Website Entry (Default | Alpine) [@MickLesk](https://github.com/MickLesk) ([#1869](https://github.com/community-scripts/ProxmoxVE/pull/1869))
|
||||
- fix: remove rounded styles from command primitive [@steveiliop56](https://github.com/steveiliop56) ([#1840](https://github.com/community-scripts/ProxmoxVE/pull/1840))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- [API] Update build.func: add function to see if a script failed or not [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1874](https://github.com/community-scripts/ProxmoxVE/pull/1874))
|
||||
|
||||
## 2025-01-29
|
||||
|
||||
### Changed
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New Script: Prometheus Proxmox VE Exporter [@andygrunwald](https://github.com/andygrunwald) ([#1805](https://github.com/community-scripts/ProxmoxVE/pull/1805))
|
||||
- New Script: Clean Orphaned LVM [@MickLesk](https://github.com/MickLesk) ([#1838](https://github.com/community-scripts/ProxmoxVE/pull/1838))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Patch http Url to https in build.func and /data/page.tsx [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1849](https://github.com/community-scripts/ProxmoxVE/pull/1849))
|
||||
- [Frontend] Add /data to show API results [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1841](https://github.com/community-scripts/ProxmoxVE/pull/1841))
|
||||
- Update clean-orphaned-lvm.json [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1843](https://github.com/community-scripts/ProxmoxVE/pull/1843))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- Update build.func [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1851](https://github.com/community-scripts/ProxmoxVE/pull/1851))
|
||||
- [Diagnostic] Introduced optional lxc install diagnostics via API call [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1801](https://github.com/community-scripts/ProxmoxVE/pull/1801))
|
||||
|
||||
## 2025-01-28
|
||||
|
||||
### Changed
|
||||
|
||||
### 💥 Breaking Changes
|
||||
|
||||
- Breaking Change: Homarr v1 (Read Guide) [@MickLesk](https://github.com/MickLesk) ([#1825](https://github.com/community-scripts/ProxmoxVE/pull/1825))
|
||||
- Update PingVin: Fix problem with update und switch to new method of getting files. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1819](https://github.com/community-scripts/ProxmoxVE/pull/1819))
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New script: Monica LXC [@bvdberg01](https://github.com/bvdberg01) ([#1813](https://github.com/community-scripts/ProxmoxVE/pull/1813))
|
||||
- New Script: NodeBB [@MickLesk](https://github.com/MickLesk) ([#1811](https://github.com/community-scripts/ProxmoxVE/pull/1811))
|
||||
- New Script: Pocket ID [@Snarkenfaugister](https://github.com/Snarkenfaugister) ([#1779](https://github.com/community-scripts/ProxmoxVE/pull/1779))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Update all Alpine LXC's to 3.21 (Docker, Grafana, Nextcloud, Vaultwarden, Zigbee2Mqtt, Alpine) [@MickLesk](https://github.com/MickLesk) ([#1803](https://github.com/community-scripts/ProxmoxVE/pull/1803))
|
||||
- [Standardization] Fix Spelling for "Setup Python3" [@MickLesk](https://github.com/MickLesk) ([#1810](https://github.com/community-scripts/ProxmoxVE/pull/1810))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Filter out duplicate scripts in LatestScripts component and sort by creation date [@BramSuurdje](https://github.com/BramSuurdje) ([#1828](https://github.com/community-scripts/ProxmoxVE/pull/1828))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- [core]: Remove Figlet | Get Headers by Repo & Store Local [@MickLesk](https://github.com/MickLesk) ([#1802](https://github.com/community-scripts/ProxmoxVE/pull/1802))
|
||||
- [docs] Update AppName.md: Make it clear where to change the URLs [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1809](https://github.com/community-scripts/ProxmoxVE/pull/1809))
|
||||
|
||||
## 2025-01-27
|
||||
|
||||
### Changed
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New Script: Arch Linux VM [@MickLesk](https://github.com/MickLesk) ([#1780](https://github.com/community-scripts/ProxmoxVE/pull/1780))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Increase alpine-vaultwarden default var_disk size [@nayzm](https://github.com/nayzm) ([#1788](https://github.com/community-scripts/ProxmoxVE/pull/1788))
|
||||
- Added change of the mobile GUI to disable nag request [@GarryG](https://github.com/GarryG) ([#1785](https://github.com/community-scripts/ProxmoxVE/pull/1785))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Update frontend alpine-vaultwarden hdd size and OS version [@nayzm](https://github.com/nayzm) ([#1789](https://github.com/community-scripts/ProxmoxVE/pull/1789))
|
||||
- Website: Add Description for Metadata Categories [@MickLesk](https://github.com/MickLesk) ([#1783](https://github.com/community-scripts/ProxmoxVE/pull/1783))
|
||||
- [Fix] Double "VM" on website (Arch Linux) [@lasharor](https://github.com/lasharor) ([#1782](https://github.com/community-scripts/ProxmoxVE/pull/1782))
|
||||
|
||||
## 2025-01-26
|
||||
|
||||
### Changed
|
||||
|
113
ct/5etools.sh
113
ct/5etools.sh
@ -1,113 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: TheRealVira
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://5e.tools/
|
||||
|
||||
# App Default Values
|
||||
APP="5etools"
|
||||
var_tags="wiki"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="13"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
# Check if installation is present | -f for file, -d for folder
|
||||
if [[ ! -d "/opt/${APP}" ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-3/5etools-src/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f "/opt/${APP}_version.txt" ]]; then
|
||||
# Crawling the new version and checking whether an update is required
|
||||
msg_info "Updating System"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade &>/dev/null
|
||||
msg_ok "Updated System"
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating base 5etools"
|
||||
cd /opt
|
||||
wget -q "https://github.com/5etools-mirror-3/5etools-src/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q "${RELEASE}.zip"
|
||||
mv "/opt/${APP}/img" "/opt/img-backup"
|
||||
rm -rf "/opt/${APP}"
|
||||
mv "${APP}-src-${RELEASE:1}" "/opt/${APP}"
|
||||
mv "/opt/img-backup" "/opt/${APP}/img"
|
||||
cd /opt/5etools
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
cd ~
|
||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||
chown -R www-data: "/opt/${APP}"
|
||||
chmod -R 755 "/opt/${APP}"
|
||||
msg_ok "Updated base 5etools"
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleanup Completed"
|
||||
else
|
||||
msg_ok "No update required. Base ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
|
||||
IMG_RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-2/5etools-img/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${IMG_RELEASE}" != "$(cat /opt/${APP}_IMG_version.txt)" ]] || [[ ! -f "/opt/${APP}_IMG_version.txt" ]]; then
|
||||
# Crawling the new version and checking whether an update is required
|
||||
msg_info "Updating System"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade &>/dev/null
|
||||
msg_ok "Updated System"
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating 5etools images"
|
||||
curl -sSL "https://github.com/5etools-mirror-2/5etools-img/archive/refs/tags/${IMG_RELEASE}.zip" > "${IMG_RELEASE}.zip"
|
||||
unzip -q "${IMG_RELEASE}.zip"
|
||||
rm -rf "/opt/${APP}/img"
|
||||
mv "${APP}-img-${IMG_RELEASE:1}" "/opt/${APP}/img"
|
||||
echo "${IMG_RELEASE}" >"/opt/${APP}_IMG_version.txt"
|
||||
chown -R www-data: "/opt/${APP}"
|
||||
chmod -R 755 "/opt/${APP}"
|
||||
|
||||
msg_ok "Updating 5etools images"
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/${RELEASE}.zip
|
||||
rm -rf ${IMG_RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleanup Completed"
|
||||
else
|
||||
msg_ok "No update required. ${APP} images are already at ${IMG_RELEASE}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
@ -11,7 +11,7 @@ var_cpu="1"
|
||||
var_ram="1024"
|
||||
var_disk="2"
|
||||
var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
|
@ -11,7 +11,7 @@ var_cpu="1"
|
||||
var_ram="256"
|
||||
var_disk="1"
|
||||
var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
|
62
ct/alpine-it-tools.sh
Normal file
62
ct/alpine-it-tools.sh
Normal file
@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: nicedevil007 (NiceDevil)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
|
||||
# App Default Values
|
||||
APP="Alpine-IT-Tools"
|
||||
var_tags="alpine;development"
|
||||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_disk="0.2"
|
||||
var_os="alpine"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /usr/share/nginx/html ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
|
||||
msg_info "Updating ${APP} LXC"
|
||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
|
||||
mkdir -p /usr/share/nginx/html
|
||||
rm -rf /usr/share/nginx/html/*
|
||||
unzip -q it-tools.zip -d /tmp/it-tools
|
||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
|
||||
rm -rf /tmp/it-tools
|
||||
rm -f it-tools.zip
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
@ -11,7 +11,7 @@ var_cpu="2"
|
||||
var_ram="1024"
|
||||
var_disk="2"
|
||||
var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
|
@ -9,9 +9,9 @@ APP="Alpine-Vaultwarden"
|
||||
var_tags="alpine;vault"
|
||||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_disk="0.3"
|
||||
var_disk="0.5"
|
||||
var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
|
@ -11,7 +11,7 @@ var_disk="0.3"
|
||||
var_cpu="1"
|
||||
var_ram="256"
|
||||
var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_version="3.21"
|
||||
var_unprivileged="0"
|
||||
|
||||
# App Output & Base Settings
|
||||
|
@ -11,7 +11,7 @@ var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="0.1"
|
||||
var_os="alpine"
|
||||
var_version="3.20"
|
||||
var_version="3.21"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
|
75
ct/baikal.sh
Normal file
75
ct/baikal.sh
Normal file
@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://sabre.io/baikal/
|
||||
|
||||
# App Default Values
|
||||
APP="Baikal"
|
||||
var_tags="Dav"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/baikal ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop apache2
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
wget -q "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip"
|
||||
mv /opt/baikal /opt/baikal-backup
|
||||
unzip -o -q "baikal-${RELEASE}.zip"
|
||||
cp -r /opt/baikal-backup/config/baikal.yaml /opt/baikal/config/
|
||||
cp -r /opt/baikal-backup/Specific/ /opt/baikal/
|
||||
chown -R www-data:www-data /opt/baikal/
|
||||
chmod -R 755 /opt/baikal/
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start apache2
|
||||
msg_ok "Started Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf "/opt/baikal-${RELEASE}.zip"
|
||||
rm -rf /opt/baikal-backup
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
@ -1,6 +0,0 @@
|
||||
______ __ __
|
||||
/ ____/__ / /_____ ____ / /____
|
||||
/___ \/ _ \/ __/ __ \/ __ \/ / ___/
|
||||
____/ / __/ /_/ /_/ / /_/ / (__ )
|
||||
/_____/\___/\__/\____/\____/_/____/
|
||||
|
6
ct/headers/alpine-it-tools
Normal file
6
ct/headers/alpine-it-tools
Normal file
@ -0,0 +1,6 @@
|
||||
___ __ _ __________ ______ __
|
||||
/ | / /___ (_)___ ___ / _/_ __/ /_ __/___ ____ / /____
|
||||
/ /| | / / __ \/ / __ \/ _ \______ / / / /_____/ / / __ \/ __ \/ / ___/
|
||||
/ ___ |/ / /_/ / / / / / __/_____// / / /_____/ / / /_/ / /_/ / (__ )
|
||||
/_/ |_/_/ .___/_/_/ /_/\___/ /___/ /_/ /_/ \____/\____/_/____/
|
||||
/_/
|
6
ct/headers/baikal
Normal file
6
ct/headers/baikal
Normal file
@ -0,0 +1,6 @@
|
||||
____ _ __ __
|
||||
/ __ )____ _(_) /______ _/ /
|
||||
/ __ / __ `/ / //_/ __ `/ /
|
||||
/ /_/ / /_/ / / ,< / /_/ / /
|
||||
/_____/\__,_/_/_/|_|\__,_/_/
|
||||
|
6
ct/headers/mattermost
Normal file
6
ct/headers/mattermost
Normal file
@ -0,0 +1,6 @@
|
||||
__ ___ __ __ __
|
||||
/ |/ /___ _/ /_/ /____ _________ ___ ____ _____/ /_
|
||||
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ `__ \/ __ \/ ___/ __/
|
||||
/ / / / /_/ / /_/ /_/ __/ / / / / / / / /_/ (__ ) /_
|
||||
/_/ /_/\__,_/\__/\__/\___/_/ /_/ /_/ /_/\____/____/\__/
|
||||
|
6
ct/headers/monica
Normal file
6
ct/headers/monica
Normal file
@ -0,0 +1,6 @@
|
||||
__ ___ _
|
||||
/ |/ /___ ____ (_)________ _
|
||||
/ /|_/ / __ \/ __ \/ / ___/ __ `/
|
||||
/ / / / /_/ / / / / / /__/ /_/ /
|
||||
/_/ /_/\____/_/ /_/_/\___/\__,_/
|
||||
|
6
ct/headers/nodebb
Normal file
6
ct/headers/nodebb
Normal file
@ -0,0 +1,6 @@
|
||||
_ __ __ ____ ____
|
||||
/ | / /___ ____/ /__ / __ )/ __ )
|
||||
/ |/ / __ \/ __ / _ \/ __ / __ |
|
||||
/ /| / /_/ / /_/ / __/ /_/ / /_/ /
|
||||
/_/ |_/\____/\__,_/\___/_____/_____/
|
||||
|
6
ct/headers/paymenter
Normal file
6
ct/headers/paymenter
Normal file
@ -0,0 +1,6 @@
|
||||
____ __
|
||||
/ __ \____ ___ ______ ___ ___ ____ / /____ _____
|
||||
/ /_/ / __ `/ / / / __ `__ \/ _ \/ __ \/ __/ _ \/ ___/
|
||||
/ ____/ /_/ / /_/ / / / / / / __/ / / / /_/ __/ /
|
||||
/_/ \__,_/\__, /_/ /_/ /_/\___/_/ /_/\__/\___/_/
|
||||
/____/
|
@ -1,6 +0,0 @@
|
||||
____ _______ ______ __
|
||||
/ __ \/ __/__ \ ___/_ __/___ ____ / /____
|
||||
/ /_/ / /_ __/ // _ \/ / / __ \/ __ \/ / ___/
|
||||
/ ____/ __// __// __/ / / /_/ / /_/ / (__ )
|
||||
/_/ /_/ /____/\___/_/ \____/\____/_/____/
|
||||
|
6
ct/headers/pocketid
Normal file
6
ct/headers/pocketid
Normal file
@ -0,0 +1,6 @@
|
||||
____ __ __ ________
|
||||
/ __ \____ _____/ /_____ / /_/ _/ __ \
|
||||
/ /_/ / __ \/ ___/ //_/ _ \/ __// // / / /
|
||||
/ ____/ /_/ / /__/ ,< / __/ /__/ // /_/ /
|
||||
/_/ \____/\___/_/|_|\___/\__/___/_____/
|
||||
|
12
ct/headers/prometheus-pve-exporter
Normal file
12
ct/headers/prometheus-pve-exporter
Normal file
@ -0,0 +1,12 @@
|
||||
____ __ __ ____
|
||||
/ __ \_________ ____ ___ ___ / /_/ /_ ___ __ _______ / __ \
|
||||
/ /_/ / ___/ __ \/ __ `__ \/ _ \/ __/ __ \/ _ \/ / / / ___/_____/ /_/ /
|
||||
/ ____/ / / /_/ / / / / / / __/ /_/ / / / __/ /_/ (__ )_____/ ____/
|
||||
/_/ /_/ \____/_/ /_/ /_/\___/\__/_/ /_/\___/\__,_/____/ /_/
|
||||
|
||||
_ ________ ______ __
|
||||
| | / / ____/ / ____/ ______ ____ _____/ /____ _____
|
||||
| | / / __/______/ __/ | |/_/ __ \/ __ \/ ___/ __/ _ \/ ___/
|
||||
| |/ / /__/_____/ /____> </ /_/ / /_/ / / / /_/ __/ /
|
||||
|___/_____/ /_____/_/|_/ .___/\____/_/ \__/\___/_/
|
||||
/_/
|
41
ct/homarr.sh
41
ct/homarr.sh
@ -9,7 +9,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
|
||||
APP="Homarr"
|
||||
var_tags="arr;dashboard"
|
||||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_ram="4096"
|
||||
var_disk="8"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
@ -32,46 +32,47 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ -f /opt/homarr/database/db.sqlite ]]; then
|
||||
msg_error "Old Homarr detected due to existing database file (/opt/homarr/database/db.sqlite)."
|
||||
msg_error "Update not supported. Refer to:"
|
||||
msg_error " - https://github.com/community-scripts/ProxmoxVE/discussions/1551"
|
||||
msg_error " - https://homarr.dev/docs/getting-started/after-the-installation/#importing-a-zip-from-version-before-100"
|
||||
exit 1
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/homarr-labs/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop homarr
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
msg_info "Backup Data"
|
||||
mkdir -p /opt/homarr-data-backup
|
||||
cp /opt/homarr/.env /opt/homarr-data-backup/.env
|
||||
cp /opt/homarr/database/db.sqlite /opt/homarr-data-backup/db.sqlite
|
||||
cp -r /opt/homarr/data/configs /opt/homarr-data-backup/configs
|
||||
msg_ok "Backed up Data"
|
||||
msg_ok "Backup Data"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
wget -q "https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.zip"
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
wget -q "https://github.com/homarr-labs/homarr/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
rm -rf v${RELEASE}.zip
|
||||
rm -rf /opt/homarr
|
||||
mv homarr-${RELEASE} /opt/homarr
|
||||
mv /opt/homarr-data-backup/.env /opt/homarr/.env
|
||||
cd /opt/homarr
|
||||
yarn install &>/dev/null
|
||||
yarn build &>/dev/null
|
||||
pnpm install &>/dev/null
|
||||
pnpm run db:migration:sqlite:run &>/dev/null
|
||||
pnpm build &>/dev/null
|
||||
mkdir build
|
||||
cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
rm -rf /opt/homarr/data/configs
|
||||
mv /opt/homarr-data-backup/configs /opt/homarr/data/configs
|
||||
mv /opt/homarr-data-backup/db.sqlite /opt/homarr/database/db.sqlite
|
||||
yarn db:migrate &>/dev/null
|
||||
rm -rf /opt/homarr-data-backup
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start homarr
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
@ -83,4 +84,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
|
49
ct/mattermost.sh
Normal file
49
ct/mattermost.sh
Normal file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Kaedon Cleland-Host (dracentis)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://mattermost.com/
|
||||
|
||||
# App Default Values
|
||||
APP="Mattermost"
|
||||
var_tags="collaboration"
|
||||
var_cpu="1"
|
||||
var_ram="2048"
|
||||
var_disk="8"
|
||||
var_os="ubuntu"
|
||||
var_version="24.04"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/apt/sources.list.d/mattermost.list ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP} LXC"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade &>/dev/null
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8065${CL}"
|
81
ct/monica.sh
Normal file
81
ct/monica.sh
Normal file
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.monicahq.com/
|
||||
|
||||
# App Default Values
|
||||
APP="Monica"
|
||||
var_tags="network"
|
||||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_disk="8"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/monica ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/monicahq/monica/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop apache2
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt
|
||||
mv /opt/monica/ /opt/monica-backup
|
||||
wget -q "https://github.com/monicahq/monica/releases/download/v${RELEASE}/monica-v${RELEASE}.tar.bz2"
|
||||
tar -xjf "monica-v${RELEASE}.tar.bz2"
|
||||
mv "/opt/monica-v${RELEASE}" /opt/monica
|
||||
cd /opt/monica/
|
||||
cp -r /opt/monica-backup/.env /opt/monica
|
||||
cp -r /opt/monica-backup/storage/* /opt/monica/storage/
|
||||
composer install --no-interaction --no-dev &>/dev/null
|
||||
yarn install &>/dev/null
|
||||
yarn run production &>/dev/null
|
||||
php artisan monica:update --force &>/dev/null
|
||||
chown -R www-data:www-data /opt/monica
|
||||
chmod -R 775 /opt/monica/storage
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start apache2
|
||||
msg_ok "Started Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -r "/opt/monica-v${RELEASE}.tar.bz2"
|
||||
rm -r /opt/monica-backup
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
63
ct/nodebb.sh
Normal file
63
ct/nodebb.sh
Normal file
@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (Canbiz)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
# App Default Values
|
||||
APP="NodeBB"
|
||||
var_tags="forum"
|
||||
var_disk="10"
|
||||
var_cpu="4"
|
||||
var_ram="2048"
|
||||
var_os="ubuntu"
|
||||
var_version="24.04"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/nodebb ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/NodeBB/NodeBB/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop nodebb
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
cd /opt/nodebb
|
||||
./nodebb upgrade >/dev/null 2>&1
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start nodebb
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4567${CL}"
|
56
ct/paymenter.sh
Normal file
56
ct/paymenter.sh
Normal file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Nícolas Pastorello (opastorello)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
# App Default Values
|
||||
APP="Paymenter"
|
||||
var_tags="hosting;ecommerce;marketplace;"
|
||||
var_cpu="2"
|
||||
var_ram="1024"
|
||||
var_disk="5"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/paymenter ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
cd /opt/paymenter
|
||||
php artisan p:upgrade --no-interaction &>/dev/null
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}"
|
@ -1,81 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: TheRealVira
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://pf2etools.com/
|
||||
|
||||
# App Default Values
|
||||
APP="Pf2eTools"
|
||||
var_tags="wiki"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="6"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
# Check if installation is present | -f for file, -d for folder
|
||||
if [[ ! -d "/opt/${APP}" ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f "/opt/${APP}_version.txt" ]]; then
|
||||
# Crawling the new version and checking whether an update is required
|
||||
msg_info "Updating System"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade &>/dev/null
|
||||
msg_ok "Updated System"
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating ${APP}"
|
||||
cd /opt
|
||||
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q ${RELEASE}.zip
|
||||
rm -rf "/opt/${APP}"
|
||||
mv ${APP}-${RELEASE:1} /opt/${APP}
|
||||
cd /opt/Pf2eTools
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
chown -R www-data: "/opt/${APP}"
|
||||
chmod -R 755 "/opt/${APP}"
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleanup Completed"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
@ -32,30 +32,42 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Stopping Pingvin Share"
|
||||
systemctl stop pm2-root.service
|
||||
msg_ok "Stopped Pingvin Share"
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/stonith404/pingvin-share/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/$pingvin_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/pingvin_version.txt)" ]]; then
|
||||
|
||||
msg_info "Stopping Pingvin Share"
|
||||
systemctl stop pm2-root.service
|
||||
msg_ok "Stopped Pingvin Share"
|
||||
|
||||
msg_info "Updating Pingvin Share to v${RELEASE}"
|
||||
cd /opt
|
||||
wget -q "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv pingvin-share-${RELEASE} /opt/pingvin-share
|
||||
cd /opt/pingvin-share
|
||||
cd backend
|
||||
npm install &>/dev/null
|
||||
npm run build &>/dev/null
|
||||
cd ../frontend
|
||||
npm install &>/dev/null
|
||||
npm run build &>/dev/null
|
||||
echo "${RELEASE}" >"/opt/pingvin_version.txt"
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
msg_ok "Updated Pingvin Share to v${RELEASE}"
|
||||
|
||||
msg_info "Updating Pingvin Share"
|
||||
cd /opt/pingvin-share
|
||||
git fetch --tags
|
||||
git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) &>/dev/null
|
||||
cd backend
|
||||
npm install &>/dev/null
|
||||
npm run build &>/dev/null
|
||||
cd ../frontend
|
||||
npm install &>/dev/null
|
||||
npm run build &>/dev/null
|
||||
msg_ok "Updated Pingvin Share"
|
||||
msg_info "Starting Pingvin Share"
|
||||
systemctl start pm2-root.service
|
||||
msg_ok "Started Pingvin Share"
|
||||
|
||||
msg_info "Starting Pingvin Share"
|
||||
systemctl start pm2-root.service
|
||||
msg_ok "Started Pingvin Share"
|
||||
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
else
|
||||
msg_ok "No update required. Pingvin Share is already at v${RELEASE}."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
@ -63,4 +75,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
|
95
ct/pocketid.sh
Executable file
95
ct/pocketid.sh
Executable file
@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Snarkenfaugister
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/stonith404/pocket-id
|
||||
|
||||
# App Default Values
|
||||
APP="PocketID"
|
||||
TAGS="identity-provider"
|
||||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/pocket-id ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/stonith404/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Updating $APP"
|
||||
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop pocketid-backend.service
|
||||
systemctl stop pocketid-frontend.service
|
||||
systemctl stop caddy.service
|
||||
msg_ok "Stopped $APP"
|
||||
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
cd /opt
|
||||
cp -r /opt/pocket-id/backend/data /opt/data
|
||||
cp /opt/pocket-id/backend/.env /opt/backend.env
|
||||
cp /opt/pocket-id/frontend/.env /opt/frontend.env
|
||||
rm -r /opt/pocket-id
|
||||
wget -q "https://github.com/stonith404/pocket-id/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv pocket-id-${RELEASE} /opt/pocket-id
|
||||
mv /opt/data /opt/pocket-id/backend/data
|
||||
mv /opt/backend.env /opt/pocket-id/backend/.env
|
||||
mv /opt/frontend.env /opt/pocket-id/frontend/.env
|
||||
|
||||
cd /opt/pocket-id/backend/cmd
|
||||
go build -o ../pocket-id-backend
|
||||
cd ../../frontend
|
||||
npm install
|
||||
npm run build
|
||||
msg_ok "Updated $APP to ${RELEASE}"
|
||||
|
||||
msg_info "Starting $APP"
|
||||
systemctl start pocketid-backend.service
|
||||
systemctl start pocketid-frontend.service
|
||||
systemctl start caddy.service
|
||||
sleep 2
|
||||
msg_ok "Started $APP"
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -f /opt/v${RELEASE}.zip
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Configure your reverse proxy to point to:${BGN} ${IP}:80${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://{PUBLIC_URL}/login/setup${CL}"
|
57
ct/prometheus-pve-exporter.sh
Normal file
57
ct/prometheus-pve-exporter.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Andy Grunwald (andygrunwald)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/prometheus-pve/prometheus-pve-exporter
|
||||
|
||||
# App Default Values
|
||||
APP="Prometheus-PVE-Exporter"
|
||||
var_tags="monitoring"
|
||||
var_cpu="1"
|
||||
var_ram="1024"
|
||||
var_disk="2"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /etc/systemd/system/prometheus-pve-exporter.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop prometheus-pve-exporter
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating ${APP}"
|
||||
pip install prometheus-pve-exporter --upgrade --root-user-action=ignore &>/dev/null
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start prometheus-pve-exporter
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9221${CL}"
|
@ -35,22 +35,22 @@ function update_script() {
|
||||
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop trilium.service
|
||||
systemctl stop trilium
|
||||
sleep 1
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating to ${RELEASE}"
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-linux-x64-${RELEASE}.tar.xz
|
||||
tar -xf TriliumNextNotes-linux-x64-${RELEASE}.tar.xz
|
||||
cp -r trilium-linux-x64-server/* /opt/trilium/
|
||||
msg_ok "Updated to ${RELEASE}"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz trilium-linux-x64-server
|
||||
rm -rf TriliumNextNotes-linux-x64-${RELEASE}.tar.xz trilium-linux-x64-server
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start trilium.service
|
||||
systemctl start trilium
|
||||
sleep 1
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
@ -64,4 +64,4 @@ description
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||
|
99
frontend/package-lock.json
generated
99
frontend/package-lock.json
generated
@ -23,6 +23,8 @@
|
||||
"@radix-ui/react-tabs": "^1.1.0",
|
||||
"@radix-ui/react-tooltip": "^1.1.2",
|
||||
"@vercel/analytics": "^1.2.2",
|
||||
"chart.js": "^4.4.1",
|
||||
"chartjs-plugin-datalabels": "^2.2.0",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.0.0",
|
||||
@ -37,7 +39,9 @@
|
||||
"pocketbase": "^0.21.4",
|
||||
"prettier-plugin-organize-imports": "^4.1.0",
|
||||
"react": "19.0.0-rc-02c0e824-20241028",
|
||||
"react-chartjs-2": "^5.3.0",
|
||||
"react-code-blocks": "^0.1.6",
|
||||
"react-datepicker": "^7.6.0",
|
||||
"react-day-picker": "8.10.1",
|
||||
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
||||
"react-icons": "^5.1.0",
|
||||
@ -1083,9 +1087,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/utils": {
|
||||
"version": "0.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz",
|
||||
"integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==",
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz",
|
||||
"integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@humanfs/core": {
|
||||
@ -1572,6 +1576,12 @@
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@kurkle/color": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz",
|
||||
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "15.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.3.tgz",
|
||||
@ -3194,7 +3204,7 @@
|
||||
"version": "19.0.0-rc.1",
|
||||
"resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz",
|
||||
"integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==",
|
||||
"devOptional": true,
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
@ -3204,7 +3214,7 @@
|
||||
"version": "19.0.0-rc.1",
|
||||
"resolved": "https://registry.npmjs.org/types-react-dom/-/types-react-dom-19.0.0-rc.1.tgz",
|
||||
"integrity": "sha512-VSLZJl8VXCD0fAWp7DUTFUDCcZ8DVXOQmjhJMD03odgeFmu14ZQJHCXeETm3BEAhJqfgJaFkLnGkQv88sRx0fQ==",
|
||||
"devOptional": true,
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
@ -4152,6 +4162,27 @@
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "4.4.7",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.7.tgz",
|
||||
"integrity": "sha512-pwkcKfdzTMAU/+jNosKhNL2bHtJc/sSmYgVbuGTEDhzkrhmyihmP7vUc/5ZK9WopidMDHNe3Wm7jOd/WhuHWuw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@kurkle/color": "^0.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"pnpm": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/chartjs-plugin-datalabels": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/chartjs-plugin-datalabels/-/chartjs-plugin-datalabels-2.2.0.tgz",
|
||||
"integrity": "sha512-14ZU30lH7n89oq+A4bWaJPnAG8a7ZTk7dKf48YAzMvJjQtjrgg5Dpk9f+LbjCF6bpx3RAGTeL13IXpKQYyRvlw==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"chart.js": ">=3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/check-error": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz",
|
||||
@ -7774,6 +7805,7 @@
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
@ -7999,6 +8031,16 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-chartjs-2": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/react-chartjs-2/-/react-chartjs-2-5.3.0.tgz",
|
||||
"integrity": "sha512-UfZZFnDsERI3c3CZGxzvNJd02SHjaSJ8kgW1djn65H1KK8rehwTjyrRKOG3VTMG8wtHZ5rgAO5oTHtHi9GCCmw==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"chart.js": "^4.1.1",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-code-blocks": {
|
||||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmjs.org/react-code-blocks/-/react-code-blocks-0.1.6.tgz",
|
||||
@ -8017,6 +8059,46 @@
|
||||
"react": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/react-datepicker": {
|
||||
"version": "7.6.0",
|
||||
"resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-7.6.0.tgz",
|
||||
"integrity": "sha512-9cQH6Z/qa4LrGhzdc3XoHbhrxNcMi9MKjZmYgF/1MNNaJwvdSjv3Xd+jjvrEEbKEf71ZgCA3n7fQbdwd70qCRw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@floating-ui/react": "^0.27.0",
|
||||
"clsx": "^2.1.1",
|
||||
"date-fns": "^3.6.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc",
|
||||
"react-dom": "^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc"
|
||||
}
|
||||
},
|
||||
"node_modules/react-datepicker/node_modules/@floating-ui/react": {
|
||||
"version": "0.27.3",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.27.3.tgz",
|
||||
"integrity": "sha512-CLHnes3ixIFFKVQDdICjel8muhFLOBdQH7fgtHNPY8UbCNqbeKZ262G7K66lGQOUQWWnYocf7ZbUsLJgGfsLHg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@floating-ui/react-dom": "^2.1.2",
|
||||
"@floating-ui/utils": "^0.2.9",
|
||||
"tabbable": "^6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=17.0.0",
|
||||
"react-dom": ">=17.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-datepicker/node_modules/date-fns": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz",
|
||||
"integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/kossnocorp"
|
||||
}
|
||||
},
|
||||
"node_modules/react-day-picker": {
|
||||
"version": "8.10.1",
|
||||
"resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.1.tgz",
|
||||
@ -9055,6 +9137,12 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tabbable": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz",
|
||||
"integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tailwind-merge": {
|
||||
"version": "2.5.4",
|
||||
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz",
|
||||
@ -9420,6 +9508,7 @@
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
|
||||
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
|
@ -34,6 +34,8 @@
|
||||
"@radix-ui/react-tabs": "^1.1.0",
|
||||
"@radix-ui/react-tooltip": "^1.1.2",
|
||||
"@vercel/analytics": "^1.2.2",
|
||||
"chart.js": "^4.4.1",
|
||||
"chartjs-plugin-datalabels": "^2.2.0",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.0.0",
|
||||
@ -48,7 +50,9 @@
|
||||
"pocketbase": "^0.21.4",
|
||||
"prettier-plugin-organize-imports": "^4.1.0",
|
||||
"react": "19.0.0-rc-02c0e824-20241028",
|
||||
"react-chartjs-2": "^5.3.0",
|
||||
"react-code-blocks": "^0.1.6",
|
||||
"react-datepicker": "^7.6.0",
|
||||
"react-day-picker": "8.10.1",
|
||||
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
||||
"react-icons": "^5.1.0",
|
||||
@ -63,20 +67,20 @@
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.0.1",
|
||||
"@types/node": "^22",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
||||
"@typescript-eslint/parser": "^8.8.1",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"eslint-config-next": "15.0.2",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-config-next": "15.0.2",
|
||||
"jsdom": "^25.0.1",
|
||||
"postcss": "^8",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"tailwindcss": "^3.4.9",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"tailwindcss-animated": "^1.1.2",
|
||||
"tailwindcss": "^3.4.9",
|
||||
"typescript": "^5",
|
||||
"vite-tsconfig-paths": "^5.1.3",
|
||||
"vitest": "^2.1.6"
|
||||
|
@ -4,15 +4,33 @@ import React, { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||
import { Category } from "@/lib/types";
|
||||
|
||||
const defaultLogo = "/default-logo.png"; // Fallback logo path
|
||||
|
||||
const MAX_DESCRIPTION_LENGTH = 100; // Set max length for description
|
||||
const MAX_LOGOS = 5; // Max logos to display at once
|
||||
|
||||
const formattedBadge = (type: string) => {
|
||||
switch (type) {
|
||||
case "vm":
|
||||
return <Badge className="text-blue-500/75 border-blue-500/75 badge">VM</Badge>;
|
||||
case "ct":
|
||||
return (
|
||||
<Badge className="text-yellow-500/75 border-yellow-500/75 badge">LXC</Badge>
|
||||
);
|
||||
case "misc":
|
||||
return <Badge className="text-green-500/75 border-green-500/75 badge">MISC</Badge>;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
const CategoryView = () => {
|
||||
const [categories, setCategories] = useState<Category[]>([]);
|
||||
const [selectedCategory, setSelectedCategory] = useState<Category | null>(null);
|
||||
const [selectedCategoryIndex, setSelectedCategoryIndex] = useState<number | null>(null);
|
||||
const [currentScripts, setCurrentScripts] = useState<any[]>([]);
|
||||
const [logoIndices, setLogoIndices] = useState<{ [key: string]: number }>({});
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
@ -24,8 +42,14 @@ const CategoryView = () => {
|
||||
throw new Error("Failed to fetch categories");
|
||||
}
|
||||
const data = await response.json();
|
||||
console.log("Fetched categories:", data); // Debugging
|
||||
setCategories(data);
|
||||
|
||||
// Initialize logo indices
|
||||
const initialLogoIndices: { [key: string]: number } = {};
|
||||
data.forEach((category: any) => {
|
||||
initialLogoIndices[category.name] = 0;
|
||||
});
|
||||
setLogoIndices(initialLogoIndices);
|
||||
} catch (error) {
|
||||
console.error("Error fetching categories:", error);
|
||||
}
|
||||
@ -34,91 +58,209 @@ const CategoryView = () => {
|
||||
fetchCategories();
|
||||
}, []);
|
||||
|
||||
const handleCategoryClick = (category: Category) => {
|
||||
setSelectedCategory(category);
|
||||
const handleCategoryClick = (index: number) => {
|
||||
setSelectedCategoryIndex(index);
|
||||
setCurrentScripts(categories[index]?.scripts || []); // Update scripts for the selected category
|
||||
};
|
||||
|
||||
const handleBackClick = () => {
|
||||
setSelectedCategory(null);
|
||||
setSelectedCategoryIndex(null);
|
||||
setCurrentScripts([]); // Clear scripts when going back
|
||||
};
|
||||
|
||||
const handleScriptClick = (scriptSlug: string) => {
|
||||
router.push(`/scripts?id=${scriptSlug}`);
|
||||
};
|
||||
|
||||
const navigateCategory = (direction: "prev" | "next") => {
|
||||
if (selectedCategoryIndex !== null) {
|
||||
const newIndex =
|
||||
direction === "prev"
|
||||
? (selectedCategoryIndex - 1 + categories.length) % categories.length
|
||||
: (selectedCategoryIndex + 1) % categories.length;
|
||||
setSelectedCategoryIndex(newIndex);
|
||||
setCurrentScripts(categories[newIndex]?.scripts || []); // Update scripts for the new category
|
||||
}
|
||||
};
|
||||
|
||||
const switchLogos = (categoryName: string, direction: "prev" | "next") => {
|
||||
setLogoIndices((prev) => {
|
||||
const currentIndex = prev[categoryName] || 0;
|
||||
const category = categories.find((cat) => cat.name === categoryName);
|
||||
if (!category || !category.scripts) return prev;
|
||||
|
||||
const totalLogos = category.scripts.length;
|
||||
const newIndex =
|
||||
direction === "prev"
|
||||
? (currentIndex - MAX_LOGOS + totalLogos) % totalLogos
|
||||
: (currentIndex + MAX_LOGOS) % totalLogos;
|
||||
|
||||
return { ...prev, [categoryName]: newIndex };
|
||||
});
|
||||
};
|
||||
|
||||
const truncateDescription = (text: string) => {
|
||||
return text.length > MAX_DESCRIPTION_LENGTH
|
||||
? `${text.slice(0, MAX_DESCRIPTION_LENGTH)}...`
|
||||
: text;
|
||||
};
|
||||
|
||||
const renderResources = (script: any) => {
|
||||
const cpu = script.install_methods[0]?.resources.cpu;
|
||||
const ram = script.install_methods[0]?.resources.ram;
|
||||
const hdd = script.install_methods[0]?.resources.hdd;
|
||||
|
||||
const resourceParts = [];
|
||||
if (cpu) resourceParts.push(<span key="cpu"><b>CPU:</b> {cpu}vCPU</span>);
|
||||
if (ram) resourceParts.push(<span key="ram"><b>RAM:</b> {ram}MB</span>);
|
||||
if (hdd) resourceParts.push(<span key="hdd"><b>HDD:</b> {hdd}GB</span>);
|
||||
|
||||
return resourceParts.length > 0 ? (
|
||||
<div className="text-sm text-gray-400">
|
||||
{resourceParts.map((part, index) => (
|
||||
<React.Fragment key={index}>
|
||||
{part}
|
||||
{index < resourceParts.length - 1 && " | "}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
) : null;
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="p-4 mt-20">
|
||||
<div className="p-6 mt-20">
|
||||
{categories.length === 0 && (
|
||||
<p className="text-center text-gray-500">No categories available. Please check the API endpoint.</p>
|
||||
)}
|
||||
{selectedCategory ? (
|
||||
{selectedCategoryIndex !== null ? (
|
||||
<div>
|
||||
<Button variant="default" onClick={handleBackClick} className="mb-4">
|
||||
Back to Categories
|
||||
</Button>
|
||||
<h2 className="text-xl font-semibold mb-4">{selectedCategory.name}</h2>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
||||
{selectedCategory.scripts
|
||||
{/* Header with Navigation */}
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() => navigateCategory("prev")}
|
||||
className="p-2 transition-transform duration-300 hover:scale-105"
|
||||
>
|
||||
<ChevronLeft className="h-6 w-6" />
|
||||
</Button>
|
||||
<h2 className="text-3xl font-semibold transition-opacity duration-300 hover:opacity-90">
|
||||
{categories[selectedCategoryIndex].name}
|
||||
</h2>
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() => navigateCategory("next")}
|
||||
className="p-2 transition-transform duration-300 hover:scale-105"
|
||||
>
|
||||
<ChevronRight className="h-6 w-6" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Scripts Grid */}
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-6">
|
||||
{currentScripts
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
.map((script) => (
|
||||
<Card key={script.name} className="p-4 cursor-pointer" onClick={() => handleScriptClick(script.slug)}>
|
||||
<Card
|
||||
key={script.name}
|
||||
className="p-4 cursor-pointer hover:shadow-md transition-shadow duration-300"
|
||||
onClick={() => handleScriptClick(script.slug)}
|
||||
>
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<img
|
||||
src={script.logo || defaultLogo}
|
||||
alt={script.name}
|
||||
className="h-12 w-12 object-contain"
|
||||
/>
|
||||
<div>
|
||||
<h3 className="text-lg font-bold">{script.name}</h3>
|
||||
<p className="text-sm text-gray-500"><b>Created at:</b> {script.date_created || "No date available"}</p>
|
||||
<p className="text-sm text-gray-700">
|
||||
{truncateDescription(script.description || "No description available.")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-sm text-gray-600">
|
||||
<b>CPU:</b> {script.install_methods[0]?.resources.cpu || "N/A"}vCPU | <b>RAM:</b> {script.install_methods[0]?.resources.ram || "N/A"}MB | <b>HDD:</b> {script.install_methods[0]?.resources.hdd || "N/A"}GB
|
||||
</div>
|
||||
<h3 className="text-lg font-bold script-text text-center hover:text-blue-600 transition-colors duration-300">
|
||||
{script.name}
|
||||
</h3>
|
||||
<img
|
||||
src={script.logo || defaultLogo}
|
||||
alt={script.name || "Script logo"}
|
||||
className="h-12 w-12 object-contain mx-auto"
|
||||
/>
|
||||
<p className="text-sm text-gray-500 text-center">
|
||||
<b>Created at:</b> {script.date_created || "No date available"}
|
||||
</p>
|
||||
<p
|
||||
className="text-sm text-gray-700 hover:text-gray-900 text-center transition-colors duration-300"
|
||||
title={script.description || "No description available."}
|
||||
>
|
||||
{truncateDescription(script.description || "No description available.")}
|
||||
</p>
|
||||
{renderResources(script)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Back to Categories Button */}
|
||||
<div className="mt-8 text-center">
|
||||
<Button
|
||||
variant="default"
|
||||
onClick={handleBackClick}
|
||||
className="px-6 py-2 text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow-md transition-transform duration-300 hover:scale-105"
|
||||
>
|
||||
Back to Categories
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<div className="flex justify-between items-center mb-6">
|
||||
<h1 className="text-2xl font-bold">Categories</h1>
|
||||
{/* Categories Grid */}
|
||||
<div className="flex justify-between items-center mb-8">
|
||||
<h1 className="text-3xl font-semibold mb-4">Categories</h1>
|
||||
<p className="text-sm text-gray-500">
|
||||
{categories.reduce((acc, cat) => acc + (cat.scripts?.length || 0), 0)} Total scripts
|
||||
{categories.reduce((total, category) => total + (category.scripts?.length || 0), 0)} Total scripts
|
||||
</p>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
||||
{categories.map((category) => (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-8">
|
||||
{categories.map((category, index) => (
|
||||
<Card
|
||||
key={category.name}
|
||||
onClick={() => handleCategoryClick(category)}
|
||||
className="cursor-pointer hover:shadow-lg flex flex-col items-center justify-center"
|
||||
onClick={() => handleCategoryClick(index)}
|
||||
className="cursor-pointer hover:shadow-lg flex flex-col items-center justify-center py-6 transition-shadow duration-300"
|
||||
>
|
||||
<CardContent className="flex flex-col items-center">
|
||||
<div className="flex flex-wrap justify-center gap-1 mb-2">
|
||||
{category.scripts && category.scripts.slice(0, 4).map((script, index) => (
|
||||
<img
|
||||
key={index}
|
||||
src={script.logo || defaultLogo}
|
||||
alt={script.name || "Script logo"}
|
||||
className="h-6 w-6 object-contain"
|
||||
/>
|
||||
))}
|
||||
<h3 className="text-xl font-bold mb-4 category-title transition-colors duration-300 hover:text-blue-600">
|
||||
{category.name}
|
||||
</h3>
|
||||
<div className="flex justify-center items-center gap-2 mb-4">
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
switchLogos(category.name, "prev");
|
||||
}}
|
||||
className="p-1 transition-transform duration-300 hover:scale-110"
|
||||
>
|
||||
<ChevronLeft className="h-4 w-4" />
|
||||
</Button>
|
||||
{category.scripts &&
|
||||
category.scripts
|
||||
.slice(logoIndices[category.name] || 0, (logoIndices[category.name] || 0) + MAX_LOGOS)
|
||||
.map((script, i) => (
|
||||
<div key={i} className="flex flex-col items-center">
|
||||
<img
|
||||
src={script.logo || defaultLogo}
|
||||
alt={script.name || "Script logo"}
|
||||
title={script.name}
|
||||
className="h-8 w-8 object-contain cursor-pointer"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleScriptClick(script.slug);
|
||||
}}
|
||||
/>
|
||||
{formattedBadge(script.type)}
|
||||
</div>
|
||||
))}
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
switchLogos(category.name, "next");
|
||||
}}
|
||||
className="p-1 transition-transform duration-300 hover:scale-110"
|
||||
>
|
||||
<ChevronRight className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
<h3 className="text-lg font-bold mb-1">{category.name}</h3>
|
||||
<p className="text-sm text-gray-500 text-center">
|
||||
<p className="text-sm text-gray-400 text-center">
|
||||
{(category as any).description || "No description available."}
|
||||
</p>
|
||||
</CardContent>
|
||||
@ -131,4 +273,4 @@ const CategoryView = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default CategoryView;
|
||||
export default CategoryView;
|
||||
|
346
frontend/src/app/data/page.tsx
Normal file
346
frontend/src/app/data/page.tsx
Normal file
@ -0,0 +1,346 @@
|
||||
"use client";
|
||||
|
||||
import ApplicationChart from "@/components/ApplicationChart";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Calendar } from "@/components/ui/calendar";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import {
|
||||
Popover,
|
||||
PopoverContent,
|
||||
PopoverTrigger,
|
||||
} from "@/components/ui/popover";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { format } from "date-fns";
|
||||
import { Calendar as CalendarIcon } from "lucide-react";
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
|
||||
interface DataModel {
|
||||
id: number;
|
||||
ct_type: number;
|
||||
disk_size: number;
|
||||
core_count: number;
|
||||
ram_size: number;
|
||||
verbose: string;
|
||||
os_type: string;
|
||||
os_version: string;
|
||||
hn: string;
|
||||
disableip6: string;
|
||||
ssh: string;
|
||||
tags: string;
|
||||
nsapp: string;
|
||||
created_at: string;
|
||||
method: string;
|
||||
pve_version: string;
|
||||
status: string;
|
||||
}
|
||||
|
||||
|
||||
const DataFetcher: React.FC = () => {
|
||||
const [data, setData] = useState<DataModel[]>([]);
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [searchQuery, setSearchQuery] = useState('');
|
||||
const [startDate, setStartDate] = useState<Date | null>(null);
|
||||
const [endDate, setEndDate] = useState<Date | null>(null);
|
||||
const [sortConfig, setSortConfig] = useState<{ key: keyof DataModel | null, direction: 'ascending' | 'descending' }>({ key: 'id', direction: 'descending' });
|
||||
const [itemsPerPage, setItemsPerPage] = useState(25);
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [interval, setIntervalTime] = useState<number>(10); // Default interval 10 seconds
|
||||
const [reloadInterval, setReloadInterval] = useState<NodeJS.Timeout | null>(null);
|
||||
|
||||
|
||||
const fetchData = useCallback(async () => {
|
||||
try {
|
||||
const response = await fetch("https://api.htl-braunau.at/data/json");
|
||||
if (!response.ok) throw new Error(`Failed to fetch data: ${response.statusText}`);
|
||||
const result: DataModel[] = await response.json();
|
||||
setData(result);
|
||||
setLoading(false);
|
||||
} catch (err) {
|
||||
setError((err as Error).message);
|
||||
setLoading(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
fetchData();
|
||||
const storedInterval = localStorage.getItem('reloadInterval');
|
||||
if (storedInterval) {
|
||||
setIntervalTime(Number(storedInterval));
|
||||
}
|
||||
}, [fetchData]);
|
||||
|
||||
useEffect(() => {
|
||||
let intervalId: NodeJS.Timeout | null = null;
|
||||
|
||||
if (interval > 0) {
|
||||
intervalId = setInterval(fetchData, Math.max(interval, 10) * 1000);
|
||||
localStorage.setItem('reloadInterval', interval.toString());
|
||||
} else {
|
||||
localStorage.removeItem('reloadInterval');
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (intervalId) clearInterval(intervalId);
|
||||
};
|
||||
}, [interval, fetchData]);
|
||||
|
||||
const filteredData = data.filter(item => {
|
||||
const matchesSearchQuery = Object.values(item).some(value =>
|
||||
value.toString().toLowerCase().includes(searchQuery.toLowerCase())
|
||||
);
|
||||
const itemDate = new Date(item.created_at);
|
||||
const matchesDateRange = (!startDate || itemDate >= startDate) && (!endDate || itemDate <= endDate);
|
||||
return matchesSearchQuery && matchesDateRange;
|
||||
});
|
||||
|
||||
const sortedData = React.useMemo(() => {
|
||||
let sortableData = [...filteredData];
|
||||
if (sortConfig.key !== null) {
|
||||
sortableData.sort((a, b) => {
|
||||
if (sortConfig.key !== null && a[sortConfig.key] < b[sortConfig.key]) {
|
||||
return sortConfig.direction === 'ascending' ? -1 : 1;
|
||||
}
|
||||
if (sortConfig.key !== null && a[sortConfig.key] > b[sortConfig.key]) {
|
||||
return sortConfig.direction === 'ascending' ? 1 : -1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
return sortableData;
|
||||
}, [filteredData, sortConfig]);
|
||||
|
||||
const requestSort = (key: keyof DataModel | null) => {
|
||||
let direction: 'ascending' | 'descending' = 'ascending';
|
||||
if (sortConfig.key === key && sortConfig.direction === 'ascending') {
|
||||
direction = 'descending';
|
||||
} else if (sortConfig.key === key && sortConfig.direction === 'descending') {
|
||||
direction = 'ascending';
|
||||
} else {
|
||||
direction = 'descending';
|
||||
}
|
||||
setSortConfig({ key, direction });
|
||||
};
|
||||
|
||||
interface SortConfig {
|
||||
key: keyof DataModel | null;
|
||||
direction: 'ascending' | 'descending';
|
||||
}
|
||||
|
||||
const formatDate = (dateString: string): string => {
|
||||
const date = new Date(dateString);
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1;
|
||||
const day = date.getDate();
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const timezoneOffset = dateString.slice(-6);
|
||||
return `${day}.${month}.${year} ${hours}:${minutes} ${timezoneOffset} GMT`;
|
||||
};
|
||||
|
||||
const paginatedData = sortedData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage);
|
||||
|
||||
const statusCounts = data.reduce((acc, item) => {
|
||||
const status = item.status;
|
||||
acc[status] = (acc[status] || 0) + 1;
|
||||
return acc;
|
||||
}, {} as Record<string, number>);
|
||||
|
||||
if (loading) return <div className="flex justify-center items-center h-screen">Loading...</div>;
|
||||
if (error) return <div className="flex justify-center items-center h-screen text-red-500">Error: {error}</div>;
|
||||
|
||||
return (
|
||||
<div className="container mx-auto p-6 pt-20 space-y-6">
|
||||
<h1 className="text-3xl font-bold text-center">Created LXCs</h1>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium">Search</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Input
|
||||
placeholder="Search..."
|
||||
value={searchQuery}
|
||||
onChange={e => setSearchQuery(e.target.value)}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium">Start Date</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="outline" className="w-full justify-start text-left font-normal">
|
||||
<CalendarIcon className="mr-2 h-4 w-4" />
|
||||
{startDate ? format(startDate, "PPP") : "Pick a date"}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-auto p-0">
|
||||
<Calendar
|
||||
mode="single"
|
||||
selected={startDate || undefined}
|
||||
onSelect={(date: Date | undefined) => setStartDate(date || null)}
|
||||
initialFocus
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium">End Date</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="outline" className="w-full justify-start text-left font-normal">
|
||||
<CalendarIcon className="mr-2 h-4 w-4" />
|
||||
{endDate ? format(endDate, "PPP") : "Pick a date"}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-auto p-0">
|
||||
<Calendar
|
||||
mode="single"
|
||||
selected={endDate || undefined}
|
||||
onSelect={(date: Date | undefined) => setEndDate(date || null)}
|
||||
initialFocus
|
||||
/>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="pb-2">
|
||||
<CardTitle className="text-sm font-medium">Reload Interval</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Input
|
||||
type="number"
|
||||
value={interval}
|
||||
onChange={e => setIntervalTime(Number(e.target.value))}
|
||||
placeholder="Interval (seconds)"
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<ApplicationChart data={filteredData} />
|
||||
|
||||
<div className="flex justify-between items-center">
|
||||
<p className="text-lg font-medium">{filteredData.length} results found</p>
|
||||
<div className="flex gap-2 items-center">
|
||||
<span>🔄 Installing: {statusCounts.installing || 0}</span>
|
||||
<span>✔️ Completed: {statusCounts.done || 0}</span>
|
||||
<span>❌ Failed: {statusCounts.failed || 0}</span>
|
||||
<span>❓ Unknown: {statusCounts.unknown || 0}</span>
|
||||
</div>
|
||||
<Select value={itemsPerPage.toString()} onValueChange={(value) => setItemsPerPage(Number(value))}>
|
||||
<SelectTrigger className="w-[180px]">
|
||||
<SelectValue placeholder="Items per page" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{[25, 50, 100, 200].map(value => (
|
||||
<SelectItem key={value} value={value.toString()}>
|
||||
{value} items
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div className="rounded-md border">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('status')}>Status</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('nsapp')}>Application</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('os_type')}>OS</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('os_version')}>OS Version</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('disk_size')}>Disk Size</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('core_count')}>Core Count</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('ram_size')}>RAM Size</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('hn')}>Hostname</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('ssh')}>SSH</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('verbose')}>Verb</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('tags')}>Tags</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('method')}>Method</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('pve_version')}>PVE Version</TableHead>
|
||||
<TableHead className="px-4 py-2 border-b cursor-pointer" onClick={() => requestSort('created_at')}>Created At</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{paginatedData.map((item, index) => (
|
||||
<TableRow key={index}>
|
||||
<TableCell className="px-4 py-2 border-b">{item.status === "done" ? (
|
||||
"✔️"
|
||||
) : item.status === "failed" ? (
|
||||
"❌"
|
||||
) : item.status === "installing" ? (
|
||||
"🔄"
|
||||
) : (
|
||||
item.status
|
||||
)}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.nsapp}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.os_type}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.os_version}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.disk_size}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.core_count}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.ram_size}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.hn}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.ssh}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.verbose}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.tags.replace(/;/g, ' ')}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.method}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{item.pve_version}</TableCell>
|
||||
<TableCell className="px-4 py-2 border-b">{formatDate(item.created_at)}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-center space-x-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setCurrentPage(prev => Math.max(prev - 1, 1))}
|
||||
disabled={currentPage === 1}
|
||||
>
|
||||
Previous
|
||||
</Button>
|
||||
<span className="text-sm">
|
||||
Page {currentPage} of {Math.ceil(sortedData.length / itemsPerPage)}
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setCurrentPage(prev => (prev * itemsPerPage < sortedData.length ? prev + 1 : prev))}
|
||||
disabled={currentPage * itemsPerPage >= sortedData.length}
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DataFetcher;
|
@ -35,8 +35,18 @@ export function LatestScripts({ items }: { items: Category[] }) {
|
||||
|
||||
const latestScripts = useMemo(() => {
|
||||
if (!items) return [];
|
||||
|
||||
const scripts = items.flatMap((category) => category.scripts || []);
|
||||
return scripts.sort(
|
||||
|
||||
// Filter out duplicates by slug
|
||||
const uniqueScriptsMap = new Map<string, Script>();
|
||||
scripts.forEach((script) => {
|
||||
if (!uniqueScriptsMap.has(script.slug)) {
|
||||
uniqueScriptsMap.set(script.slug, script);
|
||||
}
|
||||
});
|
||||
|
||||
return Array.from(uniqueScriptsMap.values()).sort(
|
||||
(a, b) =>
|
||||
new Date(b.date_created).getTime() - new Date(a.date_created).getTime(),
|
||||
);
|
||||
@ -49,7 +59,7 @@ export function LatestScripts({ items }: { items: Category[] }) {
|
||||
const goToPreviousPage = () => {
|
||||
setPage((prevPage) => prevPage - 1);
|
||||
};
|
||||
|
||||
|
||||
const startIndex = (page - 1) * ITEMS_PER_PAGE;
|
||||
const endIndex = page * ITEMS_PER_PAGE;
|
||||
|
||||
|
193
frontend/src/components/ApplicationChart.tsx
Normal file
193
frontend/src/components/ApplicationChart.tsx
Normal file
@ -0,0 +1,193 @@
|
||||
"use client";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { Chart as ChartJS, ArcElement, Tooltip as ChartTooltip, Legend } from "chart.js";
|
||||
import ChartDataLabels from "chartjs-plugin-datalabels";
|
||||
import { BarChart3, PieChart } from "lucide-react";
|
||||
import React, { useState } from "react";
|
||||
import { Pie } from "react-chartjs-2";
|
||||
|
||||
ChartJS.register(ArcElement, ChartTooltip, Legend, ChartDataLabels);
|
||||
|
||||
interface ApplicationChartProps {
|
||||
data: { nsapp: string }[];
|
||||
}
|
||||
|
||||
const ITEMS_PER_PAGE = 20;
|
||||
const CHART_COLORS = [
|
||||
"#ff6384",
|
||||
"#36a2eb",
|
||||
"#ffce56",
|
||||
"#4bc0c0",
|
||||
"#9966ff",
|
||||
"#ff9f40",
|
||||
"#4dc9f6",
|
||||
"#f67019",
|
||||
"#537bc4",
|
||||
"#acc236",
|
||||
"#166a8f",
|
||||
"#00a950",
|
||||
"#58595b",
|
||||
"#8549ba",
|
||||
];
|
||||
|
||||
export default function ApplicationChart({ data }: ApplicationChartProps) {
|
||||
const [isChartOpen, setIsChartOpen] = useState(false);
|
||||
const [isTableOpen, setIsTableOpen] = useState(false);
|
||||
const [chartStartIndex, setChartStartIndex] = useState(0);
|
||||
const [tableLimit, setTableLimit] = useState(ITEMS_PER_PAGE);
|
||||
|
||||
// Calculate application counts
|
||||
const appCounts = data.reduce((acc, item) => {
|
||||
acc[item.nsapp] = (acc[item.nsapp] || 0) + 1;
|
||||
return acc;
|
||||
}, {} as Record<string, number>);
|
||||
|
||||
const sortedApps = Object.entries(appCounts)
|
||||
.sort(([, a], [, b]) => b - a);
|
||||
|
||||
const chartApps = sortedApps.slice(
|
||||
chartStartIndex,
|
||||
chartStartIndex + ITEMS_PER_PAGE
|
||||
);
|
||||
|
||||
const chartData = {
|
||||
labels: chartApps.map(([name]) => name),
|
||||
datasets: [
|
||||
{
|
||||
data: chartApps.map(([, count]) => count),
|
||||
backgroundColor: CHART_COLORS,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const chartOptions = {
|
||||
plugins: {
|
||||
legend: { display: false },
|
||||
datalabels: {
|
||||
color: "white",
|
||||
font: { weight: "bold" as const },
|
||||
formatter: (value: number, context: any) => {
|
||||
const label = context.chart.data.labels?.[context.dataIndex];
|
||||
return `${label}\n(${value})`;
|
||||
},
|
||||
},
|
||||
},
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="mt-6 flex justify-center gap-4">
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
onClick={() => setIsChartOpen(true)}
|
||||
>
|
||||
<PieChart className="h-5 w-5" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Open Chart View</TooltipContent>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
onClick={() => setIsTableOpen(true)}
|
||||
>
|
||||
<BarChart3 className="h-5 w-5" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Open Table View</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
|
||||
<Dialog open={isChartOpen} onOpenChange={setIsChartOpen}>
|
||||
<DialogContent className="max-w-3xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Applications Distribution</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="h-[60vh] w-full">
|
||||
<Pie data={chartData} options={chartOptions} />
|
||||
</div>
|
||||
<div className="flex justify-center gap-4">
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setChartStartIndex(Math.max(0, chartStartIndex - ITEMS_PER_PAGE))}
|
||||
disabled={chartStartIndex === 0}
|
||||
>
|
||||
Previous {ITEMS_PER_PAGE}
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => setChartStartIndex(chartStartIndex + ITEMS_PER_PAGE)}
|
||||
disabled={chartStartIndex + ITEMS_PER_PAGE >= sortedApps.length}
|
||||
>
|
||||
Next {ITEMS_PER_PAGE}
|
||||
</Button>
|
||||
</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
||||
<Dialog open={isTableOpen} onOpenChange={setIsTableOpen}>
|
||||
<DialogContent className="max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Applications Count</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="max-h-[60vh] overflow-y-auto">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead>Application</TableHead>
|
||||
<TableHead className="text-right">Count</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{sortedApps.slice(0, tableLimit).map(([name, count]) => (
|
||||
<TableRow key={name}>
|
||||
<TableCell>{name}</TableCell>
|
||||
<TableCell className="text-right">{count}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</div>
|
||||
{tableLimit < sortedApps.length && (
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full"
|
||||
onClick={() => setTableLimit(prev => prev + ITEMS_PER_PAGE)}
|
||||
>
|
||||
Load More
|
||||
</Button>
|
||||
)}
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</div>
|
||||
);
|
||||
}
|
29
frontend/src/components/Modal.tsx
Normal file
29
frontend/src/components/Modal.tsx
Normal file
@ -0,0 +1,29 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
|
||||
interface ModalProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const Modal: React.FC<ModalProps> = ({ isOpen, onClose, children }) => {
|
||||
if (!isOpen) return null;
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-50">
|
||||
<div className="bg-white dark:bg-gray-900 p-6 rounded-lg shadow-lg w-11/12 max-w-4xl relative max-h-[90vh] overflow-y-auto">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="absolute top-2 right-2 bg-red-500 text-white p-1 rounded"
|
||||
>
|
||||
✖
|
||||
</button>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Modal;
|
@ -15,7 +15,7 @@ const Command = React.forwardRef<
|
||||
<CommandPrimitive
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
||||
"flex h-full w-full flex-col overflow-hidden bg-popover text-popover-foreground",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
120
frontend/src/components/ui/table.tsx
Normal file
120
frontend/src/components/ui/table.tsx
Normal file
@ -0,0 +1,120 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const Table = React.forwardRef<
|
||||
HTMLTableElement,
|
||||
React.HTMLAttributes<HTMLTableElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<div className="relative w-full overflow-auto">
|
||||
<table
|
||||
ref={ref}
|
||||
className={cn("w-full caption-bottom text-sm", className)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
Table.displayName = "Table"
|
||||
|
||||
const TableHeader = React.forwardRef<
|
||||
HTMLTableSectionElement,
|
||||
React.HTMLAttributes<HTMLTableSectionElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
||||
))
|
||||
TableHeader.displayName = "TableHeader"
|
||||
|
||||
const TableBody = React.forwardRef<
|
||||
HTMLTableSectionElement,
|
||||
React.HTMLAttributes<HTMLTableSectionElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<tbody
|
||||
ref={ref}
|
||||
className={cn("[&_tr:last-child]:border-0", className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TableBody.displayName = "TableBody"
|
||||
|
||||
const TableFooter = React.forwardRef<
|
||||
HTMLTableSectionElement,
|
||||
React.HTMLAttributes<HTMLTableSectionElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<tfoot
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TableFooter.displayName = "TableFooter"
|
||||
|
||||
const TableRow = React.forwardRef<
|
||||
HTMLTableRowElement,
|
||||
React.HTMLAttributes<HTMLTableRowElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<tr
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TableRow.displayName = "TableRow"
|
||||
|
||||
const TableHead = React.forwardRef<
|
||||
HTMLTableCellElement,
|
||||
React.ThHTMLAttributes<HTMLTableCellElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<th
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TableHead.displayName = "TableHead"
|
||||
|
||||
const TableCell = React.forwardRef<
|
||||
HTMLTableCellElement,
|
||||
React.TdHTMLAttributes<HTMLTableCellElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<td
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TableCell.displayName = "TableCell"
|
||||
|
||||
const TableCaption = React.forwardRef<
|
||||
HTMLTableCaptionElement,
|
||||
React.HTMLAttributes<HTMLTableCaptionElement>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<caption
|
||||
ref={ref}
|
||||
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
TableCaption.displayName = "TableCaption"
|
||||
|
||||
export {
|
||||
Table,
|
||||
TableHeader,
|
||||
TableBody,
|
||||
TableFooter,
|
||||
TableHead,
|
||||
TableRow,
|
||||
TableCell,
|
||||
TableCaption,
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: TheRealVira
|
||||
# License: MIT
|
||||
# Source: https://5e.tools/
|
||||
|
||||
# Import Functions und Setup
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
mc \
|
||||
sudo \
|
||||
git \
|
||||
gpg \
|
||||
ca-certificates \
|
||||
apache2
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Installing Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
# Setup App
|
||||
msg_info "Set up 5etools Base"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-3/5etools-src/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/5etools-mirror-3/5etools-src/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q "${RELEASE}.zip"
|
||||
mv "5etools-src-${RELEASE:1}" /opt/5etools
|
||||
cd /opt/5etools
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
echo "${RELEASE}" >"/opt/5etools_version.txt"
|
||||
msg_ok "Set up 5etools Base"
|
||||
|
||||
msg_info "Set up 5etools Image"
|
||||
cd /opt
|
||||
IMG_RELEASE=$(curl -s https://api.github.com/repos/5etools-mirror-2/5etools-img/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -sSL "https://github.com/5etools-mirror-2/5etools-img/archive/refs/tags/${IMG_RELEASE}.zip" > "${IMG_RELEASE}.zip"
|
||||
unzip -q "${IMG_RELEASE}.zip"
|
||||
mv "5etools-img-${IMG_RELEASE:1}" /opt/5etools/img
|
||||
echo "${IMG_RELEASE}" >"/opt/5etools_IMG_version.txt"
|
||||
msg_ok "Set up 5etools Image"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >> /etc/apache2/apache2.conf
|
||||
<Location /server-status>
|
||||
SetHandler server-status
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Location>
|
||||
EOF
|
||||
rm -rf /var/www/html
|
||||
ln -s "/opt/5etools" /var/www/html
|
||||
chown -R www-data: "/opt/5etools"
|
||||
chmod -R 755 "/opt/5etools"
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/${IMG_RELEASE}.zip
|
||||
rm -rf /opt/${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
motd_ssh
|
||||
customize
|
57
install/alpine-it-tools-install.sh
Normal file
57
install/alpine-it-tools-install.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: nicedevil007 (NiceDevil)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apk add \
|
||||
curl \
|
||||
mc \
|
||||
openssh \
|
||||
nginx \
|
||||
unzip
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing IT-Tools"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
|
||||
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
|
||||
|
||||
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
|
||||
mkdir -p /usr/share/nginx/html
|
||||
unzip -q it-tools.zip -d /tmp/it-tools
|
||||
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
|
||||
cat <<'EOF' > /etc/nginx/http.d/default.conf
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
$STD rc-update add nginx default
|
||||
$STD rc-service nginx start
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed IT-Tools"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /tmp/it-tools
|
||||
rm -f it-tools.zip
|
||||
$STD apk cache clean
|
||||
msg_ok "Cleaned"
|
97
install/baikal-install.sh
Normal file
97
install/baikal-install.sh
Normal file
@ -0,0 +1,97 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
postgresql \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
php-{pgsql,dom}
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME=baikal
|
||||
DB_USER=baikal
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||
{
|
||||
echo "Baikal Credentials"
|
||||
echo "Baikal Database User: $DB_USER"
|
||||
echo "Baikal Database Password: $DB_PASS"
|
||||
echo "Baikal Database Name: $DB_NAME"
|
||||
} >> ~/baikal.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
msg_info "Installing Baikal"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
cd /opt
|
||||
wget -q "https://github.com/sabre-io/baikal/releases/download/${RELEASE}/baikal-${RELEASE}.zip"
|
||||
unzip -q "baikal-${RELEASE}.zip"
|
||||
cat <<EOF >/opt/baikal/config/baikal.yaml
|
||||
database:
|
||||
backend: pgsql
|
||||
pgsql_host: localhost
|
||||
pgsql_dbname: $DB_NAME
|
||||
pgsql_username: $DB_USER
|
||||
pgsql_password: $DB_PASS
|
||||
EOF
|
||||
chown -R www-data:www-data /opt/baikal/
|
||||
chmod -R 755 /opt/baikal/
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Baikal"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF > /etc/apache2/sites-available/baikal.conf
|
||||
<VirtualHost *:80>
|
||||
ServerName baikal
|
||||
DocumentRoot /opt/baikal/html
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule /.well-known/carddav /dav.php [R=308,L]
|
||||
RewriteRule /.well-known/caldav /dav.php [R=308,L]
|
||||
RewriteCond %{REQUEST_URI} ^/dav.php$ [NC]
|
||||
RewriteRule ^(.*)$ /dav.php/ [R=301,L]
|
||||
|
||||
<Directory /opt/baikal/html>
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive Off
|
||||
</IfModule>
|
||||
|
||||
ErrorLog /var/log/apache2/baikal_error.log
|
||||
CustomLog /var/log/apache2/baikal_access.log combined
|
||||
</VirtualHost>
|
||||
EOF
|
||||
$STD a2ensite baikal
|
||||
$STD a2enmod rewrite
|
||||
$STD a2dissite 000-default.conf
|
||||
$STD systemctl reload apache2
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf "/opt/baikal-${RELEASE}.zip"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -19,13 +19,13 @@ $STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Bazarr"
|
||||
mkdir -p /var/lib/bazarr/
|
||||
|
@ -47,13 +47,13 @@ $STD apt-get install -y \
|
||||
gnupg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
@ -20,13 +20,13 @@ $STD apt-get install -y mc
|
||||
$STD apt-get install -y python3-libtorrent
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Deluge"
|
||||
$STD pip install deluge[all]
|
||||
|
@ -20,14 +20,14 @@ $STD apt-get install -y mc
|
||||
$STD apt-get install -y git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-venv
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing ESPHome"
|
||||
mkdir /root/config
|
||||
|
@ -18,10 +18,10 @@ msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y {curl,sudo,mc,git,gpg,ca-certificates,automake,build-essential,xz-utils,libtool,ccache,pkg-config,libgtk-3-dev,libavcodec-dev,libavformat-dev,libswscale-dev,libv4l-dev,libxvidcore-dev,libx264-dev,libjpeg-dev,libpng-dev,libtiff-dev,gfortran,openexr,libatlas-base-dev,libssl-dev,libtbb2,libtbb-dev,libdc1394-22-dev,libopenexr-dev,libgstreamer-plugins-base1.0-dev,libgstreamer1.0-dev,gcc,gfortran,libopenblas-dev,liblapack-dev,libusb-1.0-0-dev,jq,moreutils}
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Python3 Dependencies"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y {python3,python3-dev,python3-setuptools,python3-distutils,python3-pip}
|
||||
$STD pip install --upgrade pip
|
||||
msg_ok "Installed Python3 Dependencies"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Node.js"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
@ -1,10 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# Co-Author: MickLesk (Canbiz)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (Canbiz)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/ajnart/homarr
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
@ -20,6 +18,7 @@ $STD apt-get install -y \
|
||||
sudo \
|
||||
mc \
|
||||
curl \
|
||||
redis-server \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
make \
|
||||
@ -30,32 +29,40 @@ msg_ok "Installed Dependencies"
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Installing Node.js/Yarn"
|
||||
msg_info "Installing Node.js/pnpm"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g yarn
|
||||
msg_ok "Installed Node.js/Yarn"
|
||||
$STD npm install -g pnpm@latest
|
||||
msg_ok "Installed Node.js/pnpm"
|
||||
|
||||
msg_info "Installing Homarr (Patience)"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/ajnart/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/ajnart/homarr/archive/refs/tags/v${RELEASE}.zip"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/homarr-labs/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/homarr-labs/homarr/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
rm -rf v${RELEASE}.zip
|
||||
mv homarr-${RELEASE} /opt/homarr
|
||||
mkdir -p /opt/homarr_db
|
||||
touch /opt/homarr_db/db.sqlite
|
||||
AUTH_SECRET="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
||||
SECRET_ENCRYPTION_KEY="$(openssl rand -hex 32)"
|
||||
|
||||
cat <<EOF >/opt/homarr/.env
|
||||
DATABASE_URL="file:./database/db.sqlite"
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
NEXTAUTH_SECRET="$(openssl rand -base64 32)"
|
||||
NEXT_PUBLIC_DISABLE_ANALYTICS="true"
|
||||
DEFAULT_COLOR_SCHEME="dark"
|
||||
AUTH_SECRET='${AUTH_SECRET}'
|
||||
DB_DRIVER='better-sqlite3'
|
||||
SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}'
|
||||
DB_URL='/opt/homarr_db/db.sqlite'
|
||||
TURBO_TELEMETRY_DISABLED=1
|
||||
EOF
|
||||
|
||||
cd /opt/homarr
|
||||
$STD yarn install
|
||||
$STD yarn build
|
||||
$STD yarn db:migrate
|
||||
$STD pnpm install
|
||||
$STD pnpm run db:migration:sqlite:run
|
||||
$STD pnpm build
|
||||
mkdir build
|
||||
cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed Homarr"
|
||||
|
||||
@ -69,18 +76,19 @@ After=network.target
|
||||
Type=exec
|
||||
WorkingDirectory=/opt/homarr
|
||||
EnvironmentFile=-/opt/homarr/.env
|
||||
ExecStart=/usr/bin/yarn start
|
||||
ExecStart=/usr/bin/pnpm start
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now homarr.service
|
||||
systemctl enable -q --now homarr
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
@ -49,7 +49,7 @@ $STD apt-get install -y \
|
||||
pkg-config
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3/pip"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get update
|
||||
$STD rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
$STD apt-get remove --purge -y python3.12 python3.12-dev python3.12-venv
|
||||
|
@ -19,14 +19,14 @@ $STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-venv
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing runlike"
|
||||
$STD pip install runlike
|
||||
|
60
install/mattermost-install.sh
Normal file
60
install/mattermost-install.sh
Normal file
@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Kaedon Cleland-Host (dracentis)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
gpg \
|
||||
postgresql
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up PostgreSQL"
|
||||
DB_NAME=mattermost
|
||||
DB_USER=mmuser
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
|
||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
|
||||
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
|
||||
$STD sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER;"
|
||||
{
|
||||
echo "Mattermost Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >> ~/mattermost.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
msg_info "Installing Mattermost"
|
||||
IPADDRESS=$(hostname -I | awk '{print $1}')
|
||||
curl -sL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg
|
||||
sh -c 'curl -sL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s mattermost' >/dev/null
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mattermost
|
||||
$STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json
|
||||
sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \
|
||||
-e "/SiteURL/c\ \"SiteURL\": \"http://$IPADDRESS:8065\"," /opt/mattermost/config/config.json
|
||||
systemctl enable -q --now mattermost.service
|
||||
msg_ok "Installed Mattermost"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
104
install/monica-install.sh
Normal file
104
install/monica-install.sh
Normal file
@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: bvdberg01
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
gnupg2\
|
||||
mariadb-server \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
php-{bcmath,curl,dom,gd,gmp,iconv,intl,json,mbstring,mysqli,opcache,pdo-mysql,redis,tokenizer,xml,zip} \
|
||||
composer
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up MariaDB"
|
||||
DB_NAME=monica
|
||||
DB_USER=monica
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "monica-Credentials"
|
||||
echo "monica Database User: $DB_USER"
|
||||
echo "monica Database Password: $DB_PASS"
|
||||
echo "monica Database Name: $DB_NAME"
|
||||
} >> ~/monica.creds
|
||||
msg_ok "Set up MariaDB"
|
||||
|
||||
msg_info "Setting up Node.js/Yarn"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
$STD npm install -g npm@latest
|
||||
$STD npm install -g yarn
|
||||
msg_ok "Installed Node.js/Yarn"
|
||||
|
||||
msg_info "Installing monica"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/monicahq/monica/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
cd /opt
|
||||
wget -q "https://github.com/monicahq/monica/releases/download/v${RELEASE}/monica-v${RELEASE}.tar.bz2"
|
||||
tar -xjf "monica-v${RELEASE}.tar.bz2"
|
||||
mv "/opt/monica-v${RELEASE}" /opt/monica
|
||||
cd /opt/monica
|
||||
cp /opt/monica/.env.example /opt/monica/.env
|
||||
HASH_SALT=$(openssl rand -base64 32)
|
||||
sed -i -e "s|^DB_USERNAME=.*|DB_USERNAME=${DB_USER}|" \
|
||||
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=${DB_PASS}|" \
|
||||
-e "s|^HASH_SALT=.*|HASH_SALT=${HASH_SALT}|" \
|
||||
/opt/monica/.env
|
||||
$STD composer install --no-dev -o --no-interaction
|
||||
$STD yarn install
|
||||
$STD yarn run production
|
||||
$STD php artisan key:generate
|
||||
$STD php artisan setup:production --email=admin@helper-scripts.com --password=helper-scripts.com --force
|
||||
chown -R www-data:www-data /opt/monica
|
||||
chmod -R 775 /opt/monica/storage
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed monica"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/apache2/sites-available/monica.conf
|
||||
<VirtualHost *:80>
|
||||
ServerName monica
|
||||
DocumentRoot /opt/monica/public
|
||||
<Directory /opt/monica/public>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
ErrorLog /var/log/apache2/monica_error.log
|
||||
CustomLog /var/log/apache2/monica_access.log combined
|
||||
</VirtualHost>
|
||||
EOF
|
||||
$STD a2ensite monica
|
||||
$STD a2enmod rewrite
|
||||
$STD a2dissite 000-default.conf
|
||||
$STD systemctl reload apache2
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf "/opt/monica-v${RELEASE}.tar.bz2"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -21,13 +21,13 @@ $STD apt-get install -y git
|
||||
$STD apt-get install -y cifs-utils
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Motion"
|
||||
$STD apt-get install -y motion
|
||||
|
@ -26,11 +26,11 @@ $STD apt-get install -y unrar
|
||||
rm /etc/apt/sources.list.d/non-free.list
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
$STD pip install -U --no-cache-dir pip
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing ${APPLICATION}"
|
||||
mkdir -p /opt/mylar3
|
||||
|
164
install/nodebb-install.sh
Normal file
164
install/nodebb-install.sh
Normal file
@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2024 tteck
|
||||
# Author: MickLesk (Canbiz)
|
||||
# License: MIT | https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
# Source: https://github.com/NodeBB/NodeBB
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y \
|
||||
build-essential \
|
||||
curl \
|
||||
sudo \
|
||||
make \
|
||||
redis-server \
|
||||
expect \
|
||||
gnupg \
|
||||
ca-certificates \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js & MongoDB Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
|
||||
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | gpg --dearmor -o /etc/apt/keyrings/mongodb-server-8.0.gpg
|
||||
echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/mongodb-server-8.0.gpg] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" > /etc/apt/sources.list.d/mongodb-org-8.0.list
|
||||
$STD apt-get update
|
||||
msg_ok "Set up Repositories"
|
||||
|
||||
msg_info "Installing Node.js"
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
msg_info "Installing MongoDB"
|
||||
$STD apt-get install -y mongodb-org
|
||||
systemctl enable -q --now mongod
|
||||
sleep 10 # MongoDB needs some secounds to start, if not sleep it collide with following mongosh
|
||||
msg_ok "Installed MongoDB"
|
||||
|
||||
msg_info "Configure MongoDB"
|
||||
MONGO_ADMIN_USER="admin"
|
||||
MONGO_ADMIN_PWD="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
NODEBB_USER="nodebb"
|
||||
NODEBB_PWD="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
MONGO_CONNECTION_STRING="mongodb://${NODEBB_USER}:${NODEBB_PWD}@localhost:27017/nodebb"
|
||||
NODEBB_SECRET=$(uuidgen)
|
||||
{
|
||||
echo "NodeBB-Credentials"
|
||||
echo "Mongo Database User: $MONGO_ADMIN_USER"
|
||||
echo "Mongo Database Password: $MONGO_ADMIN_PWD"
|
||||
echo "NodeBB User: $NODEBB_USER"
|
||||
echo "NodeBB Password: $NODEBB_PWD"
|
||||
echo "NodeBB Secret: $NODEBB_SECRET"
|
||||
} >> ~/nodebb.creds
|
||||
|
||||
$STD mongosh <<EOF
|
||||
use admin
|
||||
db.createUser({
|
||||
user: "$MONGO_ADMIN_USER",
|
||||
pwd: "$MONGO_ADMIN_PWD",
|
||||
roles: [{ role: "root", db: "admin" }]
|
||||
})
|
||||
|
||||
use nodebb
|
||||
db.createUser({
|
||||
user: "$NODEBB_USER",
|
||||
pwd: "$NODEBB_PWD",
|
||||
roles: [
|
||||
{ role: "readWrite", db: "nodebb" },
|
||||
{ role: "clusterMonitor", db: "admin" }
|
||||
]
|
||||
})
|
||||
quit()
|
||||
EOF
|
||||
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
|
||||
sed -i '/security:/d' /etc/mongod.conf
|
||||
bash -c 'echo -e "\nsecurity:\n authorization: enabled" >> /etc/mongod.conf'
|
||||
systemctl restart mongod
|
||||
msg_ok "MongoDB successfully configurated"
|
||||
|
||||
msg_info "Install NodeBB"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/NodeBB/NodeBB/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/NodeBB/NodeBB/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv NodeBB-${RELEASE} /opt/nodebb
|
||||
cd /opt/nodebb
|
||||
touch pidfile
|
||||
expect <<EOF > /dev/null 2>&1
|
||||
log_file /dev/null
|
||||
set timeout -1
|
||||
|
||||
spawn ./nodebb setup
|
||||
expect "URL used to access this NodeBB" {
|
||||
send "http://localhost:4567\r"
|
||||
}
|
||||
expect "Please enter a NodeBB secret" {
|
||||
send "$NODEBB_SECRET\r"
|
||||
}
|
||||
expect "Would you like to submit anonymous plugin usage to nbbpm? (yes)" {
|
||||
send "no\r"
|
||||
}
|
||||
expect "Which database to use (mongo)" {
|
||||
send "mongo\r"
|
||||
}
|
||||
expect "Format: mongodb://*" {
|
||||
send "$MONGO_CONNECTION_STRING\r"
|
||||
}
|
||||
expect "Administrator username" {
|
||||
send "helper-scripts\r"
|
||||
}
|
||||
expect "Administrator email address" {
|
||||
send "helper-scripts@local.com\r"
|
||||
}
|
||||
expect "Password" {
|
||||
send "helper-scripts\r"
|
||||
}
|
||||
expect "Confirm Password" {
|
||||
send "helper-scripts\r"
|
||||
}
|
||||
expect eof
|
||||
EOF
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed NodeBB"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/nodebb.service
|
||||
[Unit]
|
||||
Description=NodeBB
|
||||
Documentation=https://docs.nodebb.org
|
||||
After=system.slice multi-user.target mongod.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=root
|
||||
|
||||
WorkingDirectory=/opt/nodebb
|
||||
PIDFile=/opt/nodebb/pidfile
|
||||
ExecStart=/usr/bin/node /opt/nodebb/loader.js
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now nodebb
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -R /opt/v${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -22,7 +22,7 @@ $STD apt-get install -y libyaml-dev
|
||||
$STD apt-get install -y build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
@ -31,7 +31,7 @@ $STD apt-get install -y \
|
||||
|
||||
$STD apt-get install -y python3-setuptools
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Creating user octoprint"
|
||||
useradd -m -s /bin/bash -p $(openssl passwd -1 octoprint) octoprint
|
||||
|
140
install/paymenter-install.sh
Normal file
140
install/paymenter-install.sh
Normal file
@ -0,0 +1,140 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Nícolas Pastorello (opastorello)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
git \
|
||||
software-properties-common \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
php8.2 \
|
||||
php8.2-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} \
|
||||
mariadb-server \
|
||||
nginx \
|
||||
redis-server
|
||||
$STD curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Paymenter"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/paymenter/paymenter/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
mkdir -p /opt/paymenter
|
||||
cd /opt/paymenter
|
||||
wget -q "https://github.com/paymenter/paymenter/releases/download/${RELEASE}/paymenter.tar.gz"
|
||||
$STD tar -xzvf paymenter.tar.gz
|
||||
chmod -R 755 storage/* bootstrap/cache/
|
||||
msg_ok "Installed Paymenter"
|
||||
|
||||
msg_info "Setting up database"
|
||||
DB_NAME=paymenter
|
||||
DB_USER=paymenter
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql
|
||||
mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;"
|
||||
{
|
||||
echo "Paymenter Database Credentials"
|
||||
echo "Database: $DB_NAME"
|
||||
echo "Username: $DB_USER"
|
||||
echo "Password: $DB_PASS"
|
||||
} >> ~/paymenter_db.creds
|
||||
cp .env.example .env
|
||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||
$STD php artisan key:generate --force
|
||||
$STD php artisan storage:link
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=${DB_NAME}/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=${DB_USER}/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/" .env
|
||||
$STD php artisan migrate --force --seed
|
||||
msg_ok "Set up database"
|
||||
|
||||
msg_info "Creating Admin User"
|
||||
$STD php artisan p:user:create <<EOF
|
||||
admin@paymenter.org
|
||||
paymenter
|
||||
admin
|
||||
paymenter
|
||||
0
|
||||
EOF
|
||||
msg_ok "Created Admin User"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<EOF >/etc/nginx/sites-available/paymenter.conf
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
root /opt/paymenter/public;
|
||||
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php\$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -s /etc/nginx/sites-available/paymenter.conf /etc/nginx/sites-enabled/
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD systemctl reload nginx
|
||||
chown -R www-data:www-data /opt/paymenter/*
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Setting up Cronjob"
|
||||
echo "* * * * * php /opt/paymenter/artisan schedule:run >> /dev/null 2>&1" | crontab -
|
||||
msg_ok "Setup Cronjob"
|
||||
|
||||
msg_info "Setting up Service"
|
||||
cat <<EOF >/etc/systemd/system/paymenter.service
|
||||
[Unit]
|
||||
Description=Paymenter Queue Worker
|
||||
|
||||
[Service]
|
||||
User=www-data
|
||||
Group=www-data
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/php /opt/paymenter/artisan queue:work
|
||||
StartLimitInterval=180
|
||||
StartLimitBurst=30
|
||||
RestartSec=5s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
$STD systemctl enable --now paymenter.service
|
||||
msg_ok "Setup Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/paymenter/paymenter.tar.gz
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
motd_ssh
|
||||
customize
|
@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: TheRealVira
|
||||
# License: MIT
|
||||
# Source: https://pf2etools.com/
|
||||
|
||||
# Import Functions und Setup
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
mc \
|
||||
sudo \
|
||||
apache2 \
|
||||
gpg \
|
||||
ca-certificates \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Installing Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
# Setup App
|
||||
msg_info "Setup Pf2eTools"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q "${RELEASE}.zip"
|
||||
mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools
|
||||
cd /opt/Pf2eTools
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
cd ~
|
||||
echo "${RELEASE}" >/opt/Pf2eTools_version.txt
|
||||
msg_ok "Set up Pf2eTools"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >> /etc/apache2/apache2.conf
|
||||
<Location /server-status>
|
||||
SetHandler server-status
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Location>
|
||||
EOF
|
||||
rm -rf /var/www/html
|
||||
ln -s "/opt/Pf2eTools" /var/www/html
|
||||
chown -R www-data: "/opt/Pf2eTools"
|
||||
chmod -R 755 "/opt/Pf2eTools"
|
||||
msg_ok "Created Service"
|
||||
|
||||
# Cleanup
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
motd_ssh
|
||||
customize
|
@ -2,6 +2,7 @@
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# Co-Author: michelroegl-brunner
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
@ -14,11 +15,12 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y git
|
||||
$STD apt-get install -y gnupg
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
git \
|
||||
gnupg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
@ -34,11 +36,14 @@ $STD npm install pm2 -g
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
msg_info "Installing Pingvin Share (Patience)"
|
||||
git clone -q https://github.com/stonith404/pingvin-share /opt/pingvin-share
|
||||
cd /opt/pingvin-share
|
||||
$STD git fetch --tags
|
||||
$STD git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
cd backend
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/stonith404/pingvin-share/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
wget -q "https://github.com/stonith404/pingvin-share/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
echo "${RELEASE}" >"/opt/pingvin_version.txt"
|
||||
mv pingvin-share-${RELEASE} /opt/pingvin-share
|
||||
cd /opt/pingvin-share/backend
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
$STD pm2 start --name="pingvin-share-backend" npm -- run prod
|
||||
@ -57,6 +62,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
130
install/pocketid-install.sh
Normal file
130
install/pocketid-install.sh
Normal file
@ -0,0 +1,130 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Snarkenfaugister
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/stonith404/pocket-id
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc \
|
||||
gpg \
|
||||
caddy \
|
||||
gcc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||
msg_ok "Set up Node.js Repository"
|
||||
|
||||
msg_info "Installing Node.js"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nodejs
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
msg_info "Installing Golang"
|
||||
cd /tmp
|
||||
set +o pipefail
|
||||
GO_RELEASE=$(curl -s https://go.dev/dl/ | grep -o -m 1 "go.*\linux-amd64.tar.gz")
|
||||
wget -q https://golang.org/dl/${GO_RELEASE}
|
||||
tar -xzf ${GO_RELEASE} -C /usr/local
|
||||
ln -s /usr/local/go/bin/go /usr/bin/go
|
||||
set -o pipefail
|
||||
msg_ok "Installed Golang"
|
||||
|
||||
read -r -p "What public URL do you want to use (e.g. pocketid.mydomain.com)? " public_url
|
||||
msg_info "Setup Pocket ID"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/stonith404/pocket-id/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/stonith404/pocket-id/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv pocket-id-${RELEASE}/ /opt/pocket-id
|
||||
|
||||
cd /opt/pocket-id/backend
|
||||
cp .env.example .env
|
||||
sed -i "s/PUBLIC_APP_URL=http:\/\/localhost/PUBLIC_APP_URL=https:\/\/${public_url}/" .env
|
||||
cd cmd
|
||||
CGO_ENABLED=1
|
||||
GOOS=linux
|
||||
$STD go build -o ../pocket-id-backend
|
||||
|
||||
cd ../../frontend
|
||||
cp .env.example .env
|
||||
sed -i "s/PUBLIC_APP_URL=http:\/\/localhost/PUBLIC_APP_URL=https:\/\/${public_url}/" .env
|
||||
$STD npm install
|
||||
$STD npm run build
|
||||
|
||||
cd ..
|
||||
cp reverse-proxy/Caddyfile /etc/caddy/Caddyfile
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Setup Pocket ID"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/pocketid-backend.service
|
||||
[Unit]
|
||||
Description=Pocket ID Backend
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/opt/pocket-id/backend
|
||||
EnvironmentFile=/opt/pocket-id/backend/.env
|
||||
ExecStart=/opt/pocket-id/backend/pocket-id-backend
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/pocketid-frontend.service
|
||||
[Unit]
|
||||
Description=Pocket ID Frontend
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/opt/pocket-id/frontend
|
||||
EnvironmentFile=/opt/pocket-id/frontend/.env
|
||||
ExecStart=/usr/bin/node build/index.js
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl enable -q --now pocketid-backend
|
||||
systemctl enable -q --now pocketid-frontend
|
||||
systemctl restart caddy
|
||||
msg_ok "Started Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f /opt/v${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
motd_ssh
|
||||
customize
|
70
install/prometheus-pve-exporter-install.sh
Normal file
70
install/prometheus-pve-exporter-install.sh
Normal file
@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Andy Grunwald (andygrunwald)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/prometheus-pve/prometheus-pve-exporter
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
sudo \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Prometheus Proxmox VE Exporter"
|
||||
python3 -m pip install --quiet --root-user-action=ignore prometheus-pve-exporter
|
||||
mkdir -p /opt/prometheus-pve-exporter
|
||||
cat <<EOF > /opt/prometheus-pve-exporter/pve.yml
|
||||
default:
|
||||
user: prometheus@pve
|
||||
password: sEcr3T!
|
||||
verify_ssl: false
|
||||
EOF
|
||||
msg_ok "Installed Prometheus Proxmox VE Exporter"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/prometheus-pve-exporter.service
|
||||
[Unit]
|
||||
Description=Prometheus Proxmox VE Exporter
|
||||
Documentation=https://github.com/znerol/prometheus-pve-exporter
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Restart=always
|
||||
Type=simple
|
||||
ExecStart=pve_exporter \
|
||||
--config.file=/opt/prometheus-pve-exporter/pve.yml \
|
||||
--web.listen-address=0.0.0.0:9221
|
||||
ExecReload=/bin/kill -HUP \$MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable -q --now prometheus-pve-exporter
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -27,13 +27,13 @@ $STD apt-get install -y unrar
|
||||
rm /etc/apt/sources.list.d/non-free.list
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
$STD apt-get install -y python3-setuptools
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing SABnzbd"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/sabnzbd/sabnzbd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
@ -32,14 +32,14 @@ $STD apt-get install -y --no-install-recommends \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-setuptools \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
@ -21,13 +21,13 @@ $STD apt-get install -y git
|
||||
$STD apt-get install -y pip
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Tautulli"
|
||||
cd /opt
|
||||
|
@ -22,8 +22,8 @@ msg_ok "Installed Dependencies"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
|
||||
msg_info "Installing TriliumNext"
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-linux-x64-${RELEASE}.tar.xz
|
||||
tar -xf TriliumNextNotes-linux-x64-${RELEASE}.tar.xz
|
||||
mv trilium-linux-x64-server /opt/trilium
|
||||
msg_ok "Installed TriliumNext"
|
||||
|
||||
@ -53,5 +53,5 @@ customize
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
rm -rf TriliumNextNotes-linux-x64-${RELEASE}.tar.xz
|
||||
msg_ok "Cleaned"
|
||||
|
@ -19,13 +19,13 @@ $STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Updating Python3"
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Python3"
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing Whoogle"
|
||||
$STD pip install brotli
|
||||
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
"name": "5etools",
|
||||
"slug": "5etools",
|
||||
"categories": [
|
||||
24
|
||||
],
|
||||
"date_created": "2025-01-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://wiki.tercept.net/en/5eTools",
|
||||
"website": "https://5e.tools/",
|
||||
"logo": "https://wiki.tercept.net/core-wiki-assets/5etoolslogocircle.png",
|
||||
"description": "5eTools is a website providing a suite of tools for 5th Edition Dungeons & Dragons players and Dungeon Masters.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/5etools.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 13,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
34
json/alpine-it-tools.json
Normal file
34
json/alpine-it-tools.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "Alpine-IT-Tools",
|
||||
"slug": "alpine-it-tools",
|
||||
"categories": [
|
||||
20
|
||||
],
|
||||
"date_created": "2025-01-30",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": null,
|
||||
"website": "https://it-tools.tech/",
|
||||
"logo": "https://raw.githubusercontent.com/CorentinTh/it-tools/08d977b8cdb7ffb76adfa18ba6eb4b73795ec814/public/safari-pinned-tab.svg",
|
||||
"description": "IT-Tools is a web-based suite of utilities designed to streamline and simplify various IT tasks, providing tools for developers and system administrators to manage their workflows efficiently.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/alpine-it-tools.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 0.2,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -22,7 +22,7 @@
|
||||
"ram": 512,
|
||||
"hdd": 0.1,
|
||||
"os": "alpine",
|
||||
"version": "3.19"
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
39
json/archlinux-vm.json
Normal file
39
json/archlinux-vm.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "Arch Linux",
|
||||
"slug": "archlinux-vm",
|
||||
"categories": [
|
||||
2
|
||||
],
|
||||
"date_created": "2025-01-27",
|
||||
"type": "vm",
|
||||
"updateable": false,
|
||||
"privileged": false,
|
||||
"interface_port": null,
|
||||
"documentation": null,
|
||||
"website": null,
|
||||
"logo": "https://raw.githubusercontent.com/ArchLinuxStudio/ArchLinuxTutorial/refs/heads/master/docs/arch_seo.png",
|
||||
"description": "Arch Linux is a highly customizable, independent Linux distribution that gives users complete control over their system. Known for its rolling release model, Arch Linux is always up-to-date with the latest software. It's favored by experienced users who appreciate its minimalist approach, demanding a hands-on installation and configuration process. This level of control and flexibility makes it a popular choice for those who want to tailor their Linux system to their exact needs.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "vm/archlinux-vm.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 1024,
|
||||
"hdd": 4,
|
||||
"os": null,
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "doesnt work with lvm and lvmthin disks!",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
34
json/baikal.json
Normal file
34
json/baikal.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "Baïkal",
|
||||
"slug": "baikal",
|
||||
"categories": [
|
||||
0
|
||||
],
|
||||
"date_created": "2025-01-31",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": null,
|
||||
"website": "https://sabre.io/baikal/",
|
||||
"logo": "https://sabre.io/img/logo.png",
|
||||
"description": "Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/baikal.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 4,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "Admin",
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
39
json/clean-orphaned-lvm.json
Normal file
39
json/clean-orphaned-lvm.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "Proxmox Clean Orphaned LVM",
|
||||
"slug": "clean-orphaned-lvm",
|
||||
"categories": [
|
||||
1
|
||||
],
|
||||
"date_created": "2025-01-29",
|
||||
"type": "misc",
|
||||
"updateable": false,
|
||||
"privileged": false,
|
||||
"interface_port": null,
|
||||
"documentation": null,
|
||||
"website": null,
|
||||
"logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png",
|
||||
"description": "This script helps Proxmox users identify and remove orphaned LVM volumes that are no longer associated with any VM or LXC container. It scans all LVM volumes, detects unused ones, and provides an interactive prompt to delete them safely. System-critical volumes like root, swap, and data are excluded to prevent accidental deletion.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "misc/clean-orphaned-lvm.sh",
|
||||
"resources": {
|
||||
"cpu": null,
|
||||
"ram": null,
|
||||
"hdd": null,
|
||||
"os": null,
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Execute within the Proxmox shell",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
@ -33,7 +33,7 @@
|
||||
"ram": 1024,
|
||||
"hdd": 2,
|
||||
"os": "alpine",
|
||||
"version": "3.19"
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -33,7 +33,7 @@
|
||||
"ram": 256,
|
||||
"hdd": 1,
|
||||
"os": "alpine",
|
||||
"version": "3.19"
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -4,7 +4,7 @@
|
||||
"categories": [
|
||||
10
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"date_created": "2025-01-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
@ -19,7 +19,7 @@
|
||||
"script": "ct/homarr.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"ram": 4096,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
|
34
json/mattermost.json
Normal file
34
json/mattermost.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "Mattermost",
|
||||
"slug": "mattermost",
|
||||
"categories": [
|
||||
25
|
||||
],
|
||||
"date_created": "2025-01-30",
|
||||
"type": "ct",
|
||||
"updateable": false,
|
||||
"privileged": false,
|
||||
"interface_port": 8065,
|
||||
"documentation": null,
|
||||
"website": "https://mattermost.com/",
|
||||
"logo": "https://avatars.githubusercontent.com/u/9828093?s=200&v=4",
|
||||
"description": "Mattermost is an open source platform for secure collaboration across the entire software development lifecycle. It's written in Go and React and runs as a single Linux binary with MySQL or PostgreSQL. It has a slimilar interface and features to Slack or Discord.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/mattermost.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 2048,
|
||||
"hdd": 8,
|
||||
"os": "ubuntu",
|
||||
"version": "24.04"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -1,30 +1,30 @@
|
||||
{
|
||||
"categories": [
|
||||
{ "name": "Proxmox & Virtualization", "id": 1, "sort_order": 1.0 },
|
||||
{ "name": "Operating Systems", "id": 2, "sort_order": 2.0 },
|
||||
{ "name": "Containers & Docker", "id": 3, "sort_order": 3.0 },
|
||||
{ "name": "Network & Firewall", "id": 4, "sort_order": 4.0 },
|
||||
{ "name": "Adblock & DNS", "id": 5, "sort_order": 5.0 },
|
||||
{ "name": "Authentication & Security", "id": 6, "sort_order": 6.0 },
|
||||
{ "name": "Backup & Recovery", "id": 7, "sort_order": 7.0 },
|
||||
{ "name": "Databases", "id": 8, "sort_order": 8.0 },
|
||||
{ "name": "Monitoring & Analytics", "id": 9, "sort_order": 9.0 },
|
||||
{ "name": "Dashboards & Frontends", "id": 10, "sort_order": 10.0 },
|
||||
{ "name": "Files & Downloads", "id": 11, "sort_order": 11.0 },
|
||||
{ "name": "Documents & Notes", "id": 12, "sort_order": 12.0 },
|
||||
{ "name": "Media & Streaming", "id": 13, "sort_order": 13.0 },
|
||||
{ "name": "*Arr Suite", "id": 14, "sort_order": 14.0 },
|
||||
{ "name": "NVR & Cameras", "id": 15, "sort_order": 15.0 },
|
||||
{ "name": "IoT & Smart Home", "id": 16, "sort_order": 16.0 },
|
||||
{ "name": "ZigBee, Z-Wave & Matter", "id": 17, "sort_order": 17.0 },
|
||||
{ "name": "MQTT & Messaging", "id": 18, "sort_order": 18.0 },
|
||||
{ "name": "Automation & Scheduling", "id": 19, "sort_order": 19.0 },
|
||||
{ "name": "AI / Coding & Dev-Tools", "id": 20, "sort_order": 20.0 },
|
||||
{ "name": "Webservers & Proxies", "id": 21, "sort_order": 21.0 },
|
||||
{ "name": "Bots & ChatOps", "id": 22, "sort_order": 22.0 },
|
||||
{ "name": "Finance & Budgeting", "id": 23, "sort_order": 23.0 },
|
||||
{ "name": "Gaming & Leisure", "id": 24, "sort_order": 24.0 },
|
||||
{ "name": "Business & ERP", "id": 25, "sort_order": 25.0 },
|
||||
{ "name": "Miscellaneous", "id": 0, "sort_order": 99.0 }
|
||||
{ "name": "Proxmox & Virtualization", "id": 1, "sort_order": 1.0, "description": "Tools and scripts to manage Proxmox VE and virtualization platforms effectively." },
|
||||
{ "name": "Operating Systems", "id": 2, "sort_order": 2.0, "description": "Scripts for deploying and managing various operating systems." },
|
||||
{ "name": "Containers & Docker", "id": 3, "sort_order": 3.0, "description": "Solutions for containerization using Docker and related technologies." },
|
||||
{ "name": "Network & Firewall", "id": 4, "sort_order": 4.0, "description": "Enhance network security and configure firewalls with ease." },
|
||||
{ "name": "Adblock & DNS", "id": 5, "sort_order": 5.0, "description": "Optimize your network with DNS and ad-blocking solutions." },
|
||||
{ "name": "Authentication & Security", "id": 6, "sort_order": 6.0, "description": "Secure your infrastructure with authentication and security tools." },
|
||||
{ "name": "Backup & Recovery", "id": 7, "sort_order": 7.0, "description": "Reliable backup and recovery scripts to protect your data." },
|
||||
{ "name": "Databases", "id": 8, "sort_order": 8.0, "description": "Deploy and manage robust database systems with ease." },
|
||||
{ "name": "Monitoring & Analytics", "id": 9, "sort_order": 9.0, "description": "Monitor system performance and analyze data seamlessly." },
|
||||
{ "name": "Dashboards & Frontends", "id": 10, "sort_order": 10.0, "description": "Create interactive dashboards and user-friendly frontends." },
|
||||
{ "name": "Files & Downloads", "id": 11, "sort_order": 11.0, "description": "Manage file sharing and downloading solutions efficiently." },
|
||||
{ "name": "Documents & Notes", "id": 12, "sort_order": 12.0, "description": "Organize and manage documents and note-taking tools." },
|
||||
{ "name": "Media & Streaming", "id": 13, "sort_order": 13.0, "description": "Stream and manage media effortlessly across devices." },
|
||||
{ "name": "*Arr Suite", "id": 14, "sort_order": 14.0, "description": "Automated media management with the popular *Arr suite tools." },
|
||||
{ "name": "NVR & Cameras", "id": 15, "sort_order": 15.0, "description": "Manage network video recorders and camera setups." },
|
||||
{ "name": "IoT & Smart Home", "id": 16, "sort_order": 16.0, "description": "Control and automate IoT devices and smart home systems." },
|
||||
{ "name": "ZigBee, Z-Wave & Matter", "id": 17, "sort_order": 17.0, "description": "Solutions for ZigBee, Z-Wave, and Matter-based device management." },
|
||||
{ "name": "MQTT & Messaging", "id": 18, "sort_order": 18.0, "description": "Set up reliable messaging and MQTT-based communication systems." },
|
||||
{ "name": "Automation & Scheduling", "id": 19, "sort_order": 19.0, "description": "Automate tasks and manage scheduling with powerful tools." },
|
||||
{ "name": "AI / Coding & Dev-Tools", "id": 20, "sort_order": 20.0, "description": "Leverage AI and developer tools for smarter coding workflows." },
|
||||
{ "name": "Webservers & Proxies", "id": 21, "sort_order": 21.0, "description": "Deploy and configure web servers and proxy solutions." },
|
||||
{ "name": "Bots & ChatOps", "id": 22, "sort_order": 22.0, "description": "Enhance collaboration with bots and ChatOps integrations." },
|
||||
{ "name": "Finance & Budgeting", "id": 23, "sort_order": 23.0, "description": "Track expenses and manage budgets efficiently." },
|
||||
{ "name": "Gaming & Leisure", "id": 24, "sort_order": 24.0, "description": "Scripts for gaming servers and leisure-related tools." },
|
||||
{ "name": "Business & ERP", "id": 25, "sort_order": 25.0, "description": "Streamline business operations with ERP and management tools." },
|
||||
{ "name": "Miscellaneous", "id": 0, "sort_order": 99.0, "description": "General scripts and tools that don't fit into other categories." }
|
||||
]
|
||||
}
|
||||
|
34
json/monica.json
Normal file
34
json/monica.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "Monica",
|
||||
"slug": "monica",
|
||||
"categories": [
|
||||
24
|
||||
],
|
||||
"date_created": "2025-01-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://github.com/monicahq/monica/tree/4.x/docs",
|
||||
"website": "https://www.monicahq.com/",
|
||||
"logo": "https://raw.githubusercontent.com/monicahq/monica/0400350b4f9bf02300b030b9924b66ef2960b188/public/img/favicon.svg",
|
||||
"description": "Monica is an open-source personal CRM designed to help you manage and strengthen your relationships. It allows you to store important details about your contacts, track interactions, set reminders for special dates, and log activities—all in one secure, private place. Perfect for busy individuals, Monica helps you stay organized, remember meaningful moments, and nurture your connections without ads or data mining. Install it on your own server for full control!",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/monica.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin@helper-scripts.com",
|
||||
"password": "helper-scripts.com"
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -33,7 +33,7 @@
|
||||
"ram": 1024,
|
||||
"hdd": 2,
|
||||
"os": "alpine",
|
||||
"version": "3.19"
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
40
json/nodebb.json
Normal file
40
json/nodebb.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "NodeBB",
|
||||
"slug": "nodebb",
|
||||
"categories": [
|
||||
10,
|
||||
25
|
||||
],
|
||||
"date_created": "2025-01-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 4567,
|
||||
"documentation": "https://docs.nodebb.org/",
|
||||
"website": "https://nodebb.org/",
|
||||
"logo": "https://raw.githubusercontent.com/NodeBB/NodeBB/refs/heads/master/public/logo.png",
|
||||
"description": "NodeBB Forum Software is powered by Node.js and supports either Redis, MongoDB, or a PostgreSQL database. It utilizes web sockets for instant interactions and real-time notifications. NodeBB takes the best of the modern web: real-time streaming discussions, mobile responsiveness, and rich RESTful read/write APIs, while staying true to the original bulletin board/forum format → categorical hierarchies, local user accounts, and asynchronous messaging.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/nodebb.sh",
|
||||
"resources": {
|
||||
"cpu": 4,
|
||||
"ram": 2048,
|
||||
"hdd": 10,
|
||||
"os": "Ubuntu",
|
||||
"version": "24.04"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "helper-scripts",
|
||||
"password": "helper-scripts"
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Only use Ubuntu 24.04!",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
34
json/paymenter.json
Normal file
34
json/paymenter.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "Paymenter",
|
||||
"slug": "paymenter",
|
||||
"categories": [
|
||||
21
|
||||
],
|
||||
"date_created": "2025-01-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://paymenter.org/docs",
|
||||
"website": "https://paymenter.org/",
|
||||
"logo": "https://avatars.githubusercontent.com/u/115177786?s=200&v=4",
|
||||
"description": "Paymenter is an open source webshop solution for hosting companies. It's developed to provide an more easy way to manage your hosting company.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/paymenter.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 1024,
|
||||
"hdd": 5,
|
||||
"os":"Debian",
|
||||
"version":"12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin@paymenter.org",
|
||||
"password": "paymenter"
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
"name": "Pf2eTools",
|
||||
"slug": "Pf2eTools",
|
||||
"categories": [
|
||||
24
|
||||
],
|
||||
"date_created": "2025-01-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://github.com/Pf2eToolsOrg/Pf2eTools/wiki",
|
||||
"website": "https://pf2etools.com/",
|
||||
"logo": "https://raw.githubusercontent.com/Pf2eToolsOrg/Pf2eTools/refs/heads/dev/android-chrome-192x192.png",
|
||||
"description": "Pf2eTools is an open-source website aiming to provide tools and information for Pathfinder 2nd Edition players and gamemasters. It's built using basic web technologies to ensure wide compatibility, and utilises client-side caching for speed, efficiency, and offline access.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/pf2etools.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 6,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
43
json/pocketid.json
Normal file
43
json/pocketid.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "Pocket ID",
|
||||
"slug": "pocketid",
|
||||
"categories": [
|
||||
6
|
||||
],
|
||||
"date_created": "2025-01-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://stonith404.github.io/pocket-id/introduction",
|
||||
"website": "https://github.com/stonith404/pocket-id",
|
||||
"logo": "https://raw.githubusercontent.com/stonith404/pocket-id/refs/heads/main/docs/static/img/pocket-id.png",
|
||||
"description": "Pocket ID is a simple OIDC provider that allows users to authenticate with their passkeys to your services.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/pocketid.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 4,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Pocket ID requires https to work.",
|
||||
"type": "warning"
|
||||
},
|
||||
{
|
||||
"text": "Configuration Path: `/opt/pocket-id/backend/.env`, `/opt/pocket-id/frontend/.env`.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
40
json/prometheus-pve-exporter.json
Normal file
40
json/prometheus-pve-exporter.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "Prometheus Proxmox VE Exporter",
|
||||
"slug": "prometheus-proxmox-ve-exporter",
|
||||
"categories": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"date_created": "2025-01-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 9221,
|
||||
"documentation": "https://github.com/prometheus-pve/prometheus-pve-exporter",
|
||||
"website": "https://github.com/prometheus-pve/prometheus-pve-exporter",
|
||||
"logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png",
|
||||
"description": "An exporter that exposes information gathered from Proxmox VE node for use by the Prometheus monitoring system.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/prometheus-pve-exporter.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 1024,
|
||||
"hdd": 2,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Please adjust the Proxmox credentials in the configuration file: /opt/prometheus-pve-exporter/pve.yml",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
@ -31,9 +31,9 @@
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 0.3,
|
||||
"hdd": 0.5,
|
||||
"os": "alpine",
|
||||
"version": "3.19"
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -33,7 +33,7 @@
|
||||
"ram": 256,
|
||||
"hdd": 0.3,
|
||||
"os": "alpine",
|
||||
"version": "3.19"
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -102,7 +102,7 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[0-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0 or later."
|
||||
msg_error "Exiting..."
|
||||
|
418
misc/build.func
418
misc/build.func
@ -1,14 +1,17 @@
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# Co-Author: MickLesk
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Co-Author: michelroegl-brunner
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
variables() {
|
||||
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
|
||||
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
|
||||
INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern.
|
||||
PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase
|
||||
PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase
|
||||
DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call.
|
||||
METHOD="default" # sets the METHOD variable to "default", used for the API call.
|
||||
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUDI variable.
|
||||
}
|
||||
|
||||
# This function sets various color variables using ANSI escape codes for formatting text in the terminal.
|
||||
@ -137,16 +140,16 @@ root_check() {
|
||||
|
||||
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
|
||||
pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
sleep 2
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# When a node is running tens of containers, it's possible to exceed the kernel's cryptographic key storage allocations.
|
||||
# When a node is running tens of containers, it's possible to exceed the kernel's cryptographic key storage allocations.
|
||||
# These are tuneable, so verify if the currently deployment is approaching the limits, advise the user on how to tune the limits, and exit the script.
|
||||
# https://cleveruptime.com/docs/files/proc-key-users | https://docs.kernel.org/security/keys/core.html
|
||||
maxkeys_check() {
|
||||
@ -222,76 +225,52 @@ get_current_ip() {
|
||||
# Function to update the IP address in the MOTD file
|
||||
update_motd_ip() {
|
||||
MOTD_FILE="/etc/motd"
|
||||
|
||||
|
||||
if [ -f "$MOTD_FILE" ]; then
|
||||
# Remove existing IP Address lines to prevent duplication
|
||||
sed -i '/IP Address:/d' "$MOTD_FILE"
|
||||
|
||||
|
||||
IP=$(get_current_ip)
|
||||
# Add the new IP address
|
||||
echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
# This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node.
|
||||
header_info() {
|
||||
# Helper function: Install FIGlet and download fonts
|
||||
install_figlet() {
|
||||
echo -e "${INFO}${BOLD}${DGN}Installing FIGlet...${CL}"
|
||||
# Function to download & save header files
|
||||
get_header() {
|
||||
local app_name=$(echo ${APP,,} | tr -d ' ')
|
||||
local header_url="https://github.com/community-scripts/ProxmoxVE/raw/main/ct/headers/${app_name}"
|
||||
local local_header_path="/usr/local/community-scripts/headers/${app_name}"
|
||||
|
||||
temp_dir=$(mktemp -d)
|
||||
curl -sL https://github.com/community-scripts/ProxmoxVE/raw/refs/heads/main/misc/figlet.tar.xz -o "$temp_dir/figlet.tar.xz"
|
||||
mkdir -p /tmp/figlet
|
||||
tar -xf "$temp_dir/figlet.tar.xz" -C /tmp/figlet --strip-components=1
|
||||
cd /tmp/figlet
|
||||
make >/dev/null
|
||||
mkdir -p "/usr/local/community-scripts/headers"
|
||||
|
||||
if [ -f "figlet" ]; then
|
||||
chmod +x figlet
|
||||
mv figlet /usr/local/bin/
|
||||
mkdir -p /usr/local/share/figlet
|
||||
cp -r /tmp/figlet/fonts/*.flf /usr/local/share/figlet/
|
||||
echo -e "${CM}${BOLD}${DGN}FIGlet successfully installed.${CL}"
|
||||
else
|
||||
echo -e "${ERR}${BOLD}${RED}Failed to install FIGlet.${CL}"
|
||||
# Check if local file already present
|
||||
if [ ! -f "$local_header_path" ]; then
|
||||
wget -qO "$local_header_path" "$header_url"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${WARN}${BOLD}${YLW}Failed to download header for ${app_name}. No header will be displayed.${CL}"
|
||||
return 1
|
||||
fi
|
||||
rm -rf "$temp_dir"
|
||||
}
|
||||
|
||||
# Check if figlet and the slant font are available
|
||||
if ! figlet -f slant "Test" &>/dev/null; then
|
||||
echo -e "${INFO}${BOLD}${DGN}FIGlet or the slant font is missing. Installing...${CL}"
|
||||
|
||||
if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||
# Debian/Ubuntu-based systems
|
||||
apt-get update -y &>/dev/null
|
||||
apt-get install -y wget build-essential &>/dev/null
|
||||
install_figlet
|
||||
|
||||
elif [ -f /etc/alpine-release ]; then
|
||||
# Alpine-based systems
|
||||
apk add --no-cache tar xz build-base wget &>/dev/null
|
||||
export TERM=xterm
|
||||
install_figlet
|
||||
|
||||
else
|
||||
echo -e "${ERR}${BOLD}${RED}Unsupported operating system.${CL}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Ensure the slant font is available
|
||||
if [ ! -f "/usr/share/figlet/slant.flf" ]; then
|
||||
echo -e "${INFO}${BOLD}${DGN}Downloading slant font...${CL}"
|
||||
wget -qO /usr/share/figlet/slant.flf "http://www.figlet.org/fonts/slant.flf"
|
||||
fi
|
||||
fi
|
||||
cat "$local_header_path"
|
||||
}
|
||||
|
||||
# Display ASCII header
|
||||
# This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node.
|
||||
header_info() {
|
||||
local app_name=$(echo ${APP,,} | tr -d ' ')
|
||||
local header_content
|
||||
|
||||
# Download & save Header-File locally
|
||||
header_content=$(get_header "$app_name")
|
||||
if [ $? -ne 0 ]; then
|
||||
# Fallback: Doesn't show Header
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Show ASCII-Header
|
||||
term_width=$(tput cols 2>/dev/null || echo 120)
|
||||
ascii_art=$(figlet -f slant -w "$term_width" "$APP")
|
||||
clear
|
||||
echo "$ascii_art"
|
||||
echo "$header_content"
|
||||
}
|
||||
|
||||
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.
|
||||
@ -383,34 +362,34 @@ exit_script() {
|
||||
advanced_settings() {
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Default distribution for $APP" "Default is: ${var_os} ${var_version} \n \nIf the default Linux distribution is not adhered to, script support will be discontinued. \n" 10 58
|
||||
if [ "$var_os" != "alpine" ]; then
|
||||
if [ "$var_os" != "alpine" ]; then
|
||||
var_default_os="${var_os}"
|
||||
var_os=""
|
||||
while [ -z "$var_os" ]; do
|
||||
if [ "$var_default_os" == "debian" ]; then
|
||||
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
|
||||
"debian" "" ON \
|
||||
"ubuntu" "" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_os" ]; then
|
||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
if [ "$var_default_os" == "debian" ]; then
|
||||
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
|
||||
"debian" "" ON \
|
||||
"ubuntu" "" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_os" ]; then
|
||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
if [ "$var_default_os" == "ubuntu" ]; then
|
||||
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
|
||||
"debian" "" OFF \
|
||||
"ubuntu" "" ON \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_os" ]; then
|
||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
if [ "$var_default_os" == "ubuntu" ]; then
|
||||
if var_os=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISTRIBUTION" --radiolist "Choose Distribution" 10 58 2 \
|
||||
"debian" "" OFF \
|
||||
"ubuntu" "" ON \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_os" ]; then
|
||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@ -418,7 +397,7 @@ advanced_settings() {
|
||||
var_default_version="${var_version}"
|
||||
var_version=""
|
||||
while [ -z "$var_version" ]; do
|
||||
if [ "$var_default_version" == "11" ]; then
|
||||
if [ "$var_default_version" == "11" ]; then
|
||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DEBIAN VERSION" --radiolist "Choose Version" 10 58 2 \
|
||||
"11" "Bullseye" ON \
|
||||
"12" "Bookworm" OFF \
|
||||
@ -449,13 +428,13 @@ advanced_settings() {
|
||||
var_default_version="${var_version}"
|
||||
var_version=""
|
||||
while [ -z "$var_version" ]; do
|
||||
if [ "$var_default_version" == "20.04" ]; then
|
||||
if [ "$var_default_version" == "20.04" ]; then
|
||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||
"20.04" "Focal" ON \
|
||||
"22.04" "Jammy" OFF \
|
||||
"24.04" "Noble" OFF \
|
||||
"24.10" "Oracular" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_version" ]; then
|
||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||
fi
|
||||
@ -468,7 +447,7 @@ advanced_settings() {
|
||||
"22.04" "Jammy" ON \
|
||||
"24.04" "Noble" OFF \
|
||||
"24.10" "Oracular" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_version" ]; then
|
||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||
fi
|
||||
@ -476,25 +455,25 @@ advanced_settings() {
|
||||
exit_script
|
||||
fi
|
||||
elif [ "$var_default_version" == "24.04" ]; then
|
||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||
"20.04" "Focal" OFF \
|
||||
"22.04" "Jammy" OFF \
|
||||
"24.04" "Noble" ON \
|
||||
"24.10" "Oracular" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_version" ]; then
|
||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||
fi
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if var_version=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UBUNTU VERSION" --radiolist "Choose Version" 10 58 4 \
|
||||
"20.04" "Focal" OFF \
|
||||
"22.04" "Jammy" OFF \
|
||||
"24.04" "Noble" OFF \
|
||||
"24.10" "Oracular" ON \
|
||||
3>&1 1>&2 2>&3); then
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ -n "$var_version" ]; then
|
||||
echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}"
|
||||
fi
|
||||
@ -509,7 +488,7 @@ advanced_settings() {
|
||||
CT_DEFAULT_TYPE="${CT_TYPE}"
|
||||
CT_TYPE=""
|
||||
while [ -z "$CT_TYPE" ]; do
|
||||
if [ "$CT_DEFAULT_TYPE" == "1" ]; then
|
||||
if [ "$CT_DEFAULT_TYPE" == "1" ]; then
|
||||
if CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CONTAINER TYPE" --radiolist "Choose Type" 10 58 2 \
|
||||
"1" "Unprivileged" ON \
|
||||
"0" "Privileged" OFF \
|
||||
@ -574,7 +553,6 @@ advanced_settings() {
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
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
|
||||
CT_ID="$NEXTID"
|
||||
@ -765,14 +743,14 @@ advanced_settings() {
|
||||
|
||||
if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then
|
||||
if [ -n "${ADV_TAGS}" ]; then
|
||||
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]')
|
||||
TAGS="${ADV_TAGS}"
|
||||
ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]')
|
||||
TAGS="${ADV_TAGS}"
|
||||
else
|
||||
TAGS=";"
|
||||
fi
|
||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||
else
|
||||
exit_script
|
||||
echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
|
||||
if [[ "$PW" == -password* ]]; then
|
||||
@ -795,7 +773,7 @@ advanced_settings() {
|
||||
fi
|
||||
else
|
||||
SSH_AUTHORIZED_KEY=""
|
||||
fi
|
||||
fi
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||
VERB="yes"
|
||||
else
|
||||
@ -813,6 +791,152 @@ advanced_settings() {
|
||||
fi
|
||||
}
|
||||
|
||||
post_to_api() {
|
||||
if [ "$DIAGNOSTICS" = "no" ]; then
|
||||
return 0
|
||||
fi
|
||||
local API_URL="http://api.community-scripts.org/upload"
|
||||
local pve_version="not found"
|
||||
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')
|
||||
|
||||
JSON_PAYLOAD=$(cat <<EOF
|
||||
{
|
||||
"ct_type": $CT_TYPE,
|
||||
"disk_size": $DISK_SIZE,
|
||||
"core_count": $CORE_COUNT,
|
||||
"ram_size": $RAM_SIZE,
|
||||
"verbose": "$VERBOSE",
|
||||
"os_type": "$var_os",
|
||||
"os_version": "$var_version",
|
||||
"hn": "$HN",
|
||||
"disableip6": "$DISABLEIP6",
|
||||
"ssh": "$SSH",
|
||||
"tags": "$TAGS",
|
||||
"nsapp": "$NSAPP",
|
||||
"method": "$METHOD",
|
||||
"pve_version": "$pve_version",
|
||||
"status": "installing",
|
||||
"random_id": "$RANDOM_UUID"
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
RESPONSE=$(curl -s -o response.txt -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD")
|
||||
|
||||
if [ "$RESPONSE" -ne 201 ] && [ "$RESPONSE" -ne 302 ]; then
|
||||
msg_error "API request failed with HTTP code $RESPONSE"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
POST_UPDATE_DONE=false
|
||||
post_update_to_api() {
|
||||
if [ "$DIAGNOSTICS" = "no" ]; then
|
||||
return 0
|
||||
fi
|
||||
if [ "$POST_UPDATE_DONE" = true ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
local API_URL="http://api.community-scripts.org/upload/updatestatus"
|
||||
local status="${1:-failed}"
|
||||
|
||||
JSON_PAYLOAD=$(cat <<EOF
|
||||
{
|
||||
"status": "$status",
|
||||
"random_id": "$RANDOM_UUID"
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
RESPONSE=$(curl -s -o response.txt -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$JSON_PAYLOAD")
|
||||
|
||||
if [ "$RESPONSE" -ne 201 ] && [ "$RESPONSE" -ne 302 ]; then
|
||||
msg_error "API UPDATE request failed with HTTP code $RESPONSE"
|
||||
fi
|
||||
|
||||
POST_UPDATE_DONE=true
|
||||
}
|
||||
|
||||
|
||||
diagnostics_check(){
|
||||
if ! [ -d "/usr/local/community-scripts" ]; then
|
||||
mkdir -p /usr/local/community-scripts
|
||||
fi
|
||||
|
||||
if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then
|
||||
cat <<EOF>/usr/local/community-scripts/diagnostics
|
||||
DIAGNOSTICS=yes
|
||||
|
||||
#This file is used to store the diagnostics settings for the Community-Scripts API.
|
||||
#https://github.com/community-scripts/ProxmoxVE/discussions/1836
|
||||
#Your diagnostics will be sent to the Community-Scripts API for troubleshooting/statistical purposes.
|
||||
#You can review the data at https://community-scripts.github.io/ProxmoxVE/data
|
||||
#If you do not wish to send diagnostics, please set the variable 'DIAGNOSTICS' to "no" in /usr/local/community-scripts/diagnostics, or use the menue.
|
||||
#This will disable the diagnostics feature.
|
||||
#To send diagnostics, set the variable 'DIAGNOSTICS' to "yes" in /usr/local/community-scripts/diagnostics, or use the menue.
|
||||
#This will enable the diagnostics feature.
|
||||
#The following information will be sent:
|
||||
#"ct_type"
|
||||
#"disk_size"
|
||||
#"core_count"
|
||||
#"ram_size"
|
||||
#"verbose"
|
||||
#"os_type"
|
||||
#"os_version"
|
||||
#"hn"
|
||||
#"disableip6"
|
||||
#"ssh"
|
||||
#"tags"
|
||||
#"nsapp"
|
||||
#"method"
|
||||
#"pve_version"
|
||||
#If you have any concerns, please review the source code at /misc/build.func
|
||||
EOF
|
||||
DIAGNOSTICS="yes"
|
||||
else
|
||||
cat <<EOF >/usr/local/community-scripts/diagnostics
|
||||
DIAGNOSTICS=no
|
||||
|
||||
#This file is used to store the diagnostics settings for the Community-Scripts API.
|
||||
#https://github.com/community-scripts/ProxmoxVE/discussions/1836
|
||||
#Your diagnostics will be sent to the Community-Scripts API for troubleshooting/statistical purposes.
|
||||
#You can review the data at https://community-scripts.github.io/ProxmoxVE/data
|
||||
#If you do not wish to send diagnostics, please set the variable 'DIAGNOSTICS' to "no" in /usr/local/community-scripts/diagnostics, or use the menue.
|
||||
#This will disable the diagnostics feature.
|
||||
#To send diagnostics, set the variable 'DIAGNOSTICS' to "yes" in /usr/local/community-scripts/diagnostics, or use the menue.
|
||||
#This will enable the diagnostics feature.
|
||||
#The following information will be sent:
|
||||
#"ct_type"
|
||||
#"disk_size"
|
||||
#"core_count"
|
||||
#"ram_size"
|
||||
#"verbose"
|
||||
#"os_type"
|
||||
#"os_version"
|
||||
#"hn"
|
||||
#"disableip6"
|
||||
#"ssh"
|
||||
#"tags"
|
||||
#"nsapp"
|
||||
#"method"
|
||||
#"pve_version"
|
||||
#If you have any concerns, please review the source code at /misc/build.func
|
||||
EOF
|
||||
DIAGNOSTICS="no"
|
||||
fi
|
||||
else
|
||||
DIAGNOSTICS=$(awk -F '=' '/^DIAGNOSTICS/ {print $2}' /usr/local/community-scripts/diagnostics)
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
install_script() {
|
||||
pve_check
|
||||
shell_check
|
||||
@ -820,6 +944,7 @@ install_script() {
|
||||
arch_check
|
||||
ssh_check
|
||||
maxkeys_check
|
||||
diagnostics_check
|
||||
|
||||
if systemctl is-active -q ping-instances.service; then
|
||||
systemctl -q stop ping-instances.service
|
||||
@ -828,12 +953,14 @@ install_script() {
|
||||
timezone=$(cat /etc/timezone)
|
||||
header_info
|
||||
while true; do
|
||||
|
||||
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --menu "Choose an option:" \
|
||||
12 50 4 \
|
||||
12 50 5 \
|
||||
"1" "Default Settings" \
|
||||
"2" "Default Settings (with verbose)" \
|
||||
"3" "Advanced Settings" \
|
||||
"4" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3)
|
||||
"4" "Diagnostic Settings" \
|
||||
"5" "Exit" --nocancel --default-item "1" 3>&1 1>&2 2>&3)
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${CROSS}${RD} Menu canceled. Exiting.${CL}"
|
||||
@ -841,35 +968,55 @@ install_script() {
|
||||
fi
|
||||
|
||||
case $CHOICE in
|
||||
1)
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}"
|
||||
VERB="no"
|
||||
base_settings "$VERB"
|
||||
echo_default
|
||||
break
|
||||
;;
|
||||
2)
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}"
|
||||
VERB="yes"
|
||||
base_settings "$VERB"
|
||||
echo_default
|
||||
break
|
||||
;;
|
||||
3)
|
||||
header_info
|
||||
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}"
|
||||
advanced_settings
|
||||
break
|
||||
;;
|
||||
4)
|
||||
echo -e "${CROSS}${RD}Exiting.${CL}"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo -e "${CROSS}${RD}Invalid option, please try again.${CL}"
|
||||
1)
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}"
|
||||
VERB="no"
|
||||
METHOD="default"
|
||||
base_settings "$VERB"
|
||||
echo_default
|
||||
break
|
||||
;;
|
||||
2)
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}"
|
||||
VERB="yes"
|
||||
METHOD="default"
|
||||
base_settings "$VERB"
|
||||
echo_default
|
||||
break
|
||||
;;
|
||||
3)
|
||||
header_info
|
||||
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings on node $PVEHOST_NAME${CL}"
|
||||
METHOD="advanced"
|
||||
advanced_settings
|
||||
break
|
||||
;;
|
||||
4)
|
||||
if [[ $DIAGNOSTICS == "yes" ]]; then
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \
|
||||
--yes-button "No" --no-button "Back" ; then
|
||||
DIAGNOSTICS="no"
|
||||
sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58
|
||||
fi
|
||||
else
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \
|
||||
--yes-button "Yes" --no-button "Back" ; then
|
||||
DIAGNOSTICS="yes"
|
||||
sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
5)
|
||||
echo -e "${CROSS}${RD}Exiting.${CL}"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo -e "${CROSS}${RD}Invalid option, please try again.${CL}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@ -935,7 +1082,7 @@ start() {
|
||||
|
||||
# This function collects user settings and integrates all the collected information.
|
||||
build_container() {
|
||||
# if [ "$VERB" == "yes" ]; then set -x; fi
|
||||
# if [ "$VERB" == "yes" ]; then set -x; fi
|
||||
|
||||
if [ "$CT_TYPE" == "1" ]; then
|
||||
FEATURES="keyctl=1,nesting=1"
|
||||
@ -943,6 +1090,9 @@ build_container() {
|
||||
FEATURES="nesting=1"
|
||||
fi
|
||||
|
||||
if [[ $DIAGNOSTICS == "yes" ]]; then
|
||||
post_to_api
|
||||
fi
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd $TEMP_DIR >/dev/null
|
||||
@ -1036,7 +1186,7 @@ EOF
|
||||
msg_ok "Started LXC Container"
|
||||
if [ "$var_os" == "alpine" ]; then
|
||||
sleep 3
|
||||
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/community
|
||||
EOF'
|
||||
@ -1051,7 +1201,8 @@ description() {
|
||||
IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||
|
||||
# Generate LXC Description
|
||||
DESCRIPTION=$(cat <<EOF
|
||||
DESCRIPTION=$(
|
||||
cat <<EOF
|
||||
<div align='center'>
|
||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||
@ -1079,7 +1230,7 @@ description() {
|
||||
</span>
|
||||
</div>
|
||||
EOF
|
||||
)
|
||||
)
|
||||
|
||||
# Set Description in LXC
|
||||
pct set "$CTID" -description "$DESCRIPTION"
|
||||
@ -1087,4 +1238,11 @@ EOF
|
||||
if [[ -f /etc/systemd/system/ping-instances.service ]]; then
|
||||
systemctl start ping-instances.service
|
||||
fi
|
||||
|
||||
post_update_to_api "done"
|
||||
}
|
||||
|
||||
trap 'post_update_to_api "failed"' EXIT
|
||||
trap 'post_update_to_api "failed"' SIGINT
|
||||
trap 'post_update_to_api "failed"' SIGTERM
|
||||
|
||||
|
83
misc/clean-orphaned-lvm.sh
Normal file
83
misc/clean-orphaned-lvm.sh
Normal file
@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ ________ ____ __ __ __ _ ____ ___
|
||||
/ __ \_________ _ ______ ___ ____ _ __ / ____/ /__ ____ _____ / __ \_________ / /_ ____ _____ ___ ____/ / / /| | / / |/ /____
|
||||
/ /_/ / ___/ __ \| |/_/ __ `__ \/ __ \| |/_/ / / / / _ \/ __ `/ __ \ / / / / ___/ __ \/ __ \/ __ `/ __ \/ _ \/ __ / / / | | / / /|_/ / ___/
|
||||
/ ____/ / / /_/ /> </ / / / / / /_/ /> < / /___/ / __/ /_/ / / / / / /_/ / / / /_/ / / / / /_/ / / / / __/ /_/ / / /__| |/ / / / (__ )
|
||||
/_/ /_/ \____/_/|_/_/ /_/ /_/\____/_/|_| \____/_/\___/\__,_/_/ /_/ \____/_/ / .___/_/ /_/\__,_/_/ /_/\___/\__,_/ /_____/___/_/ /_/____/
|
||||
/_/
|
||||
EOF
|
||||
}
|
||||
|
||||
# Function to check for orphaned LVM volumes
|
||||
function find_orphaned_lvm {
|
||||
echo -e "\n🔍 Scanning for orphaned LVM volumes...\n"
|
||||
|
||||
orphaned_volumes=()
|
||||
while read -r lv vg size; do
|
||||
container_id=$(echo "$lv" | grep -oE "[0-9]+" | head -1)
|
||||
|
||||
# Exclude system-critical LVs
|
||||
if [[ "$lv" == "data" || "$lv" == "root" || "$lv" == "swap" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Check if the ID exists as a VM or LXC container
|
||||
if [ -f "/etc/pve/lxc/${container_id}.conf" ] || [ -f "/etc/pve/qemu-server/${container_id}.conf" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
orphaned_volumes+=("$lv" "$vg" "$size")
|
||||
done < <(lvs --noheadings -o lv_name,vg_name,lv_size --separator ' ' | awk '{print $1, $2, $3}')
|
||||
|
||||
if [ ${#orphaned_volumes[@]} -eq 0 ]; then
|
||||
echo -e "✅ No orphaned LVM volumes found.\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Display orphaned volumes
|
||||
echo -e "❗ The following orphaned LVM volumes were found:\n"
|
||||
printf "%-25s %-10s %-10s\n" "LV Name" "VG" "Size"
|
||||
printf "%-25s %-10s %-10s\n" "-------------------------" "----------" "----------"
|
||||
|
||||
for ((i = 0; i < ${#orphaned_volumes[@]}; i+=3)); do
|
||||
printf "%-25s %-10s %-10s\n" "${orphaned_volumes[i]}" "${orphaned_volumes[i+1]}" "${orphaned_volumes[i+2]}"
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Function to delete selected volumes
|
||||
function delete_orphaned_lvm {
|
||||
for ((i = 0; i < ${#orphaned_volumes[@]}; i+=3)); do
|
||||
lv="${orphaned_volumes[i]}"
|
||||
vg="${orphaned_volumes[i+1]}"
|
||||
size="${orphaned_volumes[i+2]}"
|
||||
|
||||
read -p "❓ Do you want to delete $lv (VG: $vg, Size: $size)? [y/N]: " confirm
|
||||
if [[ "$confirm" =~ ^[Yy]$ ]]; then
|
||||
echo -e "🗑️ Deleting $lv from $vg..."
|
||||
lvremove -f "$vg/$lv"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "✅ Successfully deleted $lv.\n"
|
||||
else
|
||||
echo -e "❌ Failed to delete $lv.\n"
|
||||
fi
|
||||
else
|
||||
echo -e "⚠️ Skipping $lv.\n"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Run script
|
||||
header_info
|
||||
find_orphaned_lvm
|
||||
delete_orphaned_lvm
|
||||
|
||||
echo -e "✅ Cleanup process completed!\n"
|
@ -120,8 +120,11 @@ EOF
|
||||
yes)
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Support Subscriptions" "Supporting the software's development team is essential. Check their official website's Support Subscriptions for pricing. Without their dedicated work, we wouldn't have this exceptional software." 10 58
|
||||
msg_info "Disabling subscription nag"
|
||||
# Normal GUI:
|
||||
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
|
||||
apt --reinstall install proxmox-widget-toolkit &>/dev/null
|
||||
# JS-Library used when accessing via mobile device browser
|
||||
echo "DPkg::Post-Invoke { \"dpkg -V pmg-gui | grep -q '/pmgmanagerlib-mobile\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from Mobile UI...'; sed -i '/data\.status.*{/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/pmg-gui/js/pmgmanagerlib-mobile.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
|
||||
apt --reinstall install proxmox-widget-toolkit pmg-gui &>/dev/null
|
||||
msg_ok "Disabled subscription nag (Delete browser cache)"
|
||||
;;
|
||||
no)
|
||||
|
@ -231,7 +231,7 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[0-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.0 or later."
|
||||
echo -e "Exiting..."
|
||||
|
497
vm/archlinux-vm.sh
Normal file
497
vm/archlinux-vm.sh
Normal file
@ -0,0 +1,497 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
___ __ __ _ _ ____ ___
|
||||
/ | __________/ /_ / / (_)___ __ ___ __ | | / / |/ /
|
||||
/ /| | / ___/ ___/ __ \ / / / / __ \/ / / / |/_/ | | / / /|_/ /
|
||||
/ ___ |/ / / /__/ / / / / /___/ / / / / /_/ /> < | |/ / / / /
|
||||
/_/ |_/_/ \___/_/ /_/ /_____/_/_/ /_/\__,_/_/|_| |___/_/ /_/
|
||||
|
||||
EOF
|
||||
}
|
||||
header_info
|
||||
echo -e "\n Loading..."
|
||||
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
|
||||
YW=$(echo "\033[33m")
|
||||
BL=$(echo "\033[36m")
|
||||
RD=$(echo "\033[01;31m")
|
||||
BGN=$(echo "\033[4;92m")
|
||||
GN=$(echo "\033[1;92m")
|
||||
DGN=$(echo "\033[32m")
|
||||
CL=$(echo "\033[m")
|
||||
|
||||
CL=$(echo "\033[m")
|
||||
BOLD=$(echo "\033[1m")
|
||||
BFR="\\r\\033[K"
|
||||
HOLD=" "
|
||||
TAB=" "
|
||||
|
||||
CM="${TAB}✔️${TAB}${CL}"
|
||||
CROSS="${TAB}✖️${TAB}${CL}"
|
||||
INFO="${TAB}💡${TAB}${CL}"
|
||||
OS="${TAB}🖥️${TAB}${CL}"
|
||||
CONTAINERTYPE="${TAB}📦${TAB}${CL}"
|
||||
DISKSIZE="${TAB}💾${TAB}${CL}"
|
||||
CPUCORE="${TAB}🧠${TAB}${CL}"
|
||||
RAMSIZE="${TAB}🛠️${TAB}${CL}"
|
||||
CONTAINERID="${TAB}🆔${TAB}${CL}"
|
||||
HOSTNAME="${TAB}🏠${TAB}${CL}"
|
||||
BRIDGE="${TAB}🌉${TAB}${CL}"
|
||||
GATEWAY="${TAB}🌐${TAB}${CL}"
|
||||
DEFAULT="${TAB}⚙️${TAB}${CL}"
|
||||
MACADDRESS="${TAB}🔗${TAB}${CL}"
|
||||
VLANTAG="${TAB}🏷️${TAB}${CL}"
|
||||
CREATING="${TAB}🚀${TAB}${CL}"
|
||||
ADVANCED="${TAB}🧩${TAB}${CL}"
|
||||
|
||||
THIN="discard=on,ssd=1,"
|
||||
set -e
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
trap cleanup EXIT
|
||||
function error_handler() {
|
||||
local exit_code="$?"
|
||||
local line_number="$1"
|
||||
local command="$2"
|
||||
local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}"
|
||||
echo -e "\n$error_message\n"
|
||||
cleanup_vmid
|
||||
}
|
||||
|
||||
function cleanup_vmid() {
|
||||
if qm status $VMID &>/dev/null; then
|
||||
qm stop $VMID &>/dev/null
|
||||
qm destroy $VMID &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
popd >/dev/null
|
||||
rm -rf $TEMP_DIR
|
||||
}
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd $TEMP_DIR >/dev/null
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Arch Linux VM" --yesno "This will create a New Arch Linux VM. Proceed?" 10 58; then
|
||||
:
|
||||
else
|
||||
header_info && echo -e "${CROSS}${RD}User exited script${CL}\n" && exit
|
||||
fi
|
||||
|
||||
function msg_info() {
|
||||
local msg="$1"
|
||||
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
|
||||
}
|
||||
|
||||
function msg_ok() {
|
||||
local msg="$1"
|
||||
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||
}
|
||||
|
||||
function msg_error() {
|
||||
local msg="$1"
|
||||
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||
}
|
||||
|
||||
function check_root() {
|
||||
if [[ "$(id -u)" -ne 0 || $(ps -o comm= -p $PPID) == "sudo" ]]; then
|
||||
clear
|
||||
msg_error "Please run this script as root."
|
||||
echo -e "\nExiting..."
|
||||
sleep 2
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
sleep 2
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
function arch_check() {
|
||||
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
||||
echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
|
||||
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
|
||||
echo -e "Exiting..."
|
||||
sleep 2
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
function ssh_check() {
|
||||
if command -v pveversion >/dev/null 2>&1; then
|
||||
if [ -n "${SSH_CLIENT:+x}" ]; then
|
||||
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?" 10 62; then
|
||||
echo "you've been warned"
|
||||
else
|
||||
clear
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function exit-script() {
|
||||
clear
|
||||
echo -e "\n${CROSS}${RD}User exited script${CL}\n"
|
||||
exit
|
||||
}
|
||||
|
||||
function default_settings() {
|
||||
VMID="$NEXTID"
|
||||
FORMAT=",efitype=4m"
|
||||
MACHINE=""
|
||||
DISK_SIZE="4G"
|
||||
DISK_CACHE=""
|
||||
HN="arch-linux"
|
||||
CPU_TYPE=""
|
||||
CORE_COUNT="1"
|
||||
RAM_SIZE="1024"
|
||||
BRG="vmbr0"
|
||||
MAC="$GEN_MAC"
|
||||
VLAN=""
|
||||
MTU=""
|
||||
START_VM="yes"
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}${VMID}${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}i440fx${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}${CL}"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}${HN}${CL}"
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}${CL}"
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}${BRG}${CL}"
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}${MAC}${CL}"
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}Default${CL}"
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}Default${CL}"
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||
echo -e "${CREATING}${BOLD}${DGN}Creating a Arch Linux VM using the above default settings${CL}"
|
||||
}
|
||||
|
||||
function advanced_settings() {
|
||||
while true; do
|
||||
if VMID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Virtual Machine ID" 8 58 $NEXTID --title "VIRTUAL MACHINE ID" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$VMID" ]; then
|
||||
VMID="$NEXTID"
|
||||
fi
|
||||
if pct status "$VMID" &>/dev/null || qm status "$VMID" &>/dev/null; then
|
||||
echo -e "${CROSS}${RD} ID $VMID is already in use${CL}"
|
||||
sleep 2
|
||||
continue
|
||||
fi
|
||||
echo -e "${CONTAINERID}${BOLD}${DGN}Virtual Machine ID: ${BGN}$VMID${CL}"
|
||||
break
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
done
|
||||
|
||||
if MACH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "MACHINE TYPE" --radiolist --cancel-button Exit-Script "Choose Type" 10 58 2 \
|
||||
"i440fx" "Machine i440fx" ON \
|
||||
"q35" "Machine q35" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $MACH = q35 ]; then
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||
FORMAT=""
|
||||
MACHINE=" -machine q35"
|
||||
else
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Machine Type: ${BGN}$MACH${CL}"
|
||||
FORMAT=",efitype=4m"
|
||||
MACHINE=""
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GiB (e.g., 10, 20)" 8 58 "$DISK_SIZE" --title "DISK SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
DISK_SIZE=$(echo "$DISK_SIZE" | tr -d ' ')
|
||||
if [[ "$DISK_SIZE" =~ ^[0-9]+$ ]]; then
|
||||
DISK_SIZE="${DISK_SIZE}G"
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||
elif [[ "$DISK_SIZE" =~ ^[0-9]+G$ ]]; then
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}$DISK_SIZE${CL}"
|
||||
else
|
||||
echo -e "${DISKSIZE}${BOLD}${RD}Invalid Disk Size. Please use a number (e.g., 10 or 10G).${CL}"
|
||||
exit-script
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if DISK_CACHE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "DISK CACHE" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||
"0" "None (Default)" ON \
|
||||
"1" "Write Through" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $DISK_CACHE = "1" ]; then
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}Write Through${CL}"
|
||||
DISK_CACHE="cache=writethrough,"
|
||||
else
|
||||
echo -e "${DISKSIZE}${BOLD}${DGN}Disk Cache: ${BGN}None${CL}"
|
||||
DISK_CACHE=""
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if VM_NAME=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Hostname" 8 58 arch-linux --title "HOSTNAME" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $VM_NAME ]; then
|
||||
HN="arch-linux"
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||
else
|
||||
HN=$(echo ${VM_NAME,,} | tr -d ' ')
|
||||
echo -e "${HOSTNAME}${BOLD}${DGN}Hostname: ${BGN}$HN${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if CPU_TYPE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
||||
"0" "KVM64 (Default)" ON \
|
||||
"1" "Host" OFF \
|
||||
3>&1 1>&2 2>&3); then
|
||||
if [ $CPU_TYPE1 = "1" ]; then
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}Host${CL}"
|
||||
CPU_TYPE=" -cpu host"
|
||||
else
|
||||
echo -e "${OS}${BOLD}${DGN}CPU Model: ${BGN}KVM64${CL}"
|
||||
CPU_TYPE=""
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $CORE_COUNT ]; then
|
||||
CORE_COUNT="2"
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||
else
|
||||
echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}$CORE_COUNT${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 2048 --title "RAM" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $RAM_SIZE ]; then
|
||||
RAM_SIZE="2048"
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||
else
|
||||
echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}$RAM_SIZE${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Bridge" 8 58 vmbr0 --title "BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $BRG ]; then
|
||||
BRG="vmbr0"
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
else
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if MAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a MAC Address" 8 58 $GEN_MAC --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $MAC1 ]; then
|
||||
MAC="$GEN_MAC"
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC${CL}"
|
||||
else
|
||||
MAC="$MAC1"
|
||||
echo -e "${MACADDRESS}${BOLD}${DGN}MAC Address: ${BGN}$MAC1${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $VLAN1 ]; then
|
||||
VLAN1="Default"
|
||||
VLAN=""
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||
else
|
||||
VLAN=",tag=$VLAN1"
|
||||
echo -e "${VLANTAG}${BOLD}${DGN}VLAN: ${BGN}$VLAN1${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||
if [ -z $MTU1 ]; then
|
||||
MTU1="Default"
|
||||
MTU=""
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||
else
|
||||
MTU=",mtu=$MTU1"
|
||||
echo -e "${DEFAULT}${BOLD}${DGN}Interface MTU Size: ${BGN}$MTU1${CL}"
|
||||
fi
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?" 10 58); then
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||
START_VM="yes"
|
||||
else
|
||||
echo -e "${GATEWAY}${BOLD}${DGN}Start VM when completed: ${BGN}no${CL}"
|
||||
START_VM="no"
|
||||
fi
|
||||
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create a Arch Linux VM?" --no-button Do-Over 10 58); then
|
||||
echo -e "${CREATING}${BOLD}${DGN}Creating a Arch Linux VM using the above advanced settings${CL}"
|
||||
else
|
||||
header_info
|
||||
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||
advanced_settings
|
||||
fi
|
||||
}
|
||||
|
||||
function start_script() {
|
||||
if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "SETTINGS" --yesno "Use Default Settings?" --no-button Advanced 10 58); then
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings${CL}"
|
||||
default_settings
|
||||
else
|
||||
header_info
|
||||
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||
advanced_settings
|
||||
fi
|
||||
}
|
||||
|
||||
check_root
|
||||
arch_check
|
||||
pve_check
|
||||
ssh_check
|
||||
start_script
|
||||
|
||||
msg_info "Validating Storage"
|
||||
while read -r line; do
|
||||
TAG=$(echo $line | awk '{print $1}')
|
||||
TYPE=$(echo $line | awk '{printf "%-10s", $2}')
|
||||
FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
|
||||
ITEM=" Type: $TYPE Free: $FREE "
|
||||
OFFSET=2
|
||||
if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then
|
||||
MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
|
||||
fi
|
||||
STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
|
||||
done < <(pvesm status -content images | awk 'NR>1')
|
||||
VALID=$(pvesm status -content images | awk 'NR>1')
|
||||
if [ -z "$VALID" ]; then
|
||||
msg_error "Unable to detect a valid storage location."
|
||||
exit
|
||||
elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
|
||||
STORAGE=${STORAGE_MENU[0]}
|
||||
else
|
||||
while [ -z "${STORAGE:+x}" ]; do
|
||||
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \
|
||||
"Which storage pool you would like to use for ${HN}?\nTo make a selection, use the Spacebar.\n" \
|
||||
16 $(($MSG_MAX_LENGTH + 23)) 6 \
|
||||
"${STORAGE_MENU[@]}" 3>&1 1>&2 2>&3) || exit
|
||||
done
|
||||
fi
|
||||
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
|
||||
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
|
||||
msg_info "Retrieving the URL for the Arch Linux .iso File"
|
||||
URL=https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso
|
||||
sleep 2
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
wget -q --show-progress $URL
|
||||
echo -en "\e[1A\e[0K"
|
||||
FILE=$(basename $URL)
|
||||
msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
|
||||
|
||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
||||
case $STORAGE_TYPE in
|
||||
nfs | dir | cifs)
|
||||
DISK_EXT=".qcow2"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format qcow2"
|
||||
THIN=""
|
||||
;;
|
||||
btrfs)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
FORMAT=",efitype=4m"
|
||||
THIN=""
|
||||
;;
|
||||
esac
|
||||
for i in {0,1}; do
|
||||
disk="DISK$i"
|
||||
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
|
||||
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
|
||||
done
|
||||
|
||||
msg_info "Creating a Arch Linux VM"
|
||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||
-name $HN -tags community-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
||||
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
||||
qm set $VMID \
|
||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=${DISK_SIZE} \
|
||||
-ide2 ${STORAGE}:cloudinit \
|
||||
-boot order=scsi0 \
|
||||
-serial0 socket >/dev/null
|
||||
DESCRIPTION=$(
|
||||
cat <<EOF
|
||||
<div align='center'>
|
||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||
</a>
|
||||
|
||||
<h2 style='font-size: 24px; margin: 20px 0;'>Arch Linux VM</h2>
|
||||
|
||||
<p style='margin: 16px 0;'>
|
||||
<a href='https://ko-fi.com/community_scripts' target='_blank' rel='noopener noreferrer'>
|
||||
<img src='https://img.shields.io/badge/☕-Buy us a coffee-blue' alt='spend Coffee' />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<span style='margin: 0 10px;'>
|
||||
<i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i>
|
||||
<a href='https://github.com/community-scripts/ProxmoxVE' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a>
|
||||
</span>
|
||||
<span style='margin: 0 10px;'>
|
||||
<i class="fa fa-comments fa-fw" style="color: #f5f5f5;"></i>
|
||||
<a href='https://github.com/community-scripts/ProxmoxVE/discussions' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Discussions</a>
|
||||
</span>
|
||||
<span style='margin: 0 10px;'>
|
||||
<i class="fa fa-exclamation-circle fa-fw" style="color: #f5f5f5;"></i>
|
||||
<a href='https://github.com/community-scripts/ProxmoxVE/issues' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Issues</a>
|
||||
</span>
|
||||
</div>
|
||||
EOF
|
||||
)
|
||||
qm set "$VMID" -description "$DESCRIPTION" >/dev/null
|
||||
if [ -n "$DISK_SIZE" ]; then
|
||||
msg_info "Resizing disk to $DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DISK_SIZE} >/dev/null
|
||||
else
|
||||
msg_info "Using default disk size of $DEFAULT_DISK_SIZE GB"
|
||||
qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null
|
||||
fi
|
||||
|
||||
msg_ok "Created a Arch Linux VM ${CL}${BL}(${HN})"
|
||||
if [ "$START_VM" == "yes" ]; then
|
||||
msg_info "Starting Arch Linux VM"
|
||||
qm start $VMID
|
||||
msg_ok "Started Arch Linux VM"
|
||||
fi
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
@ -111,7 +111,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
@ -91,7 +91,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
@ -115,7 +115,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
@ -62,7 +62,7 @@ function cleanup() {
|
||||
}
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd $TEMP_DIR >/dev/null
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
@ -91,7 +91,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/8\.[1-3](\.[0-9]+)*"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user