From 37884d8b47ca58a22d1a6a2f6c570e00b5ad6001 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 16:33:10 +0200 Subject: [PATCH] Add owntracks-recorder (ct) (#16967) --- ct/headers/owntracks-recorder | 6 +++ ct/owntracks-recorder.sh | 55 +++++++++++++++++++++++++++ install/owntracks-recorder-install.sh | 47 +++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 ct/headers/owntracks-recorder create mode 100644 ct/owntracks-recorder.sh create mode 100644 install/owntracks-recorder-install.sh diff --git a/ct/headers/owntracks-recorder b/ct/headers/owntracks-recorder new file mode 100644 index 000000000..00fdfb1f2 --- /dev/null +++ b/ct/headers/owntracks-recorder @@ -0,0 +1,6 @@ + ____ ______ __ ____ __ + / __ \_ ______/_ __/________ ______/ /_______ / __ \___ _________ _________/ /__ _____ + / / / / | /| / / __ \/ / / ___/ __ `/ ___/ //_/ ___/_____/ /_/ / _ \/ ___/ __ \/ ___/ __ / _ \/ ___/ +/ /_/ /| |/ |/ / / / / / / / / /_/ / /__/ ,< (__ )_____/ _, _/ __/ /__/ /_/ / / / /_/ / __/ / +\____/ |__/|__/_/ /_/_/ /_/ \__,_/\___/_/|_/____/ /_/ |_|\___/\___/\____/_/ \__,_/\___/_/ + diff --git a/ct/owntracks-recorder.sh b/ct/owntracks-recorder.sh new file mode 100644 index 000000000..a5f669aca --- /dev/null +++ b/ct/owntracks-recorder.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/owntracks/recorder + +APP="OwnTracks-Recorder" +var_tags="${var_tags:-smarthome;tracking}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /etc/default/ot-recorder ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Updating ${APP}" + $STD apt update + $STD apt install -y ot-recorder + msg_ok "Updated ${APP}" + + msg_info "Restarting Service" + systemctl restart ot-recorder + msg_ok "Restarted Service" + msg_ok "Updated successfully!" + 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 "${GATEWAY}${BGN}http://${IP}:8083${CL}" +echo -e "${INFO}${YW}Point your OwnTracks apps at MQTT on ${IP}:1883${CL}" diff --git a/install/owntracks-recorder-install.sh b/install/owntracks-recorder-install.sh new file mode 100644 index 000000000..0fe70c0e5 --- /dev/null +++ b/install/owntracks-recorder-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/owntracks/recorder + +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 mosquitto +systemctl enable -q --now mosquitto +msg_ok "Installed Dependencies" + +setup_deb822_repo \ + "owntracks" \ + "https://raw.githubusercontent.com/owntracks/recorder/master/etc/repo-v2.owntracks.org.gpg.key" \ + "http://repo.owntracks.org/debian" \ + "$(get_os_info codename)" \ + "main" + +msg_info "Installing OwnTracks Recorder" +$STD apt install -y ot-recorder +msg_ok "Installed OwnTracks Recorder" + +msg_info "Configuring OwnTracks Recorder" +cat </etc/default/ot-recorder +OTR_HOST=127.0.0.1 +OTR_PORT=1883 +OTR_STORAGEDIR=/opt/owntracks_data +OTR_HTTPHOST=0.0.0.0 +OTR_HTTPPORT=8083 +EOF +mkdir -p /opt/owntracks_data +chown -R owntracks:owntracks /opt/owntracks_data 2>/dev/null || true +systemctl enable -q --now ot-recorder +msg_ok "Configured OwnTracks Recorder" + +motd_ssh +customize +cleanup_lxc