#!/usr/bin/env bash # Copyright (c) 2021-2026 community-scripts ORG # Author: aendel # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://github.com/nightscout/cgm-remote-monitor 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 git build-essential libssl-dev msg_ok "Installed Dependencies" MONGO_VERSION="8.0" setup_mongodb NODE_VERSION="22" setup_nodejs msg_info "Installing Nightscout (Patience)" fetch_and_deploy_gh_release "nightscout" "nightscout/cgm-remote-monitor" "source" $STD npm install --prefix /opt/nightscout msg_ok "Installed Nightscout" msg_info "Creating Service" useradd -s /bin/bash -m nightscout chown -R nightscout:nightscout /opt/nightscout cat > /opt/nightscout/my.env < /etc/systemd/system/nightscout.service <