mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-31 06:33:53 -04:00
Updated for v2 migration and use prebuilt release bin. (#12763)
This commit is contained in:
committed by
GitHub
parent
070f1120e6
commit
b57879afc5
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: DragoQC
|
# Author: DragoQC | Co-Author: nickheyer
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
|
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
|
||||||
|
|
||||||
@@ -38,34 +38,15 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Creating Backup"
|
msg_info "Creating Backup"
|
||||||
mkdir -p /opt/discopanel_backup_temp
|
mkdir -p /opt/discopanel_backup_temp
|
||||||
cp -r /opt/discopanel/data/discopanel.db \
|
cp /opt/discopanel/data/discopanel.db /opt/discopanel_backup_temp/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"
|
msg_ok "Created Backup"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
|
CLEAN_INSTALL=1 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
|
||||||
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"
|
msg_info "Restoring Data"
|
||||||
mkdir -p /opt/discopanel/data
|
mkdir -p /opt/discopanel/data
|
||||||
cp -a /opt/discopanel_backup_temp/. /opt/discopanel/data/
|
mv /opt/discopanel_backup_temp/discopanel.db /opt/discopanel/data/discopanel.db
|
||||||
rm -rf /opt/discopanel_backup_temp
|
rm -rf /opt/discopanel_backup_temp
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: DragoQC
|
# Author: DragoQC | Co-Author: nickheyer
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
|
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
|
||||||
|
|
||||||
@@ -12,25 +12,9 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "prebuild" "latest" "/opt/discopanel" "discopanel-linux-amd64.tar.gz"
|
||||||
$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
|
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"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/discopanel.service
|
cat <<EOF >/etc/systemd/system/discopanel.service
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -39,7 +23,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/discopanel
|
WorkingDirectory=/opt/discopanel
|
||||||
ExecStart=/opt/discopanel/discopanel
|
ExecStart=/opt/discopanel/discopanel-linux-amd64
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in New Issue
Block a user