mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-23 03:09:51 +03:00
Compare commits
1 Commits
main
...
fix/github
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17736da9b8 |
34
CHANGELOG.md
34
CHANGELOG.md
@@ -413,40 +413,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- Gramps-Web ([#12157](https://github.com/community-scripts/ProxmoxVE/pull/12157))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix: Apache Guacamole - bump to Temurin JDK 17 to resolve Debian 13 (Trixie) install failure [@Copilot](https://github.com/Copilot) ([#12161](https://github.com/community-scripts/ProxmoxVE/pull/12161))
|
||||
- Docker-VM: add error handling for virt-customize finalization [@MickLesk](https://github.com/MickLesk) ([#12127](https://github.com/community-scripts/ProxmoxVE/pull/12127))
|
||||
- [Fix] Sure: add Sidekiq service [@vhsdream](https://github.com/vhsdream) ([#12186](https://github.com/community-scripts/ProxmoxVE/pull/12186))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Refactor & Bump to v2: Plex [@MickLesk](https://github.com/MickLesk) ([#12179](https://github.com/community-scripts/ProxmoxVE/pull/12179))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- karakeep: bump to node 24 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#12183](https://github.com/community-scripts/ProxmoxVE/pull/12183))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- tools.func: add GitHub API rate-limit detection and GITHUB_TOKEN support [@MickLesk](https://github.com/MickLesk) ([#12176](https://github.com/community-scripts/ProxmoxVE/pull/12176))
|
||||
|
||||
### 🧰 Tools
|
||||
|
||||
- CR*NMASTER ([#12065](https://github.com/community-scripts/ProxmoxVE/pull/12065))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Update package management commands in clean-lxcs.sh [@heinemannj](https://github.com/heinemannj) ([#12166](https://github.com/community-scripts/ProxmoxVE/pull/12166))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- calibre-web: Update logo URL [@MickLesk](https://github.com/MickLesk) ([#12178](https://github.com/community-scripts/ProxmoxVE/pull/12178))
|
||||
|
||||
## 2026-02-21
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -51,7 +51,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
JAVA_VERSION="17" setup_java
|
||||
JAVA_VERSION="11" setup_java
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop guacd tomcat
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
__
|
||||
____ __________ _____ ___ ____ _____ _ _____ / /_
|
||||
/ __ `/ ___/ __ `/ __ `__ \/ __ \/ ___/____| | /| / / _ \/ __ \
|
||||
/ /_/ / / / /_/ / / / / / / /_/ (__ )_____/ |/ |/ / __/ /_/ /
|
||||
\__, /_/ \__,_/_/ /_/ /_/ .___/____/ |__/|__/\___/_.___/
|
||||
/____/ /_/
|
||||
@@ -60,7 +60,7 @@ function update_script() {
|
||||
$STD corepack disable
|
||||
fi
|
||||
MODULE_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/karakeep/package.json)"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
setup_meilisearch
|
||||
|
||||
msg_info "Updating Karakeep"
|
||||
|
||||
64
ct/plex.sh
64
ct/plex.sh
@@ -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: tteck (tteckster) | MickLesk (CanbiZ)
|
||||
# Copyright (c) 2021-2026 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.plex.tv/
|
||||
|
||||
@@ -24,54 +24,28 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if ! dpkg -l plexmediaserver &>/dev/null; then
|
||||
if [[ ! -f /etc/apt/sources.list.d/plexmediaserver.list ]] &&
|
||||
[[ ! -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
# Migrate from old repository to new one if needed
|
||||
if [[ -f /etc/apt/sources.list.d/plexmediaserver.sources ]]; then
|
||||
local current_uri
|
||||
current_uri=$(grep -oP '(?<=URIs: ).*' /etc/apt/sources.list.d/plexmediaserver.sources 2>/dev/null || true)
|
||||
if [[ "$current_uri" == *"downloads.plex.tv/repo/deb"* ]]; then
|
||||
msg_info "Migrating to new Plex repository"
|
||||
rm -f /etc/apt/sources.list.d/plexmediaserver.sources
|
||||
rm -f /usr/share/keyrings/PlexSign.asc
|
||||
setup_deb822_repo \
|
||||
"plexmediaserver" \
|
||||
"https://downloads.plex.tv/plex-keys/PlexSign.v2.key" \
|
||||
"https://repo.plex.tv/deb/" \
|
||||
"public" \
|
||||
"main"
|
||||
msg_ok "Migrated to new Plex repository"
|
||||
fi
|
||||
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/plexmediaserver.list
|
||||
rm -f /etc/apt/sources.list.d/plex*
|
||||
rm -f /usr/share/keyrings/PlexSign.asc
|
||||
setup_deb822_repo \
|
||||
"plexmediaserver" \
|
||||
"https://downloads.plex.tv/plex-keys/PlexSign.v2.key" \
|
||||
"https://repo.plex.tv/deb/" \
|
||||
"public" \
|
||||
"main"
|
||||
msg_ok "Migrated to new Plex repository (deb822)"
|
||||
UPD=$(msg_menu "Plex Update Options" \
|
||||
"1" "Update LXC" \
|
||||
"2" "Install plexupdate")
|
||||
if [ "$UPD" == "1" ]; then
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated ${APP} LXC"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
fi
|
||||
if [[ -f /usr/local/bin/plexupdate ]] || [[ -d /opt/plexupdate ]]; then
|
||||
msg_info "Removing legacy plexupdate"
|
||||
rm -rf /opt/plexupdate /usr/local/bin/plexupdate
|
||||
crontab -l 2>/dev/null | grep -v plexupdate | crontab - 2>/dev/null || true
|
||||
msg_ok "Removed legacy plexupdate"
|
||||
if [ "$UPD" == "2" ]; then
|
||||
set +e
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/mrworf/plexupdate/master/extras/installer.sh)"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating Plex Media Server"
|
||||
$STD apt update
|
||||
$STD apt install -y plexmediaserver
|
||||
msg_ok "Updated Plex Media Server"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
||||
41
ct/sure.sh
41
ct/sure.sh
@@ -30,38 +30,9 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "Sure" "we-promise/sure"; then
|
||||
if [[ ! -f /etc/systemd/system/sure-worker.service ]]; then
|
||||
cat <<EOF >/etc/systemd/system/sure-worker.service
|
||||
[Unit]
|
||||
Description=Sure Background Worker (Sidekiq)
|
||||
After=network.target redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/sure
|
||||
Environment=RAILS_ENV=production
|
||||
Environment=BUNDLE_DEPLOYMENT=1
|
||||
Environment=BUNDLE_WITHOUT=development
|
||||
Environment=PATH=/root/.rbenv/shims:/root/.rbenv/bin:/usr/bin:/usr/local/bin:/sbin:/bin
|
||||
EnvironmentFile=/etc/sure/.env
|
||||
ExecStart=/opt/sure/bin/bundle exec sidekiq -e production
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q sure-worker
|
||||
msg_info "Stopping Service"
|
||||
$STD systemctl stop sure
|
||||
msg_ok "Stopped Service"
|
||||
else
|
||||
msg_info "Stopping services"
|
||||
$STD systemctl stop sure-worker sure
|
||||
msg_ok "Stopped services"
|
||||
fi
|
||||
msg_info "Stopping Service"
|
||||
$STD systemctl stop sure
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Sure" "we-promise/sure" "tarball" "latest" "/opt/sure"
|
||||
RUBY_VERSION="$(cat /opt/sure/.ruby-version)" RUBY_INSTALL_RAILS=false setup_ruby
|
||||
@@ -79,9 +50,9 @@ EOF
|
||||
unset SECRET_KEY_BASE_DUMMY
|
||||
msg_ok "Updated Sure"
|
||||
|
||||
msg_info "Starting Services"
|
||||
$STD systemctl start sure sure-worker
|
||||
msg_ok "Started Services"
|
||||
msg_info "Starting Service"
|
||||
$STD systemctl start sure
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"interface_port": 8083,
|
||||
"documentation": "https://github.com/janeczku/calibre-web/wiki",
|
||||
"website": "https://github.com/janeczku/calibre-web",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/calibre-web.webp",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/flat/calibre-web.webp",
|
||||
"config_path": "/opt/calibre-web/app.db",
|
||||
"description": "Web app for browsing, reading and downloading eBooks from a Calibre database. Provides an attractive interface with mobile support, user management, and eBook conversion capabilities.",
|
||||
"install_methods": [
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"name": "CR*NMASTER",
|
||||
"slug": "cronmaster",
|
||||
"categories": [
|
||||
1
|
||||
],
|
||||
"date_created": "2026-02-22",
|
||||
"type": "addon",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://github.com/fccview/cronmaster",
|
||||
"website": "https://github.com/fccview/cronmaster",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/cr-nmaster.webp",
|
||||
"config_path": "/opt/cronmaster/.env",
|
||||
"description": "Self-hosted cron job scheduler with web UI, live logs, auth and prebuilt binaries provided upstream.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "tools/addon/cronmaster.sh",
|
||||
"resources": {
|
||||
"cpu": null,
|
||||
"ram": null,
|
||||
"hdd": null,
|
||||
"os": null,
|
||||
"version": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Credentials are saved to: /root/cronmaster.creds",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Update with: update_cronmaster",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated": "2026-02-22T18:08:35Z",
|
||||
"generated": "2026-02-22T06:17:00Z",
|
||||
"versions": [
|
||||
{
|
||||
"slug": "2fauth",
|
||||
@@ -88,9 +88,9 @@
|
||||
{
|
||||
"slug": "backrest",
|
||||
"repo": "garethgeorge/backrest",
|
||||
"version": "v1.12.0",
|
||||
"version": "v1.11.2",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T06:49:49Z"
|
||||
"date": "2026-01-27T06:27:56Z"
|
||||
},
|
||||
{
|
||||
"slug": "baikal",
|
||||
@@ -253,13 +253,6 @@
|
||||
"pinned": false,
|
||||
"date": "2026-02-11T17:11:46Z"
|
||||
},
|
||||
{
|
||||
"slug": "cronmaster",
|
||||
"repo": "fccview/cronmaster",
|
||||
"version": "2.1.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-11T19:29:11Z"
|
||||
},
|
||||
{
|
||||
"slug": "cryptpad",
|
||||
"repo": "cryptpad/cryptpad",
|
||||
@@ -270,9 +263,9 @@
|
||||
{
|
||||
"slug": "databasus",
|
||||
"repo": "databasus/databasus",
|
||||
"version": "v3.16.1",
|
||||
"version": "v3.16.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T13:33:54Z"
|
||||
"date": "2026-02-21T13:16:08Z"
|
||||
},
|
||||
{
|
||||
"slug": "dawarich",
|
||||
@@ -326,9 +319,9 @@
|
||||
{
|
||||
"slug": "drawio",
|
||||
"repo": "jgraph/drawio",
|
||||
"version": "v29.5.2",
|
||||
"version": "v29.5.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T10:36:14Z"
|
||||
"date": "2026-02-20T17:22:31Z"
|
||||
},
|
||||
{
|
||||
"slug": "duplicati",
|
||||
@@ -431,9 +424,9 @@
|
||||
{
|
||||
"slug": "ghostfolio",
|
||||
"repo": "ghostfolio/ghostfolio",
|
||||
"version": "2.242.0",
|
||||
"version": "2.241.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T10:01:44Z"
|
||||
"date": "2026-02-21T07:39:22Z"
|
||||
},
|
||||
{
|
||||
"slug": "gitea",
|
||||
@@ -477,13 +470,6 @@
|
||||
"pinned": false,
|
||||
"date": "2026-02-13T15:22:31Z"
|
||||
},
|
||||
{
|
||||
"slug": "gramps-web",
|
||||
"repo": "gramps-project/gramps-web-api",
|
||||
"version": "v3.7.1.1",
|
||||
"pinned": false,
|
||||
"date": "2026-01-30T09:15:46Z"
|
||||
},
|
||||
{
|
||||
"slug": "grist",
|
||||
"repo": "gristlabs/grist-core",
|
||||
@@ -844,9 +830,9 @@
|
||||
{
|
||||
"slug": "mediamtx",
|
||||
"repo": "bluenviron/mediamtx",
|
||||
"version": "v1.16.2",
|
||||
"version": "v1.16.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T17:31:41Z"
|
||||
"date": "2026-02-07T18:58:24Z"
|
||||
},
|
||||
{
|
||||
"slug": "meilisearch",
|
||||
@@ -1208,9 +1194,9 @@
|
||||
{
|
||||
"slug": "pulse",
|
||||
"repo": "rcourtman/Pulse",
|
||||
"version": "v5.1.13",
|
||||
"version": "v5.1.12",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T12:40:41Z"
|
||||
"date": "2026-02-20T20:53:16Z"
|
||||
},
|
||||
{
|
||||
"slug": "pve-scripts-local",
|
||||
@@ -1229,9 +1215,9 @@
|
||||
{
|
||||
"slug": "qbittorrent-exporter",
|
||||
"repo": "martabal/qbittorrent-exporter",
|
||||
"version": "v1.13.3",
|
||||
"version": "v1.13.2",
|
||||
"pinned": false,
|
||||
"date": "2026-02-22T13:01:42Z"
|
||||
"date": "2025-12-13T22:59:03Z"
|
||||
},
|
||||
{
|
||||
"slug": "qdrant",
|
||||
|
||||
@@ -36,7 +36,7 @@ $STD apt install -y \
|
||||
libavformat-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
JAVA_VERSION="17" setup_java
|
||||
JAVA_VERSION="11" setup_java
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="guacamole_db" MARIADB_DB_USER="guacamole_user" setup_mariadb_db
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ $STD apt install -y \
|
||||
git \
|
||||
graphviz \
|
||||
libcairo2-dev \
|
||||
libgirepository1.0-dev \
|
||||
libgirepository-2.0-dev \
|
||||
libglib2.0-dev \
|
||||
libicu-dev \
|
||||
libopencv-dev \
|
||||
|
||||
@@ -30,7 +30,7 @@ setup_meilisearch
|
||||
fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep" "tarball"
|
||||
cd /opt/karakeep
|
||||
MODULE_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/karakeep/package.json)"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
|
||||
msg_info "Installing karakeep"
|
||||
export PUPPETEER_SKIP_DOWNLOAD="true"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: tteck (tteckster) | MickLesk (CanbiZ)
|
||||
# Copyright (c) 2021-2026 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.plex.tv/
|
||||
|
||||
@@ -16,16 +16,19 @@ update_os
|
||||
setup_hwaccel
|
||||
|
||||
msg_info "Setting Up Plex Media Server Repository"
|
||||
setup_deb822_repo \
|
||||
"plexmediaserver" \
|
||||
"https://downloads.plex.tv/plex-keys/PlexSign.v2.key" \
|
||||
"https://repo.plex.tv/deb/" \
|
||||
"public" \
|
||||
"main"
|
||||
curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key | tee /usr/share/keyrings/PlexSign.asc >/dev/null
|
||||
cat <<EOF >/etc/apt/sources.list.d/plexmediaserver.sources
|
||||
Types: deb
|
||||
URIs: https://downloads.plex.tv/repo/deb/
|
||||
Suites: public
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/PlexSign.asc
|
||||
EOF
|
||||
msg_ok "Set Up Plex Media Server Repository"
|
||||
|
||||
msg_info "Installing Plex Media Server"
|
||||
$STD apt install -y plexmediaserver
|
||||
$STD apt update
|
||||
$STD apt -o Dpkg::Options::="--force-confold" install -y plexmediaserver
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
sed -i -e 's/^ssl-cert:x:104:plex$/render:x:104:root,plex/' -e 's/^render:x:108:root$/ssl-cert:x:108:plex/' /etc/group
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@ POSTGRES_DB=${PG_DB_NAME}/" \
|
||||
-e "s|^APP_DOMAIN=|&${LOCAL_IP}|" /etc/sure/.env
|
||||
msg_ok "Configured Sure"
|
||||
|
||||
msg_info "Creating Services"
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/sure.service
|
||||
[Unit]
|
||||
Description=Sure Service
|
||||
@@ -79,31 +79,8 @@ StandardError=journal
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/sure-worker.service
|
||||
[Unit]
|
||||
Description=Sure Background Worker (Sidekiq)
|
||||
After=network.target redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/sure
|
||||
Environment=RAILS_ENV=production
|
||||
Environment=BUNDLE_DEPLOYMENT=1
|
||||
Environment=BUNDLE_WITHOUT=development
|
||||
Environment=PATH=/root/.rbenv/shims:/root/.rbenv/bin:/usr/bin:/usr/local/bin:/sbin:/bin
|
||||
EnvironmentFile=/etc/sure/.env
|
||||
ExecStart=/opt/sure/bin/bundle exec sidekiq -e production
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
$STD systemctl enable -q --now sure sure-worker
|
||||
msg_ok "Created Services"
|
||||
$STD systemctl enable -q --now sure
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/fccview/cronmaster
|
||||
|
||||
if ! command -v curl &>/dev/null; then
|
||||
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
|
||||
apt-get update >/dev/null 2>&1
|
||||
apt-get install -y curl >/dev/null 2>&1
|
||||
fi
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
|
||||
|
||||
# Enable error handling
|
||||
set -Eeuo pipefail
|
||||
trap 'error_handler' ERR
|
||||
load_functions
|
||||
init_tool_telemetry "" "addon"
|
||||
|
||||
# ==============================================================================
|
||||
# CONFIGURATION
|
||||
# ==============================================================================
|
||||
APP="CronMaster"
|
||||
APP_TYPE="addon"
|
||||
INSTALL_PATH="/opt/cronmaster"
|
||||
CONFIG_PATH="/opt/cronmaster/.env"
|
||||
SERVICE_PATH="/etc/systemd/system/cronmaster.service"
|
||||
DEFAULT_PORT=3000
|
||||
|
||||
# ==============================================================================
|
||||
# HEADER
|
||||
# ==============================================================================
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
______ __ ___ __
|
||||
/ ____/________ ____ / |/ /___ ______/ /____ _____
|
||||
/ / / ___/ __ \/ __ \/ /|_/ / __ `/ ___/ __/ _ \/ ___/
|
||||
/ /___/ / / /_/ / / / / / / / /_/ (__ ) /_/ __/ /
|
||||
\____/_/ \____/_/ /_/_/ /_/\__,_/____/\__/\___/_/
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# OS DETECTION
|
||||
# ==============================================================================
|
||||
if ! grep -qE 'ID=debian|ID=ubuntu' /etc/os-release 2>/dev/null; then
|
||||
echo -e "${CROSS} Unsupported OS detected. This script only supports Debian and Ubuntu."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# UNINSTALL
|
||||
# ==============================================================================
|
||||
function uninstall() {
|
||||
msg_info "Uninstalling ${APP}"
|
||||
systemctl disable --now cronmaster.service &>/dev/null || true
|
||||
rm -f "$SERVICE_PATH"
|
||||
rm -rf "$INSTALL_PATH"
|
||||
rm -f "/usr/local/bin/update_cronmaster"
|
||||
rm -f "$HOME/.cronmaster"
|
||||
rm -f "/root/cronmaster.creds"
|
||||
msg_ok "${APP} has been uninstalled"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# UPDATE
|
||||
# ==============================================================================
|
||||
function update() {
|
||||
if check_for_gh_release "cronmaster" "fccview/cronmaster"; then
|
||||
msg_info "Stopping service"
|
||||
systemctl stop cronmaster.service &>/dev/null || true
|
||||
msg_ok "Stopped service"
|
||||
|
||||
msg_info "Backing up configuration"
|
||||
cp "$CONFIG_PATH" /tmp/cronmaster.env.bak 2>/dev/null || true
|
||||
msg_ok "Backed up configuration"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cronmaster" "fccview/cronmaster" "prebuild" "latest" "$INSTALL_PATH" "cronmaster_*_prebuild.tar.gz"
|
||||
|
||||
msg_info "Restoring configuration"
|
||||
cp /tmp/cronmaster.env.bak "$CONFIG_PATH" 2>/dev/null || true
|
||||
rm -f /tmp/cronmaster.env.bak
|
||||
msg_ok "Restored configuration"
|
||||
|
||||
msg_info "Starting service"
|
||||
systemctl start cronmaster
|
||||
msg_ok "Started service"
|
||||
msg_ok "Updated successfully"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# INSTALL
|
||||
# ==============================================================================
|
||||
function install() {
|
||||
# Setup Node.js (only installs if not present or different version)
|
||||
if command -v node &>/dev/null; then
|
||||
msg_ok "Node.js already installed ($(node -v))"
|
||||
else
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "cronmaster" "fccview/cronmaster" "prebuild" "latest" "$INSTALL_PATH" "cronmaster_*_prebuild.tar.gz"
|
||||
|
||||
local AUTH_PASS
|
||||
AUTH_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||
|
||||
msg_info "Creating configuration"
|
||||
cat <<EOF >"$CONFIG_PATH"
|
||||
NODE_ENV=production
|
||||
AUTH_PASSWORD=${AUTH_PASS}
|
||||
PORT=${DEFAULT_PORT}
|
||||
HOSTNAME=0.0.0.0
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
EOF
|
||||
chmod 600 "$CONFIG_PATH"
|
||||
msg_ok "Created configuration"
|
||||
|
||||
msg_info "Creating service"
|
||||
cat <<EOF >"$SERVICE_PATH"
|
||||
[Unit]
|
||||
Description=CronMaster Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=${INSTALL_PATH}
|
||||
EnvironmentFile=${CONFIG_PATH}
|
||||
ExecStart=/usr/bin/node ${INSTALL_PATH}/server.js
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now cronmaster
|
||||
msg_ok "Created and started service"
|
||||
|
||||
# Create update script
|
||||
msg_info "Creating update script"
|
||||
ensure_usr_local_bin_persist
|
||||
cat <<EOF >/usr/local/bin/update_cronmaster
|
||||
#!/usr/bin/env bash
|
||||
# CronMaster Update Script
|
||||
type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/cronmaster.sh)"
|
||||
EOF
|
||||
chmod +x /usr/local/bin/update_cronmaster
|
||||
msg_ok "Created update script (/usr/local/bin/update_cronmaster)"
|
||||
|
||||
# Save credentials
|
||||
local CREDS_FILE="/root/cronmaster.creds"
|
||||
cat <<EOF >"$CREDS_FILE"
|
||||
CronMaster Credentials
|
||||
======================
|
||||
Password: ${AUTH_PASS}
|
||||
|
||||
Web UI: http://${LOCAL_IP}:${DEFAULT_PORT}
|
||||
EOF
|
||||
echo ""
|
||||
msg_ok "${APP} is reachable at: ${BL}http://${LOCAL_IP}:${DEFAULT_PORT}${CL}"
|
||||
msg_ok "Credentials saved to: ${BL}${CREDS_FILE}${CL}"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
# MAIN
|
||||
# ==============================================================================
|
||||
header_info
|
||||
ensure_usr_local_bin_persist
|
||||
get_lxc_ip
|
||||
|
||||
# Handle type=update (called from update script)
|
||||
if [[ "${type:-}" == "update" ]]; then
|
||||
if [[ -d "$INSTALL_PATH" ]]; then
|
||||
update
|
||||
else
|
||||
msg_error "${APP} is not installed. Nothing to update."
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if already installed
|
||||
if [[ -d "$INSTALL_PATH" && -n "$(ls -A "$INSTALL_PATH" 2>/dev/null)" ]]; then
|
||||
msg_warn "${APP} is already installed."
|
||||
echo ""
|
||||
|
||||
echo -n "${TAB}Uninstall ${APP}? (y/N): "
|
||||
read -r uninstall_prompt
|
||||
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
uninstall
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -n "${TAB}Update ${APP}? (y/N): "
|
||||
read -r update_prompt
|
||||
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
update
|
||||
exit 0
|
||||
fi
|
||||
|
||||
msg_warn "No action selected. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Fresh installation
|
||||
msg_warn "${APP} is not installed."
|
||||
echo ""
|
||||
echo -e "${TAB}${INFO} This will install:"
|
||||
echo -e "${TAB} - Node.js 22"
|
||||
echo -e "${TAB} - CronMaster (prebuild)"
|
||||
echo ""
|
||||
|
||||
echo -n "${TAB}Install ${APP}? (y/N): "
|
||||
read -r install_prompt
|
||||
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
install
|
||||
else
|
||||
msg_warn "Installation cancelled. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
@@ -1,6 +0,0 @@
|
||||
______ __ ___ __
|
||||
/ ____/________ ____ / |/ /___ ______/ /____ _____
|
||||
/ / / ___/ __ \/ __ \/ /|_/ / __ `/ ___/ __/ _ \/ ___/
|
||||
/ /___/ / / /_/ / / / / / / / /_/ (__ ) /_/ __/ /
|
||||
\____/_/ \____/_/ /_/_/ /_/\__,_/____/\__/\___/_/
|
||||
|
||||
@@ -12,7 +12,6 @@ function header_info() {
|
||||
/ / / / _ \/ __ `/ __ \ / / | / /
|
||||
/ /___/ / __/ /_/ / / / / / /___/ / /___
|
||||
\____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -75,10 +74,10 @@ function run_lxc_clean() {
|
||||
find /var/cache -type f -delete 2>/dev/null
|
||||
find /var/log -type f -delete 2>/dev/null
|
||||
find /tmp -mindepth 1 -delete 2>/dev/null
|
||||
apt -y --purge autoremove
|
||||
apt -y autoclean
|
||||
apt-get -y --purge autoremove
|
||||
apt-get -y autoclean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt update
|
||||
apt-get update
|
||||
fi
|
||||
'
|
||||
}
|
||||
|
||||
@@ -525,9 +525,9 @@ fi
|
||||
|
||||
msg_info "Finalizing image (hostname, SSH config)"
|
||||
# Set hostname and prepare for unique machine-id
|
||||
virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1 || true
|
||||
virt-customize -q -a "$WORK_FILE" --run-command "truncate -s 0 /etc/machine-id" >/dev/null 2>&1 || true
|
||||
virt-customize -q -a "$WORK_FILE" --run-command "rm -f /var/lib/dbus/machine-id" >/dev/null 2>&1 || true
|
||||
virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1
|
||||
virt-customize -q -a "$WORK_FILE" --run-command "truncate -s 0 /etc/machine-id" >/dev/null 2>&1
|
||||
virt-customize -q -a "$WORK_FILE" --run-command "rm -f /var/lib/dbus/machine-id" >/dev/null 2>&1
|
||||
|
||||
# Configure SSH for Cloud-Init
|
||||
if [ "$USE_CLOUD_INIT" = "yes" ]; then
|
||||
@@ -552,7 +552,7 @@ msg_ok "Finalized image"
|
||||
|
||||
# Create first-boot Docker install script (fallback if virt-customize failed)
|
||||
if [ "$DOCKER_PREINSTALLED" = "no" ]; then
|
||||
if virt-customize -q -a "$WORK_FILE" --run-command 'cat > /root/install-docker.sh << "DOCKERSCRIPT"
|
||||
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /root/install-docker.sh << "DOCKERSCRIPT"
|
||||
#!/bin/bash
|
||||
exec > /var/log/install-docker.log 2>&1
|
||||
echo "[$(date)] Starting Docker installation"
|
||||
@@ -581,9 +581,9 @@ systemctl restart docker
|
||||
touch /root/.docker-installed
|
||||
echo "[$(date)] Docker installation completed"
|
||||
DOCKERSCRIPT
|
||||
chmod +x /root/install-docker.sh' >/dev/null 2>&1; then
|
||||
chmod +x /root/install-docker.sh' >/dev/null 2>&1
|
||||
|
||||
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /etc/systemd/system/install-docker.service << "DOCKERSERVICE"
|
||||
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /etc/systemd/system/install-docker.service << "DOCKERSERVICE"
|
||||
[Unit]
|
||||
Description=Install Docker on First Boot
|
||||
After=network-online.target
|
||||
@@ -598,11 +598,7 @@ RemainAfterExit=yes
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
DOCKERSERVICE
|
||||
systemctl enable install-docker.service' >/dev/null 2>&1 || true
|
||||
else
|
||||
msg_warn "virt-customize failed for this image. Docker must be installed manually after first boot:"
|
||||
msg_warn " curl -fsSL https://get.docker.com | sh"
|
||||
fi
|
||||
systemctl enable install-docker.service' >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Resize disk to target size
|
||||
|
||||
Reference in New Issue
Block a user