Compare commits

...

12 Commits

Author SHA1 Message Date
f28e91bba3 Update CHANGELOG.md 2025-12-13 16:01:44 +00:00
308a1cb91e Change category ID from 6 to 3 in coolify.json and dokploy.json (#9930) 2025-12-13 17:01:30 +01:00
1e97124c0c Update CHANGELOG.md (#9928)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-13 12:35:58 +00:00
3f8685067f Update CHANGELOG.md (#9927)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-13 12:35:40 +00:00
5adf98fada Update date in json (#9926)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2025-12-13 12:35:36 +00:00
4cd81a9769 AdGuardHome-Sync (#9783)
Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-12-13 13:35:19 +01:00
d83af67c62 Update versions.json (#9925)
Co-authored-by: GitHub Actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-13 13:06:39 +01:00
e9d14b3a15 Update CHANGELOG.md (#9924)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-13 10:30:26 +00:00
13cbe0fdbf Refactor (#9873) 2025-12-13 11:30:06 +01:00
52db0d94ed Update CHANGELOG.md (#9923)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-13 10:29:40 +00:00
e38436340b Tunarr: Switch to prebuild archive (#9920) 2025-12-13 11:29:19 +01:00
139e86b945 Update CHANGELOG.md (#9921)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-13 09:08:09 +00:00
10 changed files with 506 additions and 96 deletions

View File

@ -16,12 +16,26 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- Tunarr: Switch to prebuild archive [@tremor021](https://github.com/tremor021) ([#9920](https://github.com/community-scripts/ProxmoxVE/pull/9920))
- [HOTFIX] NetVisor: backup OIDC config before update [@vhsdream](https://github.com/vhsdream) ([#9895](https://github.com/community-scripts/ProxmoxVE/pull/9895))
- Update OPNsense download URL to version 14.3 [@jaredcarling42-design](https://github.com/jaredcarling42-design) ([#9899](https://github.com/community-scripts/ProxmoxVE/pull/9899))
- #### ✨ New Features
- Add optional TLS setup to Valkey installer [@pshankinclarke](https://github.com/pshankinclarke) ([#9789](https://github.com/community-scripts/ProxmoxVE/pull/9789))
- #### 🔧 Refactor
- Refactor: Spoolman [@tremor021](https://github.com/tremor021) ([#9873](https://github.com/community-scripts/ProxmoxVE/pull/9873))
### 🧰 Tools
- AdGuardHome-Sync ([#9783](https://github.com/community-scripts/ProxmoxVE/pull/9783))
### ❔ Uncategorized
- Change category ID from 6 to 3 in coolify.json and dokploy.json [@Bensonheimer992](https://github.com/Bensonheimer992) ([#9930](https://github.com/community-scripts/ProxmoxVE/pull/9930))
## 2025-12-12
### 🆕 New Scripts

View File

@ -27,32 +27,29 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://github.com/Donkie/Spoolman/releases/latest | grep "title>Release" | cut -d " " -f 4)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
if check_for_gh_release "spoolman" "Donkie/Spoolman"; then
msg_info "Stopping Service"
systemctl stop spoolman
msg_ok "Stopped Service"
msg_info "Updating ${APP} to ${RELEASE}"
cd /opt
rm -rf spoolman_bak
mv spoolman spoolman_bak
curl -fsSL "https://github.com/Donkie/Spoolman/releases/download/${RELEASE}/spoolman.zip" -o $(basename "https://github.com/Donkie/Spoolman/releases/download/${RELEASE}/spoolman.zip")
$STD unzip spoolman.zip -d spoolman
cd spoolman
msg_info "Creating Backup"
[ -d /opt/spoolman_bak ] && rm -rf /opt/spoolman_bak
mv /opt/spoolman /opt/spoolman_bak
msg_ok "Created Backup"
fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip"
msg_info "Updating Spoolman"
cd /opt/spoolman
$STD pip3 install -r requirements.txt
curl -fsSL "https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example" -o ".env"
rm -rf /opt/spoolman.zip
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
cp /opt/spoolman_bak/.env /opt/spoolman
msg_ok "Updated Spoolman"
msg_info "Starting Service"
systemctl start spoolman
msg_ok "Started Service"
msg_ok "Updated successfully!"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}

View File

@ -40,7 +40,9 @@ function update_script() {
msg_error "Backup failed: /usr/local/share/tunarr does not exist"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "prebuild" "latest" "/opt/tunarr" "*linux-x64.tar.gz"
cd /opt/tunarr
mv tunarr* tunarr
msg_info "Starting Service"
systemctl start tunarr

View File

@ -0,0 +1,59 @@
{
"name": "AdGuardHome-Sync",
"slug": "adguardhome-sync",
"categories": [
9
],
"date_created": "2025-12-13",
"type": "addon",
"updateable": true,
"privileged": false,
"interface_port": 8080,
"documentation": "https://github.com/bakito/adguardhome-sync",
"website": "https://github.com/bakito/adguardhome-sync",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/adguardhome-sync.webp",
"config_path": "/opt/adguardhome-sync/adguardhome-sync.yaml",
"description": "Synchronize AdGuardHome config to one or multiple replica instances. Syncs General Settings, Filters, Rewrites, Services, Clients, DNS Config, DHCP Config and Theme.",
"install_methods": [
{
"type": "default",
"script": "tools/addon/adguardhome-sync.sh",
"resources": {
"cpu": null,
"ram": null,
"hdd": null,
"os": null,
"version": null
}
},
{
"type": "alpine",
"script": "tools/addon/adguardhome-sync.sh",
"resources": {
"cpu": null,
"ram": null,
"hdd": null,
"os": null,
"version": null
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Edit /opt/adguardhome-sync/adguardhome-sync.yaml to configure your AdGuardHome instances",
"type": "info"
},
{
"text": "Origin = Primary instance, Replicas = Instances to sync to",
"type": "info"
},
{
"text": "Update with: update_adguardhome-sync",
"type": "info"
}
]
}

View File

@ -2,7 +2,7 @@
"name": "Coolify",
"slug": "coolify",
"categories": [
6
3
],
"date_created": "2025-12-09",
"type": "ct",

View File

@ -2,7 +2,7 @@
"name": "Dokploy",
"slug": "dokploy",
"categories": [
6
3
],
"date_created": "2025-12-09",
"type": "ct",

View File

@ -1,24 +1,74 @@
[
{
"name": "fuma-nama/fumadocs",
"version": "create-fumadocs-app@16.0.25",
"date": "2025-12-13T10:22:03Z"
},
{
"name": "chrisvel/tududi",
"version": "v0.88.0",
"date": "2025-12-13T09:36:24Z"
},
{
"name": "ollama/ollama",
"version": "v0.13.4-rc0",
"date": "2025-12-13T00:29:01Z"
},
{
"name": "netvisor-io/netvisor",
"version": "v0.11.8",
"date": "2025-12-13T08:38:03Z"
},
{
"name": "Dokploy/dokploy",
"version": "v0.26.2",
"date": "2025-12-13T07:48:09Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.24.445",
"date": "2025-12-13T05:56:19Z"
},
{
"name": "firefly-iii/firefly-iii",
"version": "v6.4.9",
"date": "2025-11-28T20:36:20Z"
},
{
"name": "release-argus/Argus",
"version": "0.28.0",
"date": "2025-12-13T04:44:37Z"
},
{
"name": "mealie-recipes/mealie",
"version": "v3.7.0",
"date": "2025-12-13T01:20:58Z"
},
{
"name": "jeedom/core",
"version": "4.5",
"date": "2025-12-13T00:27:05Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v4.1.0",
"date": "2025-11-23T12:13:34Z"
},
{
"name": "paperless-ngx/paperless-ngx",
"version": "v2.20.2",
"date": "2025-12-12T23:47:48Z"
},
{
"name": "netvisor-io/netvisor",
"version": "v0.11.8",
"date": "2025-12-12T22:41:59Z"
"name": "nickheyer/discopanel",
"version": "v1.0.13-dev",
"date": "2025-12-12T23:45:54Z"
},
{
"name": "fccview/jotty",
"version": "1.13.1",
"date": "2025-12-12T21:34:22Z"
},
{
"name": "nickheyer/discopanel",
"version": "v1.0.13-dev",
"date": "2025-12-12T21:12:14Z"
},
{
"name": "chrisbenincasa/tunarr",
"version": "v1.0.1",
@ -69,6 +119,11 @@
"version": "2025.11.5",
"date": "2025-12-09T17:54:33Z"
},
{
"name": "keycloak/keycloak",
"version": "26.4.7",
"date": "2025-12-01T08:14:11Z"
},
{
"name": "node-red/node-red",
"version": "4.1.2",
@ -139,11 +194,6 @@
"version": "v8.3.7",
"date": "2025-12-12T09:13:40Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.24.441",
"date": "2025-12-12T05:55:23Z"
},
{
"name": "coder/code-server",
"version": "v4.106.3",
@ -159,21 +209,6 @@
"version": "v3.0.3",
"date": "2025-12-12T02:39:27Z"
},
{
"name": "jeedom/core",
"version": "4.5",
"date": "2025-12-12T00:27:07Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v4.1.0",
"date": "2025-11-23T12:13:34Z"
},
{
"name": "ollama/ollama",
"version": "v0.13.3-rc1",
"date": "2025-12-10T20:59:27Z"
},
{
"name": "fosrl/pangolin",
"version": "1.13.0",
@ -204,21 +239,11 @@
"version": "prototype-v1.30.0-network-topology.2",
"date": "2025-12-11T16:47:51Z"
},
{
"name": "chrisvel/tududi",
"version": "v0.87",
"date": "2025-12-06T07:36:26Z"
},
{
"name": "endurain-project/endurain",
"version": "v0.16.2",
"date": "2025-12-11T15:16:01Z"
},
{
"name": "keycloak/keycloak",
"version": "26.4.7",
"date": "2025-12-01T08:14:11Z"
},
{
"name": "alam00000/bentopdf",
"version": "v1.11.1",
@ -284,11 +309,6 @@
"version": "v25.4",
"date": "2025-10-09T10:27:01Z"
},
{
"name": "fuma-nama/fumadocs",
"version": "fumadocs-openapi@10.1.2",
"date": "2025-12-10T13:59:19Z"
},
{
"name": "evcc-io/evcc",
"version": "0.211.1",
@ -299,11 +319,6 @@
"version": "353",
"date": "2025-12-10T10:55:50Z"
},
{
"name": "Dokploy/dokploy",
"version": "v0.26.1",
"date": "2025-12-10T06:53:36Z"
},
{
"name": "morpheus65535/bazarr",
"version": "v1.5.3",
@ -374,11 +389,6 @@
"version": "v0.11.3",
"date": "2025-12-09T14:41:10Z"
},
{
"name": "release-argus/Argus",
"version": "0.27.0",
"date": "2025-12-09T14:33:38Z"
},
{
"name": "wizarrrr/wizarr",
"version": "v2025.12.0",
@ -439,11 +449,6 @@
"version": "2.2.1",
"date": "2025-12-08T12:01:34Z"
},
{
"name": "firefly-iii/firefly-iii",
"version": "v6.4.9",
"date": "2025-11-28T20:36:20Z"
},
{
"name": "maxdorninger/MediaManager",
"version": "v1.10.0",
@ -639,11 +644,6 @@
"version": "v0.17.0",
"date": "2025-12-03T00:15:51Z"
},
{
"name": "mealie-recipes/mealie",
"version": "v3.6.1",
"date": "2025-12-02T23:08:41Z"
},
{
"name": "apache/tomcat",
"version": "10.1.50",

View File

@ -17,12 +17,10 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
make \
libpq-dev \
ca-certificates
libpq-dev
msg_ok "Installed Dependencies"
msg_info "Setup Python3"
msg_info "Setting up Python3"
$STD apt install -y \
python3-dev \
python3-setuptools \
@ -30,17 +28,13 @@ $STD apt install -y \
python3-pip
msg_ok "Setup Python3"
msg_info "Installing Spoolman"
RELEASE=$(curl -fsSL https://github.com/Donkie/Spoolman/releases/latest | grep "title>Release" | cut -d " " -f 4)
cd /opt
curl -fsSL "https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip" -o "spoolman.zip"
$STD unzip spoolman.zip -d spoolman
rm -rf spoolman.zip
cd spoolman
fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip"
msg_info "Setting up Spoolman"
cd /opt/spoolman
$STD pip3 install --upgrade --ignore-installed -r requirements.txt
curl -fsSL "https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example" -o ".env"
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Spoolman"
cp .env.example .env
msg_ok "Setup Spoolman"
msg_info "Creating Service"
cat <<'EOF' >/etc/systemd/system/spoolman.service

View File

@ -61,7 +61,9 @@ else
fi
msg_ok "Installed and Set Up Intel Hardware Acceleration"
fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "singlefile" "latest" "/opt/tunarr" "*linux-x64"
fetch_and_deploy_gh_release "tunarr" "chrisbenincasa/tunarr" "prebuild" "latest" "/opt/tunarr" "*linux-x64.tar.gz"
cd /opt/tunarr
mv tunarr* tunarr
fetch_and_deploy_gh_release "ersatztv-ffmpeg" "ErsatzTV/ErsatzTV-ffmpeg" "prebuild" "latest" "/opt/ErsatzTV-ffmpeg" "*-linux64-gpl-7.1.tar.xz"
msg_info "Set ErsatzTV-ffmpeg links"

View File

@ -0,0 +1,342 @@
#!/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
# Source: https://github.com/bakito/adguardhome-sync
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)
# Enable error handling
set -Eeuo pipefail
trap 'error_handler' ERR
# ==============================================================================
# CONFIGURATION
# ==============================================================================
APP="AdGuardHome-Sync"
APP_TYPE="addon"
INSTALL_PATH="/opt/adguardhome-sync"
CONFIG_PATH="/opt/adguardhome-sync/adguardhome-sync.yaml"
DEFAULT_PORT=8080
# Initialize all core functions (colors, formatting, icons, STD mode)
load_functions
# ==============================================================================
# HEADER
# ==============================================================================
function header_info {
clear
cat <<"EOF"
___ __ ____ __ _____
/ | ____/ /___ ___ ______ __________/ / / / /___ ____ ___ ___ / ___/__ ______ _____
/ /| |/ __ / __ `/ / / / __ `/ ___/ __ / /_/ / __ \/ __ `__ \/ _ \ \__ \/ / / / __ \/ ___/
/ ___ / /_/ / /_/ / /_/ / /_/ / / / /_/ / __ / /_/ / / / / / / __/ ___/ / /_/ / / / / /__
/_/ |_\__,_/\__, /\__,_/\__,_/_/ \__,_/_/ /_/\____/_/ /_/ /_/\___/ /____/\__, /_/ /_/\___/
/____/ /____/
EOF
}
# ==============================================================================
# HELPER FUNCTIONS
# ==============================================================================
get_ip() {
hostname -I 2>/dev/null | awk '{print $1}' || echo "127.0.0.1"
}
# ==============================================================================
# OS DETECTION
# ==============================================================================
if [[ -f "/etc/alpine-release" ]]; then
OS="Alpine"
SERVICE_PATH="/etc/init.d/adguardhome-sync"
elif [[ -f "/etc/debian_version" ]]; then
OS="Debian"
SERVICE_PATH="/etc/systemd/system/adguardhome-sync.service"
else
msg_error "Unsupported OS detected. Exiting."
exit 1
fi
# ==============================================================================
# UNINSTALL
# ==============================================================================
function uninstall() {
msg_info "Uninstalling ${APP}"
if [[ "$OS" == "Alpine" ]]; then
rc-service adguardhome-sync stop &>/dev/null || true
rc-update del adguardhome-sync &>/dev/null || true
rm -f "$SERVICE_PATH"
else
systemctl disable --now adguardhome-sync.service &>/dev/null || true
rm -f "$SERVICE_PATH"
fi
rm -rf "$INSTALL_PATH"
rm -f "/usr/local/bin/update_adguardhome-sync"
rm -f "$HOME/.adguardhome-sync"
msg_ok "${APP} has been uninstalled"
}
# ==============================================================================
# UPDATE
# ==============================================================================
function update() {
if check_for_gh_release "adguardhome-sync" "bakito/adguardhome-sync"; then
msg_info "Stopping service"
if [[ "$OS" == "Alpine" ]]; then
rc-service adguardhome-sync stop &>/dev/null || true
else
systemctl stop adguardhome-sync.service &>/dev/null || true
fi
msg_ok "Stopped service"
msg_info "Backing up configuration"
cp "$CONFIG_PATH" /tmp/adguardhome-sync.yaml.bak 2>/dev/null || true
msg_ok "Backed up configuration"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "adguardhome-sync" "bakito/adguardhome-sync" "prebuild" "latest" "$INSTALL_PATH" "adguardhome-sync_*_linux_amd64.tar.gz"
msg_info "Restoring configuration"
cp /tmp/adguardhome-sync.yaml.bak "$CONFIG_PATH" 2>/dev/null || true
rm -f /tmp/adguardhome-sync.yaml.bak
msg_ok "Restored configuration"
msg_info "Starting service"
if [[ "$OS" == "Alpine" ]]; then
rc-service adguardhome-sync start
else
systemctl start adguardhome-sync.service
fi
msg_ok "Started service"
msg_ok "Updated successfully"
exit
fi
}
# ==============================================================================
# INSTALL
# ==============================================================================
function install() {
local ip
ip=$(get_ip)
fetch_and_deploy_gh_release "adguardhome-sync" "bakito/adguardhome-sync" "prebuild" "latest" "$INSTALL_PATH" "adguardhome-sync_*_linux_amd64.tar.gz"
# Gather configuration from user
echo ""
echo -e "${TAB}Enter details for your AdGuard Home instances."
echo -e "${TAB}The Origin is your primary instance, Replica will sync from it."
echo ""
# Origin instance
echo -e "${YW}── Origin (Primary) Instance ──${CL}"
local origin_url origin_user origin_pass
read -rp " Origin URL (e.g., http://192.168.1.1): " origin_url
origin_url="${origin_url:-http://192.168.1.1}"
# Add http:// if no protocol specified
[[ ! "$origin_url" =~ ^https?:// ]] && origin_url="http://${origin_url}"
read -rp " Origin Username [admin]: " origin_user
origin_user="${origin_user:-admin}"
read -rsp " Origin Password: " origin_pass
echo ""
origin_pass="${origin_pass:-changeme}"
# Replica instance
echo ""
echo -e "${YW}── Replica Instance ──${CL}"
local replica_url replica_user replica_pass
read -rp " Replica URL (e.g., http://192.168.1.2): " replica_url
replica_url="${replica_url:-http://192.168.1.2}"
# Add http:// if no protocol specified
[[ ! "$replica_url" =~ ^https?:// ]] && replica_url="http://${replica_url}"
read -rp " Replica Username [admin]: " replica_user
replica_user="${replica_user:-admin}"
read -rsp " Replica Password: " replica_pass
echo ""
replica_pass="${replica_pass:-changeme}"
echo ""
msg_info "Creating configuration"
cat <<EOF >"$CONFIG_PATH"
# AdGuardHome-Sync Configuration
# Documentation: https://github.com/bakito/adguardhome-sync
# Cron expression for sync interval (e.g., every 2 hours: "0 */2 * * *")
cron: "0 */2 * * *"
# Run sync on startup
runOnStart: true
# Continue sync on errors
continueOnError: false
# Origin AdGuardHome instance (primary)
origin:
url: "${origin_url}"
username: "${origin_user}"
password: "${origin_pass}"
insecureSkipVerify: false
# Replica instances (one or more)
replicas:
- url: "${replica_url}"
username: "${replica_user}"
password: "${replica_pass}"
insecureSkipVerify: false
# Add more replicas as needed:
# - url: "http://192.168.1.3"
# username: "admin"
# password: "changeme"
# API settings (web UI)
api:
port: ${DEFAULT_PORT}
darkMode: true
metrics:
enabled: false
# Sync features (all enabled by default)
features:
dns:
accessLists: true
serverConfig: true
rewrites: true
dhcp:
serverConfig: true
staticLeases: true
generalSettings: true
queryLogConfig: true
statsConfig: true
clientSettings: true
services: true
filters: true
theme: true
EOF
chmod 600 "$CONFIG_PATH"
msg_ok "Created configuration"
msg_info "Creating service"
if [[ "$OS" == "Alpine" ]]; then
cat <<EOF >"$SERVICE_PATH"
#!/sbin/openrc-run
name="adguardhome-sync"
description="AdGuardHome Sync"
command="${INSTALL_PATH}/adguardhome-sync"
command_args="run --config ${CONFIG_PATH}"
command_background=true
pidfile="/run/\${RC_SVCNAME}.pid"
output_log="/var/log/adguardhome-sync.log"
error_log="/var/log/adguardhome-sync.log"
depend() {
need net
after firewall
}
EOF
chmod +x "$SERVICE_PATH"
rc-update add adguardhome-sync default
rc-service adguardhome-sync start
else
cat <<EOF >"$SERVICE_PATH"
[Unit]
Description=AdGuardHome Sync
After=network.target
[Service]
Type=simple
ExecStart=${INSTALL_PATH}/adguardhome-sync run --config ${CONFIG_PATH}
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now adguardhome-sync &>/dev/null
fi
msg_ok "Created and started service"
# Create update script
msg_info "Creating update script"
cat <<'UPDATEEOF' >/usr/local/bin/update_adguardhome-sync
#!/usr/bin/env bash
# AdGuardHome-Sync Update Script
type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/adguardhome-sync.sh)"
UPDATEEOF
chmod +x /usr/local/bin/update_adguardhome-sync
msg_ok "Created update script (/usr/local/bin/update_adguardhome-sync)"
echo ""
msg_ok "${APP} installed successfully"
msg_ok "Web UI: ${BL}http://${ip}:${DEFAULT_PORT}${CL}"
msg_ok "Config: ${BL}${CONFIG_PATH}${CL}"
echo ""
msg_warn "Edit the config file to add your AdGuardHome instances!"
msg_warn " Origin: Your primary AdGuardHome instance"
msg_warn " Replicas: One or more replica instances to sync to"
}
# ==============================================================================
# MAIN
# ==============================================================================
# Handle type=update (called from update script)
if [[ "${type:-}" == "update" ]]; then
header_info
if [[ -d "$INSTALL_PATH" && -f "$INSTALL_PATH/adguardhome-sync" ]]; then
update
else
msg_error "${APP} is not installed. Nothing to update."
exit 1
fi
exit 0
fi
header_info
IP=$(get_ip)
# Check if already installed
if [[ -d "$INSTALL_PATH" && -f "$INSTALL_PATH/adguardhome-sync" ]]; 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} - AdGuardHome-Sync (Go binary)"
echo -e "${TAB} - Systemd/OpenRC service"
echo -e "${TAB} - Web UI on port ${DEFAULT_PORT}"
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