Compare commits

..

1 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
8c5cd94914 Remove json files 2026-03-12 15:37:17 +01:00
16 changed files with 129 additions and 142 deletions

View File

@@ -1,4 +1,4 @@
name: Set state to is_deleted in pocketbase
name: Delete PocketBase entry on script/JSON removal
on:
push:
@@ -52,15 +52,15 @@ jobs:
slugs=$(echo $slugs | xargs -n1 | sort -u | tr '\n' ' ')
if [[ -z "$slugs" ]]; then
echo "No deleted JSON or script files to mark as deleted in PocketBase."
echo "No deleted JSON or script files to remove from PocketBase."
echo "count=0" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "$slugs" > slugs_to_delete.txt
echo "count=$(echo $slugs | wc -w)" >> "$GITHUB_OUTPUT"
echo "Slugs to mark as deleted: $slugs"
echo "Slugs to delete: $slugs"
- name: Mark as deleted in PocketBase
- name: Delete from PocketBase
if: steps.slugs.outputs.count != '0'
env:
POCKETBASE_URL: ${{ secrets.POCKETBASE_URL }}
@@ -123,8 +123,6 @@ jobs:
const token = JSON.parse(authRes.body).token;
const recordsUrl = apiBase + '/collections/' + encodeURIComponent(coll) + '/records';
const patchBody = JSON.stringify({ is_deleted: true });
for (const slug of slugs) {
const filter = "(slug='" + slug + "')";
const listRes = await request(recordsUrl + '?filter=' + encodeURIComponent(filter) + '&perPage=1', {
@@ -136,15 +134,14 @@ jobs:
console.log('No PocketBase record for slug "' + slug + '", skipping.');
continue;
}
const patchRes = await request(recordsUrl + '/' + existingId, {
method: 'PATCH',
headers: { 'Authorization': token, 'Content-Type': 'application/json' },
body: patchBody
const delRes = await request(recordsUrl + '/' + existingId, {
method: 'DELETE',
headers: { 'Authorization': token }
});
if (patchRes.ok) {
console.log('Set is_deleted=true for slug "' + slug + '" (id=' + existingId + ').');
if (delRes.ok) {
console.log('Deleted PocketBase record for slug "' + slug + '" (id=' + existingId + ').');
} else {
console.warn('PATCH failed for slug "' + slug + '": ' + patchRes.statusCode + ' ' + patchRes.body);
console.warn('DELETE failed for slug "' + slug + '": ' + delRes.statusCode + ' ' + delRes.body);
}
}
console.log('Done.');

View File

@@ -420,30 +420,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-03-13
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Hotfix: Removed clean install usage from original script. [@nickheyer](https://github.com/nickheyer) ([#12870](https://github.com/community-scripts/ProxmoxVE/pull/12870))
- #### 🔧 Refactor
- Discopanel: V2 Support + Script rewrite [@nickheyer](https://github.com/nickheyer) ([#12763](https://github.com/community-scripts/ProxmoxVE/pull/12763))
### 🧰 Tools
- update-apps: fix restore path, add PBS support and improve restore messages [@omertahaoztop](https://github.com/omertahaoztop) ([#12528](https://github.com/community-scripts/ProxmoxVE/pull/12528))
- #### 🐞 Bug Fixes
- fix(pve-privilege-converter): handle already stopped container in manage_states [@liuqitoday](https://github.com/liuqitoday) ([#12765](https://github.com/community-scripts/ProxmoxVE/pull/12765))
### 📚 Documentation
- Update: Docs/website metadata workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#12858](https://github.com/community-scripts/ProxmoxVE/pull/12858))
## 2026-03-12
### 🚀 Updated Scripts
@@ -474,21 +450,11 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- tools.func: support older NVIDIA driver versions with 2 segments (xxx.xxx) [@MickLesk](https://github.com/MickLesk) ([#12796](https://github.com/community-scripts/ProxmoxVE/pull/12796))
### 🧰 Tools
- #### 🐞 Bug Fixes
- Fix PBS microcode naming [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#12834](https://github.com/community-scripts/ProxmoxVE/pull/12834))
### 📂 Github
- Cleanup: remove old workflow files [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#12818](https://github.com/community-scripts/ProxmoxVE/pull/12818))
- Cleanup: remove frontend, move JSONs to json/ top-level [@MickLesk](https://github.com/MickLesk) ([#12813](https://github.com/community-scripts/ProxmoxVE/pull/12813))
### ❔ Uncategorized
- Remove json files [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#12830](https://github.com/community-scripts/ProxmoxVE/pull/12830))
## 2026-03-11
### 🚀 Updated Scripts

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: DragoQC | Co-Author: nickheyer
# Author: DragoQC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
@@ -38,15 +38,34 @@ function update_script() {
msg_info "Creating Backup"
mkdir -p /opt/discopanel_backup_temp
cp /opt/discopanel/data/discopanel.db /opt/discopanel_backup_temp/discopanel.db
cp -r /opt/discopanel/data/discopanel.db \
/opt/discopanel/data/.recovery_key \
/opt/discopanel_backup_temp/
if [[ -d /opt/discopanel/data/servers ]]; then
cp -r /opt/discopanel/data/servers /opt/discopanel_backup_temp/
fi
msg_ok "Created Backup"
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "prebuild" "latest" "/opt/discopanel" "discopanel-linux-amd64.tar.gz"
ln -sf /opt/discopanel/discopanel-linux-amd64 /opt/discopanel/discopanel
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
msg_info "Setting up DiscoPanel"
cd /opt/discopanel
$STD make gen
cd /opt/discopanel/web/discopanel
$STD npm install
$STD npm run build
msg_ok "Built Web Interface"
setup_go
msg_info "Building DiscoPanel"
cd /opt/discopanel
$STD go build -o discopanel cmd/discopanel/main.go
msg_ok "Built DiscoPanel"
msg_info "Restoring Data"
mkdir -p /opt/discopanel/data
mv /opt/discopanel_backup_temp/discopanel.db /opt/discopanel/data/discopanel.db
cp -a /opt/discopanel_backup_temp/. /opt/discopanel/data/
rm -rf /opt/discopanel_backup_temp
msg_ok "Restored Data"

View File

@@ -46,11 +46,11 @@ function update_script() {
"main"
msg_ok "Migrated to new Plex repository"
fi
elif compgen -G "/etc/apt/sources.list.d/plex*.list" >/dev/null; then
elif [[ -f /etc/apt/sources.list.d/plexmediaserver.list ]]; then
msg_info "Migrating to new Plex repository (deb822)"
rm -f /etc/apt/sources.list.d/plex*.list
rm -f /etc/apt/sources.list.d/plexmediaserver.list
rm -f /etc/apt/sources.list.d/plex*
rm -f /usr/share/keyrings/PlexSign.asc
rm -f /usr/share/keyrings/plexmediaserver.v2.gpg
setup_deb822_repo \
"plexmediaserver" \
"https://downloads.plex.tv/plex-keys/PlexSign.v2.key" \
@@ -58,15 +58,6 @@ function update_script() {
"public" \
"main"
msg_ok "Migrated to new Plex repository (deb822)"
elif [[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
msg_info "Setting up Plex repository"
setup_deb822_repo \
"plexmediaserver" \
"https://downloads.plex.tv/plex-keys/PlexSign.v2.key" \
"https://repo.plex.tv/deb/" \
"public" \
"main"
msg_ok "Set up Plex repository"
fi
if [[ -f /usr/local/bin/plexupdate ]] || [[ -d /opt/plexupdate ]]; then
msg_info "Removing legacy plexupdate"

View File

@@ -1,4 +1,4 @@
# 🤖 AI Contribution Guidelines for ProxmoxVE
# 🤖 AI Contribution Guidelines for ProxmoxVE
> **This documentation is intended for all AI assistants (GitHub Copilot, Claude, ChatGPT, etc.) contributing to this project.**
@@ -653,15 +653,15 @@ Look at these recent well-implemented applications as reference:
- Use of `check_for_gh_release` and `fetch_and_deploy_gh_release`
- Correct backup/restore patterns in `update_script`
- Footer always ends with `motd_ssh`, `customize`, `cleanup_lxc`
- Website metadata requested via the website (Report issue on script page) if needed
- JSON metadata files created for each app
---
## Website Metadata (Reference)
## <EFBFBD> JSON Metadata Files
Website metadata (name, slug, description, logo, categories, etc.) is **not** added as files in the repo. Contributors request or update it via the **website**: go to the script's page and use the **Report issue** button; the flow will guide you. The structure below is a **reference** for what metadata exists (e.g. for the form or when describing what you need).
Every application requires a JSON metadata file in `frontend/public/json/<appname>.json`.
### JSON Structure (Reference)
### JSON Structure
```json
{
@@ -804,7 +804,7 @@ Or no credentials:
- [ ] `motd_ssh`, `customize`, `cleanup_lxc` at the end of install scripts
- [ ] No custom download/version-check logic
- [ ] All links point to `community-scripts/ProxmoxVE` (not `ProxmoxVED`!)
- [ ] Website metadata requested via the website (Report issue) if needed
- [ ] JSON metadata file created in `frontend/public/json/<appname>.json`
- [ ] Category IDs are valid (0-25)
- [ ] Default OS version is Debian 13 or newer (unless special requirement)
- [ ] Default resources are reasonable for the application
@@ -832,15 +832,15 @@ Or no credentials:
## 🍒 Important: Cherry-Picking Your Files for PR Submission
⚠️ **CRITICAL**: When you submit your PR, you must use git cherry-pick to send ONLY your 2 files!
⚠️ **CRITICAL**: When you submit your PR, you must use git cherry-pick to send ONLY your 3-4 files!
Why? Because `setup-fork.sh` modifies 600+ files to update links. If you commit all changes, your PR will be impossible to merge.
**See**: [README.md - Cherry-Pick Section](README.md#-cherry-pick-submitting-only-your-changes) for complete instructions on:
- Creating a clean submission branch
- Cherry-picking only your files (ct/myapp.sh, install/myapp-install.sh)
- Verifying your PR has only 2 file changes (not 600+)
- Cherry-picking only your files (ct/myapp.sh, install/myapp-install.sh, frontend/public/json/myapp.json)
- Verifying your PR has only 3 file changes (not 600+)
**Quick reference**:
@@ -849,7 +849,7 @@ Why? Because `setup-fork.sh` modifies 600+ files to update links. If you commit
git fetch upstream
git checkout -b submit/myapp upstream/main
# Cherry-pick your commit(s) or manually add your 2 files
# Cherry-pick your commit(s) or manually add your 3-4 files
# Then push to your fork and create PR
```
@@ -865,4 +865,4 @@ git checkout -b submit/myapp upstream/main
- [../EXIT_CODES.md](../EXIT_CODES.md) - Exit code reference
- [templates_ct/](templates_ct/) - CT script templates
- [templates_install/](templates_install/) - Install script templates
- [templates_json/](templates_json/) - Metadata structure reference; submit via website
- [templates_json/](templates_json/) - JSON metadata templates

View File

@@ -24,9 +24,9 @@ This guide explains the current execution flow and what to verify during reviews
- Uses `tools.func` helpers (setup\_\*).
- Ends with `motd_ssh`, `customize`, `cleanup_lxc`.
### Website Metadata
### JSON Metadata
- Website metadata for new/updated scripts is requested via the website (Report issue on script page) where applicable.
- File in `frontend/public/json/<appname>.json` matches template schema.
### Testing

View File

@@ -19,7 +19,7 @@ These documents cover the coding standards for the following types of files in o
- **`install/$AppName-install.sh` Scripts**: These scripts are responsible for the installation of applications.
- **`ct/$AppName.sh` Scripts**: These scripts handle the creation and updating of containers.
- **Website metadata**: Display data (name, description, logo, etc.) is requested via the website (Report issue on the script page), not via files in the repo.
- **`json/$AppName.json`**: These files store structured data and are used for the website.
Each section provides detailed guidelines on various aspects of coding, including shebang usage, comments, variable naming, function naming, indentation, error handling, command substitution, quoting, script structure, and logging. Additionally, examples are provided to illustrate the application of these standards.
@@ -110,7 +110,7 @@ git push origin your-feature-branch
### 6. Cherry-Pick: Submit Only Your Files for PR
⚠️ **IMPORTANT**: setup-fork.sh modified 600+ files. You MUST only submit your 2 new files!
⚠️ **IMPORTANT**: setup-fork.sh modified 600+ files. You MUST only submit your 3 new files!
See [README.md - Cherry-Pick Guide](README.md#-cherry-pick-submitting-only-your-changes) for step-by-step instructions.
@@ -124,11 +124,12 @@ git checkout -b submit/myapp upstream/main
# Copy only your files
cp ../your-work-branch/ct/myapp.sh ct/myapp.sh
cp ../your-work-branch/install/myapp-install.sh install/myapp-install.sh
cp ../your-work-branch/frontend/public/json/myapp.json frontend/public/json/myapp.json
# Commit and verify
git add ct/myapp.sh install/myapp-install.sh
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp"
git diff upstream/main --name-only # Should show ONLY your 2 files
git diff upstream/main --name-only # Should show ONLY your 3 files
# Push and create PR
git push origin submit/myapp
@@ -138,10 +139,11 @@ git push origin submit/myapp
Open a Pull Request from `submit/myapp``community-scripts/ProxmoxVE/main`.
Verify the PR shows ONLY these 2 files:
Verify the PR shows ONLY these 3 files:
- `ct/myapp.sh`
- `install/myapp-install.sh`
- `frontend/public/json/myapp.json`
---
@@ -173,4 +175,4 @@ dev_mode="trace,keep" bash -c "$(curl -fsSL https://raw.githubusercontent.com/co
- [CT Template: AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_ct/AppName.sh)
- [Install Template: AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_install/AppName-install.sh)
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_json/AppName.json) — metadata structure reference; submit via the website (Report issue on script page)
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_json/AppName.json)

View File

@@ -54,13 +54,15 @@ git checkout -b add/my-awesome-app
# 2. Create application scripts from templates
cp docs/contribution/templates_ct/AppName.sh ct/myapp.sh
cp docs/contribution/templates_install/AppName-install.sh install/myapp-install.sh
cp docs/contribution/templates_json/AppName.json frontend/public/json/myapp.json
# 3. Edit your scripts
nano ct/myapp.sh
nano install/myapp-install.sh
nano frontend/public/json/myapp.json
# 4. Commit and push to your fork
git add ct/myapp.sh install/myapp-install.sh
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp container and install scripts"
git push origin add/my-awesome-app
@@ -72,8 +74,6 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/
# 7. Open Pull Request on GitHub
# Create PR from: your-fork/add/my-awesome-app → community-scripts/ProxmoxVE/main
# To add or change website metadata (description, logo, etc.), use the Report issue button on the script's page on the website.
```
**💡 Tip**: See `../FORK_SETUP.md` for detailed fork setup and troubleshooting

View File

@@ -50,14 +50,15 @@ git push origin feature/my-awesome-app
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
# ⏱️ GitHub may take 10-30 seconds to update files - be patient!
# 8. Request website metadata via the website
# Go to the script's page on the website, use the "Report issue" button — it will guide you.
# 8. Create your JSON metadata file
cp docs/contribution/templates_json/AppName.json frontend/public/json/myapp.json
# Edit metadata: name, slug, categories, description, resources, etc.
# 9. No direct install-script test
# Install scripts are executed by the CT script inside the container
# 10. Commit ONLY your new files (see Cherry-Pick section below!)
git add ct/myapp.sh install/myapp-install.sh
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp container and install scripts"
git push origin feature/my-awesome-app
@@ -66,7 +67,7 @@ git push origin feature/my-awesome-app
⚠️ **IMPORTANT: After setup-fork.sh, many files are modified!**
See the **Cherry-Pick: Submitting Only Your Changes** section below to learn how to push ONLY your 2 files instead of 600+ modified files!
See the **Cherry-Pick: Submitting Only Your Changes** section below to learn how to push ONLY your 3-4 files instead of 600+ modified files!
### How Users Run Scripts (After Merged)
@@ -179,7 +180,7 @@ All scripts and configurations must follow our coding standards to ensure consis
- **[HELPER_FUNCTIONS.md](HELPER_FUNCTIONS.md)** - Reference for all tools.func helper functions
- **Container Scripts** - `/ct/` templates and guidelines
- **Install Scripts** - `/install/` templates and guidelines
- **Website metadata** Request via the website (Report issue on the script page); see [templates_json/AppName.md](templates_json/AppName.md)
- **JSON Configurations** - `frontend/public/json/` structure and format
### Quick Checklist
@@ -212,7 +213,7 @@ Key points:
## 🍒 Cherry-Pick: Submitting Only Your Changes
**Problem**: `setup-fork.sh` modifies 600+ files to update links. You don't want to submit all of those changes - only your new 2 files!
**Problem**: `setup-fork.sh` modifies 600+ files to update links. You don't want to submit all of those changes - only your new 3-4 files!
**Solution**: Use git cherry-pick to select only YOUR files.
@@ -225,7 +226,7 @@ Key points:
git status
# Verify your files are there
git status | grep -E "ct/myapp|install/myapp"
git status | grep -E "ct/myapp|install/myapp|json/myapp"
```
#### 2. Create a clean feature branch for submission
@@ -251,13 +252,15 @@ git cherry-pick <commit-hash-of-your-files>
# From your work branch, get the file contents
git show feature/my-awesome-app:ct/myapp.sh > /tmp/myapp.sh
git show feature/my-awesome-app:install/myapp-install.sh > /tmp/myapp-install.sh
git show feature/my-awesome-app:frontend/public/json/myapp.json > /tmp/myapp.json
# Add them to the clean branch
cp /tmp/myapp.sh ct/myapp.sh
cp /tmp/myapp-install.sh install/myapp-install.sh
cp /tmp/myapp.json frontend/public/json/myapp.json
# Commit
git add ct/myapp.sh install/myapp-install.sh
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git commit -m "feat: add MyApp"
```
@@ -269,6 +272,7 @@ git diff upstream/main --name-only
# Should show ONLY:
# ct/myapp.sh
# install/myapp-install.sh
# frontend/public/json/myapp.json
```
#### 5. Push and create PR
@@ -341,8 +345,7 @@ If you're using **Visual Studio Code** with an AI assistant, you can leverage ou
Please follow the guidelines in docs/contribution/AI.md to create:
1. ct/myapp.sh (container script)
2. install/myapp-install.sh (installation script)
Website listing/metadata is requested separately via the website (Report issue on the script page).
3. frontend/public/json/myapp.json (metadata)
```
4. **AI Will Generate**
@@ -354,8 +357,6 @@ If you're using **Visual Studio Code** with an AI assistant, you can leverage ou
- Have correct update mechanisms
- Are ready to submit as a PR
Website listing/metadata is requested separately via the website (Report issue on the script page).
### Key Points for AI Assistants
- **Templates Location**: `docs/contribution/templates_ct/AppName.sh`, `templates_install/`, `templates_json/`
@@ -408,9 +409,10 @@ cp docs/contribution/templates_ct/AppName.sh ct/my-app.sh
# Installation script template
cp docs/contribution/templates_install/AppName-install.sh install/my-app-install.sh
```
For website metadata (description, logo, etc.), use the Report issue button on the script's page on the website.
# JSON configuration template
cp docs/contribution/templates_json/AppName.json frontend/public/json/my-app.json
```
**Template Features:**

View File

@@ -149,7 +149,7 @@ fetch_and_deploy_gh_release "myapp" "owner/repo"
2. **Only add app-specific dependencies** - Don't add ca-certificates, curl, gnupg (handled by build.func)
3. **Test via curl from your fork** - Push first, then: `bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/MyApp.sh)"`
4. **Wait for GitHub to update** - Takes 10-30 seconds after git push
5. **Cherry-pick only YOUR files** - Submit only ct/MyApp.sh, install/MyApp-install.sh (2 files). Website metadata: use Report issue on the script's page on the website.
5. **Cherry-pick only YOUR files** - Submit only ct/MyApp.sh, install/MyApp-install.sh, frontend/public/json/myapp.json (3 files)
6. **Verify before PR** - Run `git diff upstream/main --name-only` to confirm only your files changed
---

View File

@@ -1,20 +1,21 @@
# Website Metadata - Quick Reference
# JSON Metadata Files - Quick Reference
Metadata (name, slug, description, logo, categories, etc.) controls how your application appears on the website. You do **not** add JSON files to the repo — you request changes via the website.
The metadata file (`frontend/public/json/myapp.json`) tells the web interface how to display your application.
---
## How to Request or Update Metadata
## Quick Start
1. **Go to the script on the website** — Open the [ProxmoxVE website](https://community-scripts.github.io/ProxmoxVE/), find your script (or the script you want to update).
2. **Press the "Report issue" button** on that scripts page.
3. **Follow the guide** — The flow will walk you through submitting or updating metadata.
**Use the JSON Generator Tool:**
[https://community-scripts.github.io/ProxmoxVE/json-editor](https://community-scripts.github.io/ProxmoxVE/json-editor)
1. Enter application details
2. Generator creates `frontend/public/json/myapp.json`
3. Copy the output to your contribution
---
## Metadata Structure (Reference)
The following describes the structure of script metadata used by the website. Use it as reference when filling out the form or describing what you need.
## File Structure
```json
{
@@ -147,14 +148,18 @@ Each installation method specifies resource requirements:
---
## See Examples on the Website
## Reference Examples
View script pages on the [ProxmoxVE website](https://community-scripts.github.io/ProxmoxVE/) to see how metadata is displayed for existing scripts.
See actual examples in the repo:
- [frontend/public/json/trip.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/trip.json)
- [frontend/public/json/thingsboard.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/thingsboard.json)
- [frontend/public/json/unifi.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/unifi.json)
---
## Need Help?
- **Request metadata** — Use the Report issue button on the scripts page on the website (see [How to Request or Update Metadata](#how-to-request-or-update-metadata) above).
- **[JSON Generator](https://community-scripts.github.io/ProxmoxVE/json-editor)** - Reference only; structure validation
- **[JSON Generator](https://community-scripts.github.io/ProxmoxVE/json-editor)** - Interactive tool
- **[README.md](../README.md)** - Full contribution workflow
- **[Quick Start](../README.md)** - Step-by-step guide

View File

@@ -61,7 +61,7 @@ To understand how to create a container script:
## Common Tasks
- **Add new container application** → [contribution/README.md](../contribution/README.md)
- **Add new container application** → [CONTRIBUTION_GUIDE.md](../CONTRIBUTION_GUIDE.md)
- **Debug container creation** → [EXIT_CODES.md](../EXIT_CODES.md)
- **Understand build.func** → [misc/build.func/](../misc/build.func/)
- **Development mode debugging** → [DEV_MODE.md](../DEV_MODE.md)

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: DragoQC | Co-Author: nickheyer
# Author: DragoQC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
@@ -12,9 +12,25 @@ setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "prebuild" "latest" "/opt/discopanel" "discopanel-linux-amd64.tar.gz"
msg_info "Installing Dependencies"
$STD apt install -y build-essential
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
setup_go
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
setup_docker
msg_info "Setting up DiscoPanel"
cd /opt/discopanel
$STD make gen
cd /opt/discopanel/web/discopanel
$STD npm install
$STD npm run build
cd /opt/discopanel
$STD go build -o discopanel cmd/discopanel/main.go
msg_ok "Setup DiscoPanel"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/discopanel.service
[Unit]
@@ -23,7 +39,7 @@ After=network.target
[Service]
WorkingDirectory=/opt/discopanel
ExecStart=/opt/discopanel/discopanel-linux-amd64
ExecStart=/opt/discopanel/discopanel
Restart=always
[Install]

View File

@@ -134,20 +134,16 @@ manage_states() {
read -rp "Shutdown source and start new container? [Y/n]: " answer
answer=${answer:-Y}
if [[ $answer =~ ^[Yy] ]]; then
pct shutdown "$CONTAINER_ID"
for i in {1..36}; do
sleep 5
! pct status "$CONTAINER_ID" | grep -q running && break
done
if pct status "$CONTAINER_ID" | grep -q running; then
pct shutdown "$CONTAINER_ID"
for i in {1..36}; do
sleep 5
! pct status "$CONTAINER_ID" | grep -q running && break
done
if pct status "$CONTAINER_ID" | grep -q running; then
read -rp "Timeout reached. Force shutdown? [Y/n]: " force
if [[ ${force:-Y} =~ ^[Yy] ]]; then
pkill -9 -f "lxc-start -F -n $CONTAINER_ID"
fi
read -rp "Timeout reached. Force shutdown? [Y/n]: " force
if [[ ${force:-Y} =~ ^[Yy] ]]; then
pkill -9 -f "lxc-start -F -n $CONTAINER_ID"
fi
else
msg_custom "" "\e[36m" "Source container $CONTAINER_ID is already stopped"
fi
pct start "$NEW_CONTAINER_ID"
msg_ok "New container started"

View File

@@ -426,23 +426,16 @@ for container in $CHOICE; do
elif [ $exit_code -eq 75 ]; then
echo -e "${YW}[WARN]${CL} Container $container skipped (requires interactive mode)"
elif [ "$BACKUP_CHOICE" == "yes" ]; then
msg_error "Update failed for container $container (exit code: $exit_code) — attempting restore"
msg_info "Restoring LXC $container from backup ($STORAGE_CHOICE)"
msg_info "Restoring LXC from backup"
pct stop $container
LXC_STORAGE=$(pct config $container | awk -F '[:,]' '/rootfs/ {print $2}')
BACKUP_ENTRY=$(pvesm list "$STORAGE_CHOICE" 2>/dev/null | awk -v ctid="$container" '$1 ~ "vzdump-lxc-"ctid"-" || $1 ~ "/ct/"ctid"/" {print $1}' | sort -r | head -n1)
if [ -z "$BACKUP_ENTRY" ]; then
msg_error "No backup found in storage $STORAGE_CHOICE for container $container"
exit 235
fi
msg_info "Restoring from: $BACKUP_ENTRY"
pct restore $container "$BACKUP_ENTRY" --storage $LXC_STORAGE --force >/dev/null 2>&1
pct restore $container /var/lib/vz/dump/vzdump-lxc-${container}-*.tar.zst --storage $LXC_STORAGE --force >/dev/null 2>&1
pct start $container
restorestatus=$?
if [ $restorestatus -eq 0 ]; then
pct start $container
msg_ok "Container $container successfully restored from backup"
msg_ok "Restored LXC from backup"
else
msg_error "Restore failed for container $container"
msg_error "Restored LXC from backup failed"
exit 235
fi
else