Compare commits

...

4 Commits

Author SHA1 Message Date
Tobias
a46a4fde11 refactor 2025-10-15 21:56:35 +02:00
CanbiZ
d830cb9eb2 Add messages to cleanup commands in guardian-install.sh 2025-10-15 20:22:43 +02:00
push-app-to-main[bot]
4fd579f5f0 'Add new script' 2025-10-15 18:18:25 +00:00
community-scripts-pr-app[bot]
2d807eedab Update versions.json (#8358)
Co-authored-by: GitHub Actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-15 14:07:02 +02:00
5 changed files with 276 additions and 81 deletions

79
ct/guardian.sh Executable file
View File

@@ -0,0 +1,79 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: HydroshieldMKII
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/HydroshieldMKII/Guardian
APP="Guardian"
var_tags="${var_tags:-media;monitoring}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d "/opt/guardian" ]] ; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "guardian" "HydroshieldMKII/Guardian" ; then
msg_info "Stopping Services"
systemctl stop guardian-backend guardian-frontend
msg_ok "Stopped Services"
if [[ -f "/opt/guardian/backend/plex-guard.db" ]] ; then
msg_info "Backing up Database"
cp "/opt/guardian/backend/plex-guard.db" "/tmp/plex-guard.db.backup"
msg_ok "Backed up Database"
fi
cp /opt/guardian/.env /opt
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian"
mv /opt/.env /opt/guardian
if [[ -f "/tmp/plex-guard.db.backup" ]] ; then
msg_info "Restoring Database"
cp "/tmp/plex-guard.db.backup" "/opt/guardian/backend/plex-guard.db"
rm "/tmp/plex-guard.db.backup"
msg_ok "Restored Database"
fi
msg_info "Updating Guardian"
cd /opt/guardian/backend
$STD npm ci
$STD npm run build
cd /opt/guardian/frontend
$STD npm ci
$STD DEPLOYMENT_MODE=standalone npm run build
msg_ok "Updated Guardian"
msg_info "Starting Services"
systemctl start guardian-backend guardian-frontend
msg_ok "Started Services"
msg_ok "Updated Successfully"
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}:3000${CL}"

6
ct/headers/guardian Normal file
View File

@@ -0,0 +1,6 @@
______ ___
/ ____/_ ______ __________/ (_)___ _____
/ / __/ / / / __ `/ ___/ __ / / __ `/ __ \
/ /_/ / /_/ / /_/ / / / /_/ / / /_/ / / / /
\____/\__,_/\__,_/_/ \__,_/_/\__,_/_/ /_/

View File

