2023-03-22 20:48:20 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 tteck
|
2023-03-22 20:48:20 -04:00
|
|
|
# Author: tteck (tteckster)
|
2025-03-04 17:54:20 +01:00
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
|
# Source: https://www.phoscon.de/en/conbee2/software#deconz
|
2023-03-22 20:48:20 -04:00
|
|
|
|
2025-03-24 14:20:56 +01:00
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
2023-03-22 20:48:20 -04:00
|
|
|
color
|
|
|
|
|
verb_ip6
|
|
|
|
|
catch_errors
|
|
|
|
|
setting_up_container
|
|
|
|
|
network_check
|
|
|
|
|
update_os
|
|
|
|
|
|
|
|
|
|
msg_info "Setting Phoscon Repository"
|
2026-01-08 14:00:48 +01:00
|
|
|
setup_deb822_repo \
|
|
|
|
|
"deconz" \
|
2026-06-08 21:20:24 +02:00
|
|
|
"https://phoscon.de/apt/deconz.pub.key" \
|
|
|
|
|
"https://phoscon.de/apt/deconz" \
|
2026-01-08 14:00:48 +01:00
|
|
|
"generic"
|
2023-03-22 20:48:20 -04:00
|
|
|
msg_ok "Setup Phoscon Repository"
|
|
|
|
|
|
|
|
|
|
msg_info "Installing deConz"
|
2026-06-19 17:53:08 +10:00
|
|
|
pool="$(arch_resolve "https://security.ubuntu.com/ubuntu/pool/main/o/openssl/" "http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/")"
|
|
|
|
|
libssl=$(curl -fsSL --proto '=http,https' "$pool" | grep -o "libssl1\.1_1\.1\.1f-1ubuntu2\.2[^\"]*$(arch_resolve)\.deb" | head -n1)
|
|
|
|
|
curl -fsSL --proto '=http,https' "$pool$libssl" -o "$libssl"
|
2025-04-02 07:19:50 +02:00
|
|
|
$STD dpkg -i "$libssl"
|
2026-01-08 14:00:48 +01:00
|
|
|
$STD apt install -y deconz
|
2025-11-22 17:27:13 +01:00
|
|
|
rm -rf "$libssl"
|
2023-03-22 20:48:20 -04:00
|
|
|
msg_ok "Installed deConz"
|
|
|
|
|
|
|
|
|
|
msg_info "Creating Service"
|
2023-07-08 10:56:20 -04:00
|
|
|
cat <<EOF >/lib/systemd/system/deconz.service
|
|
|
|
|
[Unit]
|
2023-03-22 20:48:20 -04:00
|
|
|
Description=deCONZ: ZigBee gateway -- REST API
|
|
|
|
|
Wants=deconz-init.service deconz-update.service
|
|
|
|
|
StartLimitIntervalSec=0
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
User=root
|
|
|
|
|
ExecStart=/usr/bin/deCONZ -platform minimal --http-port=80
|
|
|
|
|
Restart=on-failure
|
|
|
|
|
RestartSec=30
|
|
|
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME
|
|
|
|
|
|
|
|
|
|
[Install]
|
2023-07-08 10:56:20 -04:00
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOF
|
|
|
|
|
systemctl enable -q --now deconz
|
2023-03-22 20:48:20 -04:00
|
|
|
msg_ok "Created Service"
|
|
|
|
|
|
|
|
|
|
motd_ssh
|
2023-05-15 07:39:30 -04:00
|
|
|
customize
|
2025-11-22 17:27:13 +01:00
|
|
|
cleanup_lxc
|