2023-03-22 20:48:20 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2025-01-01 13:37:29 +01:00
|
|
|
# Copyright (c) 2021-2025 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.openhab.org/
|
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
|
|
|
|
|
|
2025-08-03 22:05:05 +02:00
|
|
|
JAVA_VERSION="21" setup_java
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
|
|
|
msg_info "Installing openHAB"
|
2025-11-11 17:22:34 +01:00
|
|
|
setup_deb822_repo \
|
|
|
|
|
"openhab" \
|
|
|
|
|
"https://openhab.jfrog.io/artifactory/api/gpg/key/public" \
|
|
|
|
|
"https://openhab.jfrog.io/artifactory/openhab-linuxpkg" \
|
|
|
|
|
"stable" \
|
|
|
|
|
"main"
|
|
|
|
|
$STD apt install -y openhab
|
|
|
|
|
msg_ok "Installed openHAB"
|
|
|
|
|
|
|
|
|
|
msg_info "Initializing openHAB directories"
|
|
|
|
|
mkdir -p /var/lib/openhab/{tmp,etc,cache}
|
|
|
|
|
mkdir -p /etc/openhab
|
|
|
|
|
mkdir -p /var/log/openhab
|
|
|
|
|
chown -R openhab:openhab /var/lib/openhab /etc/openhab /var/log/openhab
|
|
|
|
|
msg_ok "Initialized openHAB directories"
|
|
|
|
|
|
|
|
|
|
msg_info "Starting Service"
|
2023-03-22 20:48:20 -04:00
|
|
|
systemctl daemon-reload
|
2025-04-01 20:22:40 +02:00
|
|
|
systemctl enable -q --now openhab
|
2025-11-11 17:22:34 +01:00
|
|
|
msg_ok "Started Service"
|
2023-03-22 20:48:20 -04:00
|
|
|
|
|
|
|
|
motd_ssh
|
2023-05-15 07:39:30 -04:00
|
|
|
customize
|
2025-11-11 17:22:34 +01:00
|
|
|
cleanup_lxc
|