@@ -0,0 +1,35 @@
{
"name": "Guardian",
"slug": "guardian",
"categories": [
13
],
"date_created": "2025-09-22",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://github.com/HydroshieldMKII/Guardian/blob/main/README.md",
"config_path": "/opt/guardian/.env",
"website": "https://github.com/HydroshieldMKII/Guardian",
"logo": null,
"description": "Guardian is a lightweight companion app for Plex that lets you monitor, approve or block devices in real time. It helps you enforce per-user or global policies, stop unwanted sessions automatically and grant temporary access - all through a simple web interface.",
"install_methods": [
{
"type": "default",
"script": "ct/guardian.sh",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 6,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

View File

@@ -1,4 +1,79 @@
[
{
"name": "Graylog2/graylog2-server",
"version": "7.0.0-beta.5",
"date": "2025-10-15T11:43:16Z"
},
{
"name": "blakeblackshear/frigate",
"version": "v0.14.1",
"date": "2024-08-29T22:32:51Z"
},
{
"name": "prometheus/prometheus",
"version": "v0.307.0",
"date": "2025-10-15T11:13:27Z"
},
{
"name": "crowdsecurity/crowdsec",
"version": "v1.7.0",
"date": "2025-09-01T10:10:34Z"
},
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.528.1",
"date": "2025-10-15T10:42:28Z"
},
{
"name": "mattermost/mattermost",
"version": "v10.12.1",
"date": "2025-10-15T08:15:09Z"
},
{
"name": "openobserve/openobserve",
"version": "v0.15.2",
"date": "2025-10-15T07:42:29Z"
},
{
"name": "msgbyte/tianji",
"version": "v1.27.12",
"date": "2025-10-15T07:10:05Z"
},
{
"name": "wavelog/wavelog",
"version": "2.1.2",
"date": "2025-10-15T06:51:32Z"
},
{
"name": "MediaBrowser/Emby.Releases",
"version": "4.9.1.80",
"date": "2025-09-30T20:25:16Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.24.134",
"date": "2025-10-15T05:52:51Z"
},
{
"name": "esphome/esphome",
"version": "2025.10.0",
"date": "2025-10-15T04:30:41Z"
},
{
"name": "jeedom/core",
"version": "4.4.20",
"date": "2025-10-15T00:27:08Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v4.0.0",
"date": "2025-10-08T16:12:11Z"
},
{
"name": "seerr-team/seerr",
"version": "preview-seerr",
"date": "2025-10-14T22:21:33Z"
},
{
"name": "Ombi-app/Ombi",
"version": "v4.47.1",
@@ -22,7 +97,7 @@
{
"name": "runtipi/runtipi",
"version": "nightly",
"date": "2025-10-14T06:36:29Z"
"date": "2025-10-14T19:51:52Z"
},
{
"name": "cloudflare/cloudflared",
@@ -44,6 +119,11 @@
"version": "v1.88.4",
"date": "2025-10-14T17:57:52Z"
},
{
"name": "keycloak/keycloak",
"version": "26.2.10",
"date": "2025-10-14T10:45:09Z"
},
{
"name": "netbox-community/netbox",
"version": "v4.4.3",
@@ -59,11 +139,6 @@
"version": "planka-1.1.0",
"date": "2025-10-14T16:51:22Z"
},
{
"name": "jenkinsci/jenkins",
"version": "jenkins-2.532",
"date": "2025-10-14T16:34:13Z"
},
{
"name": "immich-app/immich",
"version": "v2.1.0",
@@ -79,11 +154,6 @@
"version": "v2.1.9",
"date": "2025-10-14T16:18:49Z"
},
{
"name": "msgbyte/tianji",
"version": "v1.27.11",
"date": "2025-10-14T16:14:07Z"
},
{
"name": "element-hq/synapse",
"version": "v1.140.0",
@@ -94,11 +164,6 @@
"version": "n8n@1.115.3",
"date": "2025-10-14T14:40:17Z"
},
{
"name": "keycloak/keycloak",
"version": "26.2.10",
"date": "2025-10-14T10:45:09Z"
},
{
"name": "meilisearch/meilisearch",
"version": "prototype-v1.23.0.personalization-00",
@@ -109,26 +174,11 @@
"version": "0.50.24",
"date": "2025-10-14T09:04:27Z"
},
{
"name": "mattermost/mattermost",
"version": "server/public/v0.1.20",
"date": "2025-10-09T17:22:46Z"
},
{
"name": "morpheus65535/bazarr",
"version": "v1.5.3",
"date": "2025-09-20T12:12:33Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.24.131",
"date": "2025-10-14T05:54:13Z"
},
{
"name": "esphome/esphome",
"version": "2025.9.3",
"date": "2025-10-01T11:30:07Z"
},
{
"name": "cloudreve/cloudreve",
"version": "4.9.1",
@@ -139,16 +189,6 @@
"version": "v2.0.5.5160",
"date": "2025-08-23T21:23:11Z"
},
{
"name": "jeedom/core",
"version": "4.4.20",
"date": "2025-10-14T00:27:05Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v4.0.0",
"date": "2025-10-08T16:12:11Z"
},
{
"name": "rogerfar/rdt-client",
"version": "v2.0.119",
@@ -194,11 +234,6 @@
"version": "v0.29.0-rc.0",
"date": "2025-10-10T01:13:27Z"
},
{
"name": "Graylog2/graylog2-server",
"version": "7.0.0-beta.4",
"date": "2025-10-13T11:20:35Z"
},
{
"name": "SigNoz/signoz",
"version": "v0.97.1",
@@ -264,11 +299,6 @@
"version": "v1.4.0",
"date": "2025-10-11T18:16:32Z"
},
{
"name": "MediaBrowser/Emby.Releases",
"version": "4.9.1.80",
"date": "2025-09-30T20:25:16Z"
},
{
"name": "TandoorRecipes/recipes",
"version": "2.3.2",
@@ -324,11 +354,6 @@
"version": "10.1.48",
"date": "2025-10-10T14:46:53Z"
},
{
"name": "crowdsecurity/crowdsec",
"version": "v1.7.0",
"date": "2025-09-01T10:10:34Z"
},
{
"name": "semaphoreui/semaphore",
"version": "v2.16.34",
@@ -459,11 +484,6 @@
"version": "flowise@3.0.8",
"date": "2025-10-08T12:19:18Z"
},
{
"name": "prometheus/prometheus",
"version": "v0.307.0-rc.0",
"date": "2025-10-08T11:25:44Z"
},
{
"name": "gotson/komga",
"version": "1.23.5",
@@ -544,11 +564,6 @@
"version": "v5.26.0",
"date": "2025-10-06T17:57:27Z"
},
{
"name": "seerr-team/seerr",
"version": "preview-seerr",
"date": "2025-10-06T16:50:29Z"
},
{
"name": "fuma-nama/fumadocs",
"version": "fumadocs-ui@15.8.4",
@@ -904,11 +919,6 @@
"version": "0.20.3",
"date": "2025-09-16T07:29:49Z"
},
{
"name": "wavelog/wavelog",
"version": "2.1.1",
"date": "2025-09-16T06:21:32Z"
},
{
"name": "Paymenter/Paymenter",
"version": "v1.3.4",
@@ -989,16 +999,6 @@
"version": "2.0.0-beta.2-temp",
"date": "2025-03-28T08:45:58Z"
},
{
"name": "blakeblackshear/frigate",
"version": "v0.14.1",
"date": "2024-08-29T22:32:51Z"
},
{
"name": "openobserve/openobserve",
"version": "v0.15.1",
"date": "2025-09-04T10:37:23Z"
},
{
"name": "healthchecks/healthchecks",
"version": "v3.11.2",

View File

@@ -0,0 +1,75 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: HydroshieldMKII
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/HydroshieldMKII/Guardian
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y sqlite3
msg_ok "Installed Dependencies"
NODE_VERSION="24" setup_nodejs
fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian"
msg_info "Configuring ${APPLICATION}"
cd /opt/guardian/backend
$STD npm ci
$STD npm run build
cd /opt/guardian/frontend
$STD npm ci
export DEPLOYMENT_MODE=standalone
$STD npm run build
msg_ok "Configured ${APPLICATION}"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/guardian-backend.service
[Unit]
Description=Guardian Backend
After=network.target
[Service]
WorkingDirectory=/opt/guardian/backend
ExecStart=/usr/bin/node dist/main.js
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/guardian-frontend.service
[Unit]
Description=Guardian Frontend
After=guardian-backend.service network.target
Wants=guardian-backend.service
[Service]
WorkingDirectory=/opt/guardian/frontend
Environment=DEPLOYMENT_MODE=standalone
ExecStart=/usr/bin/npm run start
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now guardian-backend
systemctl enable -q --now guardian-frontend
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned"