Files
ProxmoxVE/install/deconz-install.sh
T

56 lines
1.5 KiB
Bash
Raw Normal View History

2023-03-22 20:48:20 -04:00
#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
2023-03-22 20:48:20 -04:00
# Author: tteck (tteckster)
# 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
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" \
"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"
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
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
cleanup_lxc