From 4aabbefcc8d1ea69ab7091904017f3d7470799cf Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Mon, 24 Feb 2025 08:23:54 +0100 Subject: [PATCH 001/167] fix: homarr db migration (#2575) * Update homarr.sh * Update homarr-install.sh --- ct/homarr.sh | 22 ++++++++++++++++++++++ install/homarr-install.sh | 3 +++ 2 files changed, 25 insertions(+) diff --git a/ct/homarr.sh b/ct/homarr.sh index 4dbb9654e..f459717c2 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -43,6 +43,9 @@ if [[ ! -f /opt/run_homarr.sh ]]; then sed -i '/^DB_DIALECT=/d' /opt/homarr/.env && echo "DB_DIALECT='sqlite'" >> /opt/homarr/.env cat <<'EOF' >/opt/run_homarr.sh #!/bin/bash +set -a +source /opt/homarr/.env +set +a export DB_DIALECT='sqlite' export AUTH_SECRET=$(openssl rand -base64 32) node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT @@ -85,6 +88,25 @@ fi msg_ok "Backup Data" msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)" + rm /opt/run_homarr.sh + cat <<'EOF' >/opt/run_homarr.sh +#!/bin/bash +set -a +source /opt/homarr/.env +set +a +export DB_DIALECT='sqlite' +export AUTH_SECRET=$(openssl rand -base64 32) +node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT +export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+') +envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf +nginx -g 'daemon off;' & +redis-server /opt/homarr/packages/redis/redis.conf & +node apps/tasks/tasks.cjs & +node apps/websocket/wssServer.cjs & +node apps/nextjs/server.js & PID=$! +wait $PID +EOF + chmod +x /opt/run_homarr.sh wget -q "https://github.com/homarr-labs/homarr/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip rm -rf v${RELEASE}.zip diff --git a/install/homarr-install.sh b/install/homarr-install.sh index bb2aaae73..d7f49bfac 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -86,6 +86,9 @@ msg_ok "Finished copying" msg_info "Creating Services" cat <<'EOF' >/opt/run_homarr.sh #!/bin/bash +set -a +source /opt/homarr/.env +set +a export DB_DIALECT='sqlite' export AUTH_SECRET=$(openssl rand -base64 32) node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT From 0084169c020f0768429bac2a190888a841a23c9c Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 08:42:43 +0100 Subject: [PATCH 002/167] Update CHANGELOG.md (#2579) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c8de4823..a563565d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,14 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-02-24 + +### Changes + +### 🚀 Updated Scripts + +- fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) + ## 2025-02-23 ### Changes From 2dbd03b74c3a43aef2460f1936651e7ffa8ca032 Mon Sep 17 00:00:00 2001 From: Dave <80132827+Dave-code-creater@users.noreply.github.com> Date: Mon, 24 Feb 2025 03:10:43 -0500 Subject: [PATCH 003/167] New Script: Jupyter Notebook (#2561) * Add jupyter notebook script, install script and json * Add jupyter notebook script, install script and json * Update jupyternotebook.sh * Update jupyternotebook-install.sh * Update jupyternotebook.sh * Update jupyternotebook-install.sh * Update jupyternotebook.json --------- Co-authored-by: Dat Ta Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> --- ct/jupyternotebook.sh | 42 ++++++++++++++++++++++++ install/jupyternotebook-install.sh | 52 ++++++++++++++++++++++++++++++ json/jupyternotebook.json | 39 ++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 ct/jupyternotebook.sh create mode 100644 install/jupyternotebook-install.sh create mode 100644 json/jupyternotebook.json diff --git a/ct/jupyternotebook.sh b/ct/jupyternotebook.sh new file mode 100644 index 000000000..bbeb4ae0a --- /dev/null +++ b/ct/jupyternotebook.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Dave-code-creater (Tan Dat, Ta) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://jupyter.org/ + +APP="Jupyter Notebook" +var_tags="ai;dev-tools" +var_cpu="2" +var_ram="2048" +var_disk="4" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get install -y upgrade &>/dev/null + pip3 install jupyter --upgrade &>/dev/null + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}" diff --git a/install/jupyternotebook-install.sh b/install/jupyternotebook-install.sh new file mode 100644 index 000000000..3be8e1ee5 --- /dev/null +++ b/install/jupyternotebook-install.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: [Dave-code-creater (Tan Dat, Ta)] +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: [https://jupyter.org/] + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + python3 \ + python3-pip +msg_ok "Installed Dependencies" + +msg_info "Setting up Jupyter Notebook" +$STD pip3 install jupyter +msg_ok "Setup Jupyter Notebook" + +msg_info "Creating Service" +cat </etc/systemd/system/jupyternotebook.service +[Unit] +Description=Jupyter Notebook Server +After=network.target + +[Service] +Type=simple +ExecStart=jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now jupyternotebook + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/jupyternotebook.json b/json/jupyternotebook.json new file mode 100644 index 000000000..d6a5be435 --- /dev/null +++ b/json/jupyternotebook.json @@ -0,0 +1,39 @@ +{ + "name": "jupyter-notebook", + "slug": "jupyter-notebook", + "categories": [ + 20 + ], + "date_created": "2025-02-24", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8888, + "documentation": "https://jupyter-notebook.readthedocs.io/en/stable/", + "website": "https://jupyter.org/", + "logo": "https://jupyter.org/assets/nav_logo.svg", + "description": "The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.", + "install_methods": [ + { + "type": "default", + "script": "ct/jupyternotebook.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 4, + "os": "ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "To get the token to access the Jupyter Notebook, run the following command: jupyter notebook list.", + "type": "info" + } + ] +} From 4e131347740e71b23355ad796958587f15f4d43a Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:18:51 +0100 Subject: [PATCH 004/167] Update .app files (#2582) Co-authored-by: GitHub Actions --- ct/headers/jupyternotebook | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/jupyternotebook diff --git a/ct/headers/jupyternotebook b/ct/headers/jupyternotebook new file mode 100644 index 000000000..84965a56a --- /dev/null +++ b/ct/headers/jupyternotebook @@ -0,0 +1,6 @@ + __ __ _ __ __ __ __ + / /_ ______ __ __/ /____ _____ / | / /___ / /____ / /_ ____ ____ / /__ + __ / / / / / __ \/ / / / __/ _ \/ ___/ / |/ / __ \/ __/ _ \/ __ \/ __ \/ __ \/ //_/ +/ /_/ / /_/ / /_/ / /_/ / /_/ __/ / / /| / /_/ / /_/ __/ /_/ / /_/ / /_/ / ,< +\____/\__,_/ .___/\__, /\__/\___/_/ /_/ |_/\____/\__/\___/_.___/\____/\____/_/|_| + /_/ /____/ From 1f500d5aebb1f76cb669519c09cf0cba14243b16 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:24:08 +0100 Subject: [PATCH 005/167] Update CHANGELOG.md (#2581) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a563565d0..9c3ecfc25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,10 @@ Do not break established syntax in this file, as it is automatically updated by ### Changes +### 🆕 New Scripts + +- New Script: Jupyter Notebook [@Dave-code-creater](https://github.com/Dave-code-creater) ([#2561](https://github.com/community-scripts/ProxmoxVE/pull/2561)) + ### 🚀 Updated Scripts - fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) From 27c764afd3bacbe0d3f18b2b779b8d76c804f2b4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:46:49 +0100 Subject: [PATCH 006/167] Fix Jupyter Json (#2584) --- json/jupyternotebook.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/jupyternotebook.json b/json/jupyternotebook.json index d6a5be435..0ebf71f46 100644 --- a/json/jupyternotebook.json +++ b/json/jupyternotebook.json @@ -1,5 +1,5 @@ { - "name": "jupyter-notebook", + "name": "Jupyter Notebook", "slug": "jupyter-notebook", "categories": [ 20 @@ -11,7 +11,7 @@ "interface_port": 8888, "documentation": "https://jupyter-notebook.readthedocs.io/en/stable/", "website": "https://jupyter.org/", - "logo": "https://jupyter.org/assets/nav_logo.svg", + "logo": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Jupyter_logo.svg/800px-Jupyter_logo.svg.png", "description": "The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.", "install_methods": [ { From 35f635bdb447136d681b2d8c2d9541896f6718e7 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 10:06:43 +0100 Subject: [PATCH 007/167] Update CHANGELOG.md (#2585) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c3ecfc25..04f16010a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ Do not break established syntax in this file, as it is automatically updated by - fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) +### 🌐 Website + +- Fix: Jupyter Json (missing logo & improve name on website) [@MickLesk](https://github.com/MickLesk) ([#2584](https://github.com/community-scripts/ProxmoxVE/pull/2584)) + ## 2025-02-23 ### Changes From 10d4ce4eef9e10979ad1dae9b86d56f543324ccf Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:18:38 +0100 Subject: [PATCH 008/167] Verbose_Update (#2583) --- misc/alpine-install.func | 50 +++++---- misc/build.func | 236 +++++++++++++++++++++++++-------------- misc/install.func | 66 ++++++----- 3 files changed, 223 insertions(+), 129 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 313b091f0..019c291e5 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -18,7 +18,7 @@ color() { BFR="\\r\\033[K" BOLD=$(echo "\033[1m") TAB=" " - + # System RETRY_NUM=10 RETRY_EVERY=3 @@ -36,12 +36,24 @@ color() { DEFAULT="${TAB}⚙️${TAB}${CL}" } -# This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" -verb_ip6() { +# Function to set STD mode based on verbosity +set_std_mode() { if [ "$VERBOSE" = "yes" ]; then STD="" - else STD="silent"; fi - silent() { "$@" >/dev/null 2>&1; } + else + STD="silent" + fi +} + +# Silent execution function +silent() { + "$@" >/dev/null 2>&1 +} + +# This function enables IPv6 if it's not disabled and sets verbose mode +verb_ip6() { + set_std_mode # Set STD mode based on VERBOSE + if [ "$DISABLEIPV6" == "yes" ]; then $STD sysctl -w net.ipv6.conf.all.disable_ipv6=1 echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf @@ -107,15 +119,15 @@ setting_up_container() { network_check() { set +e trap - ERR - if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then - msg_ok "Internet Connected"; + if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then + msg_ok "Internet Connected" else msg_error "Internet NOT Connected" read -r -p "Would you like to continue anyway? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e "${INFO}${RD}Expect Issues Without Internet${CL}" else - echo -e "${NETWORK}Check Network Settings" + echo -e "${NETWORK}Check Network Settings" exit 1 fi fi @@ -148,13 +160,13 @@ motd_ssh() { fi PROFILE_FILE="/etc/profile.d/00_lxc-details.sh" - echo "echo -e \"\"" > "$PROFILE_FILE" - echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >> "$PROFILE_FILE" - echo "echo \"\"" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(ip -4 addr show eth0 | awk '/inet / {print \$2}' | cut -d/ -f1 | head -n 1)${CL}\"" >> "$PROFILE_FILE" + echo "echo -e \"\"" >"$PROFILE_FILE" + echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >>"$PROFILE_FILE" + echo "echo \"\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(ip -4 addr show eth0 | awk '/inet / {print \$2}' | cut -d/ -f1 | head -n 1)${CL}\"" >>"$PROFILE_FILE" # Configure SSH if enabled if [[ "${SSH_ROOT}" == "yes" ]]; then @@ -170,8 +182,8 @@ motd_ssh() { # This function customizes the container and enables passwordless login for the root user customize() { if [[ "$PASSWORD" == "" ]]; then - msg_info "Customizing Container" - bash -c "passwd -d root" >/dev/null 2>&1 - msg_ok "Customized Container" + msg_info "Customizing Container" + bash -c "passwd -d root" >/dev/null 2>&1 + msg_ok "Customized Container" fi -} \ No newline at end of file +} diff --git a/misc/build.func b/misc/build.func index a8659dfd6..9ef8c5419 100644 --- a/misc/build.func +++ b/misc/build.func @@ -5,12 +5,12 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE variables() { - NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. - var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. - INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. - PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase - DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. - METHOD="default" # sets the METHOD variable to "default", used for the API call. + NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. + var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. + INTEGER='^[0-9]+([.][0-9]+)?$' # it defines the INTEGER regular expression pattern. + PVEHOST_NAME=$(hostname) # gets the Proxmox Hostname and sets it to Uppercase + DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call. + METHOD="default" # sets the METHOD variable to "default", used for the API call. RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable. } @@ -69,55 +69,86 @@ catch_errors() { # This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message. error_handler() { - source /dev/stdin <<< $(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + source /dev/stdin <<<$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" - post_update_to_api "failed" "${command}" + post_update_to_api "failed" "${command}" echo -e "\n$error_message\n" } -# This function displays a spinner. -spinner() { +# This function displays an informational message with logging support. +start_spinner() { + local msg="$1" local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') local spin_i=0 local interval=0.1 - printf "\e[?25l" + local term_width=$(tput cols) - local color="${YWB}" + { + while [ "${SPINNER_ACTIVE:-1}" -eq 1 ]; do + printf "\r\e[2K${frames[spin_i]} ${YW}%b${CL}" "$msg" >&2 + spin_i=$(((spin_i + 1) % ${#frames[@]})) + sleep "$interval" + done + } & - while true; do - printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(( (spin_i + 1) % ${#frames[@]} )) - sleep "$interval" - done -} - -# This function displays an informational message with a yellow color. -msg_info() { - local msg="$1" - echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}" - spinner & SPINNER_PID=$! } -# This function displays a success message with a green color. -msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi - printf "\e[?25h" +msg_info() { local msg="$1" - echo -e "${BFR}${CM}${GN}${msg}${CL}" + if [ "${SPINNER_ACTIVE:-0}" -eq 1 ]; then + return + fi + + SPINNER_ACTIVE=1 + start_spinner "$msg" } -# This function displays a error message with a red color. -msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi - printf "\e[?25h" +msg_ok() { + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi + local msg="$1" - echo -e "${BFR}${CROSS}${RD}${msg}${CL}" + printf "\r\e[2K${CM}${GN}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 + + log_message "OK" "$msg" +} + +msg_error() { + if [ -n "${SPINNER_PID:-}" ] && ps -p "$SPINNER_PID" >/dev/null 2>&1; then + kill "$SPINNER_PID" >/dev/null 2>&1 + wait "$SPINNER_PID" 2>/dev/null || true + fi + + local msg="$1" + printf "\r\e[2K${CROSS}${RD}%b${CL}\n" "$msg" >&2 + unset SPINNER_PID + SPINNER_ACTIVE=0 + log_message "ERROR" "$msg" +} + +log_message() { + local level="$1" + local message="$2" + local timestamp + local logdate + timestamp=$(date '+%Y-%m-%d %H:%M:%S') + logdate=$(date '+%Y-%m-%d') + + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + + LOGFILE="${LOGDIR}/${logdate}_${NSAPP}.log" + echo "$timestamp - $level: $message" >>"$LOGFILE" } # Check if the shell is using bash @@ -236,13 +267,13 @@ update_motd_ip() { IP=$(get_current_ip) # Add the new IP address - echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE" + echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >>"$MOTD_FILE" fi } # Function to download & save header files get_header() { - local app_name=$(echo ${APP,,} | tr -d ' ') + local app_name=$(echo ${APP,,} | tr -d ' ') local header_url="https://github.com/community-scripts/ProxmoxVE/raw/main/ct/headers/${app_name}" local local_header_path="/usr/local/community-scripts/headers/${app_name}" @@ -261,7 +292,7 @@ get_header() { # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. header_info() { - local app_name=$(echo ${APP,,} | tr -d ' ') + local app_name=$(echo ${APP,,} | tr -d ' ') local header_content # Download & save Header-File locally @@ -795,14 +826,14 @@ advanced_settings() { fi } -diagnostics_check(){ +diagnostics_check() { if ! [ -d "/usr/local/community-scripts" ]; then - mkdir -p /usr/local/community-scripts - fi + mkdir -p /usr/local/community-scripts + fi - if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then - if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then - cat </usr/local/community-scripts/diagnostics + if ! [ -f "/usr/local/community-scripts/diagnostics" ]; then + if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS" --yesno "Send Diagnostics of LXC Installation?\n\n(This only transmits data without user data, just RAM, CPU, LXC name, ...)" 10 58); then + cat </usr/local/community-scripts/diagnostics DIAGNOSTICS=yes #This file is used to store the diagnostics settings for the Community-Scripts API. @@ -920,23 +951,24 @@ install_script() { advanced_settings break ;; - 4) - if [[ $DIAGNOSTICS == "yes" ]]; then - if whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "No" --no-button "Back" ; then - DIAGNOSTICS="no" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - else - if whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ - --yes-button "Yes" --no-button "Back" ; then - DIAGNOSTICS="yes" - sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics - whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 - fi - fi - ;; + 4) + if [[ $DIAGNOSTICS == "yes" ]]; then + if whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "No" --no-button "Back"; then + DIAGNOSTICS="no" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=no/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + else + if whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --yesno "Send Diagnostics of LXC Installation?\n\nCurrent setting: ${DIAGNOSTICS}" 10 58 \ + --yes-button "Yes" --no-button "Back"; then + DIAGNOSTICS="yes" + sed -i 's/^DIAGNOSTICS=.*/DIAGNOSTICS=yes/' /usr/local/community-scripts/diagnostics + whiptail --backtitle "Proxmox VE Helper Scripts" --title "DIAGNOSTICS SETTINGS" --msgbox "Diagnostics settings changed to ${DIAGNOSTICS}." 8 58 + fi + fi + + ;; 5) echo -e "${CROSS}${RD}Exiting.${CL}" exit 0 @@ -973,8 +1005,8 @@ check_container_storage() { # Check if the /boot partition is more than 80% full total_size=$(df /boot --output=size | tail -n 1) local used_size=$(df /boot --output=used | tail -n 1) - usage=$(( 100 * used_size / total_size )) - if (( usage > 80 )); then + usage=$((100 * used_size / total_size)) + if ((usage > 80)); then # Prompt the user for confirmation to continue echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" echo -ne "Continue anyway? " @@ -988,6 +1020,9 @@ check_container_storage() { } start() { + LOGDIR="/usr/local/community-scripts/logs" + mkdir -p "$LOGDIR" + if command -v pveversion >/dev/null 2>&1; then if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear @@ -999,11 +1034,32 @@ start() { fi if ! command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then + CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \ + "Support/Update functions for ${APP} LXC. Choose an option:" \ + 12 60 3 \ + "1" "YES (Silent Mode)" \ + "2" "YES (Verbose Mode)" \ + "3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3) + + case "$CHOICE" in + 1) + VERB="no" + set_std_mode + log_message "INFO" "Update started (Silent Mode)" + ;; + 2) + VERB="yes" + set_std_mode + log_message "INFO" "Update started (Verbose Mode)" + ;; + 3) clear + log_message "INFO" "Update aborted." exit_script exit - fi + ;; + esac + SPINNER_PID="" update_script fi @@ -1168,36 +1224,50 @@ EOF if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi - + post_update_to_api "done" "none" } +set_std_mode() { + if [ "$VERB" = "yes" ]; then + STD="" + else + STD="silent" + fi +} + +# Silent execution function +silent() { + if [ "$VERB" = "no" ]; then + "$@" >>"$LOGFILE" 2>&1 + else + "$@" 2>&1 | tee -a "$LOGFILE" + fi +} exit_script() { - exit_code=$? # Capture the exit status of the last executed command + exit_code=$? # Capture the exit status of the last executed command #200 exit codes indicate error in create_lxc.sh #100 exit codes indicate error in install.func -if [ $exit_code -ne 0 ]; then # Check if exit code is nonzero + if [ $exit_code -ne 0 ]; then # Check if exit code is nonzero case $exit_code in - 200) post_update_to_api "failed" "create_lxc.sh: Error during LXC creation" ;; - 201) post_update_to_api "failed" "create_lxc.sh Invalid Storage class" ;; - 202) post_update_to_api "failed" "create_lxc.sh Invalid Menu aborted" ;; - 203) post_update_to_api "failed" "create_lxc.sh CTID was unset" ;; - 204) post_update_to_api "failed" "create_lxc.sh PCT_OSTYPE was unset" ;; - 205) post_update_to_api "failed" "create_lxc.sh ID cannot be less than 100" ;; - 206) post_update_to_api "failed" "create_lxc.sh ID already in use" ;; - 207) post_update_to_api "failed" "create_lxc.sh Template not found" ;; - 208) post_update_to_api "failed" "create_lxc.sh Error downloading template" ;; - 101) post_update_to_api "failed" "create_lxc.sh No Network connection" ;; - *) post_update_to_api "failed" "Unknown error, exit code: $exit_code" ;; + 200) post_update_to_api "failed" "create_lxc.sh: Error during LXC creation" ;; + 201) post_update_to_api "failed" "create_lxc.sh Invalid Storage class" ;; + 202) post_update_to_api "failed" "create_lxc.sh Invalid Menu aborted" ;; + 203) post_update_to_api "failed" "create_lxc.sh CTID was unset" ;; + 204) post_update_to_api "failed" "create_lxc.sh PCT_OSTYPE was unset" ;; + 205) post_update_to_api "failed" "create_lxc.sh ID cannot be less than 100" ;; + 206) post_update_to_api "failed" "create_lxc.sh ID already in use" ;; + 207) post_update_to_api "failed" "create_lxc.sh Template not found" ;; + 208) post_update_to_api "failed" "create_lxc.sh Error downloading template" ;; + 101) post_update_to_api "failed" "create_lxc.sh No Network connection" ;; + *) post_update_to_api "failed" "Unknown error, exit code: $exit_code" ;; esac -fi + fi } - trap 'exit_script' EXIT trap 'post_update_to_api "failed" "$BASH_COMMAND"' ERR -trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT +trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM - diff --git a/misc/install.func b/misc/install.func index b02344797..656c97222 100644 --- a/misc/install.func +++ b/misc/install.func @@ -19,7 +19,7 @@ color() { BOLD=$(echo "\033[1m") HOLD=" " TAB=" " - + # System RETRY_NUM=10 RETRY_EVERY=3 @@ -36,12 +36,24 @@ color() { DEFAULT="${TAB}⚙️${TAB}${CL}" } -# This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" -verb_ip6() { +# Function to set STD mode based on verbosity +set_std_mode() { if [ "$VERBOSE" = "yes" ]; then STD="" - else STD="silent"; fi - silent() { "$@" >/dev/null 2>&1; } + else + STD="silent" + fi +} + +# Silent execution function +silent() { + "$@" >/dev/null 2>&1 +} + +# This function enables IPv6 if it's not disabled and sets verbose mode +verb_ip6() { + set_std_mode # Set STD mode based on VERBOSE + if [ "$DISABLEIPV6" == "yes" ]; then echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf $STD sysctl -p @@ -57,7 +69,7 @@ catch_errors() { # This function handles errors error_handler() { source <(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -83,7 +95,7 @@ spinner() { while true; do printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(( (spin_i + 1) % ${#frames[@]} )) + spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done } @@ -98,7 +110,7 @@ msg_info() { # This function displays a success message with a green color. msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR}${CM}${GN}${msg}${CL}" @@ -106,7 +118,7 @@ msg_ok() { # This function displays a error message with a red color. msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR}${CROSS}${RD}${msg}${CL}" @@ -147,23 +159,23 @@ network_check() { ipv4_connected=false ipv6_connected=false sleep 1 -# Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers. - if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then - msg_ok "IPv4 Internet Connected"; + # Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers. + if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then + msg_ok "IPv4 Internet Connected" ipv4_connected=true else - msg_error "IPv4 Internet Not Connected"; + msg_error "IPv4 Internet Not Connected" fi -# Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers. + # Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers. if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then - msg_ok "IPv6 Internet Connected"; + msg_ok "IPv6 Internet Connected" ipv6_connected=true else - msg_error "IPv6 Internet Not Connected"; + msg_error "IPv6 Internet Not Connected" fi -# If both IPv4 and IPv6 checks fail, prompt the user + # If both IPv4 and IPv6 checks fail, prompt the user if [[ $ipv4_connected == false && $ipv6_connected == false ]]; then read -r -p "No Internet detected,would you like to continue anyway? " prompt if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then @@ -193,7 +205,7 @@ else echo -n "DIRECT" fi EOF - chmod +x /usr/local/bin/apt-proxy-detect.sh + chmod +x /usr/local/bin/apt-proxy-detect.sh fi $STD apt-get update $STD apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade @@ -204,7 +216,7 @@ EOF # This function modifies the message of the day (motd) and SSH settings motd_ssh() { # Set terminal to 256-color mode - grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >> /root/.bashrc + grep -qxF "export TERM='xterm-256color'" /root/.bashrc || echo "export TERM='xterm-256color'" >>/root/.bashrc # Get OS information (Debian / Ubuntu) if [ -f "/etc/os-release" ]; then @@ -216,13 +228,13 @@ motd_ssh() { fi PROFILE_FILE="/etc/profile.d/00_lxc-details.sh" - echo "echo -e \"\"" > "$PROFILE_FILE" - echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >> "$PROFILE_FILE" - echo "echo \"\"" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >> "$PROFILE_FILE" - echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >> "$PROFILE_FILE" + echo "echo -e \"\"" >"$PROFILE_FILE" + echo -e "echo -e \"${BOLD}${APPLICATION} LXC Container${CL}"\" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >>"$PROFILE_FILE" + echo "echo \"\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${HOSTNAME}${YW} Hostname: ${GN}\$(hostname)${CL}\"" >>"$PROFILE_FILE" + echo -e "echo -e \"${TAB}${INFO}${YW} IP Address: ${GN}\$(hostname -I | awk '{print \$1}')${CL}\"" >>"$PROFILE_FILE" # Disable default MOTD scripts chmod -x /etc/update-motd.d/* @@ -253,7 +265,7 @@ EOF if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then mkdir -p /root/.ssh - echo "${SSH_AUTHORIZED_KEY}" > /root/.ssh/authorized_keys + echo "${SSH_AUTHORIZED_KEY}" >/root/.ssh/authorized_keys chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys fi From 0a1248861b9ff55da3291fb0418b002e23499b53 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Mon, 24 Feb 2025 11:22:43 +0100 Subject: [PATCH 009/167] New Script: Authelia (#2060) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fixed subscription nag removal * Authelia + Dev env * unbound var fix * fixes * service start and update function * remove dev env * remove dev env * Apply suggestions from code review Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> * Update authelia.sh * Update authelia-install.sh --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/authelia.sh | 55 ++++++++++++++++++++++++ install/authelia-install.sh | 84 +++++++++++++++++++++++++++++++++++++ json/authelia.json | 34 +++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 ct/authelia.sh create mode 100644 install/authelia-install.sh create mode 100644 json/authelia.json diff --git a/ct/authelia.sh b/ct/authelia.sh new file mode 100644 index 000000000..5e4dd6489 --- /dev/null +++ b/ct/authelia.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: thost96 (thost96) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.authelia.com/ + +APP="Authelia" +TAGS="" +var_cpu="1" +var_ram="512" +var_disk="2" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +base_settings + +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d "/etc/authelia/" ]]; then msg_error "No ${APP} Installation Found!"; exit; fi + RELEASE=$(curl -s https://api.github.com/repos/authelia/authelia/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + if [[ "${RELEASE}" != "$(/usr/bin/authelia -v | awk '{print substr($3, 2, length($2)) }' )" ]]; then + msg_info "Updating $APP to ${RELEASE}" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + wget -q "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_amd64.deb" + dpkg -i "authelia_${RELEASE}_amd64.deb" &>/dev/null + msg_info "Cleaning Up" + rm -f "authelia_${RELEASE}_amd64.deb" + apt-get -y autoremove &>/dev/null + apt-get -y autoclean &>/dev/null + msg_ok "Cleanup Completed" + msg_ok "Updated $APP to ${RELEASE}" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:9091${CL}" diff --git a/install/authelia-install.sh b/install/authelia-install.sh new file mode 100644 index 000000000..81ccfa3e6 --- /dev/null +++ b/install/authelia-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: thost96 (thost96) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.authelia.com/ + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Authelia" +RELEASE=$(curl -s https://api.github.com/repos/authelia/authelia/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_amd64.deb" +$STD dpkg -i "authelia_${RELEASE}_amd64.deb" +msg_ok "Install Authelia completed" + +msg_info "Setting Authelia up" +touch /etc/authelia/emails.txt +JWT_SECRET=$(openssl rand -hex 64) +SESSION_SECRET=$(openssl rand -hex 64) +STORAGE_KEY=$(openssl rand -hex 64) +DOMAIN=$(hostname -d) + +cat </etc/authelia/users.yml +users: + authelia: + disabled: false + displayname: "Authelia Admin" + password: "$argon2id$v=19$m=65536,t=3,p=4$ZBopMzXrzhHXPEZxRDVT2w$SxWm96DwhOsZyn34DLocwQEIb4kCDsk632PuiMdZnig" + groups: [] +EOF + +cat </etc/authelia/configuration.yml +authentication_backend: + file: + path: /etc/authelia/users.yml +access_control: + default_policy: one_factor +session: + secret: "${SESSION_SECRET}" + name: 'authelia_session' + same_site: 'lax' + inactivity: '5m' + expiration: '1h' + remember_me: '1M' + cookies: + - domain: "${DOMAIN}" + authelia_url: "https://auth.${DOMAIN}" +storage: + encryption_key: "${STORAGE_KEY}" + local: + path: /etc/authelia/db.sqlite +identity_validation: + reset_password: + jwt_secret: "${JWT_SECRET}" + jwt_lifespan: '5 minutes' + jwt_algorithm: 'HS256' +notifier: + filesystem: + filename: /etc/authelia/emails.txt +EOF +systemctl enable -q --now authelia +msg_ok "Authelia Setup completed" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f "authelia_${RELEASE}_amd64.deb" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/authelia.json b/json/authelia.json new file mode 100644 index 000000000..dcdb922a6 --- /dev/null +++ b/json/authelia.json @@ -0,0 +1,34 @@ +{ + "name": "Authelia", + "slug": "authelia", + "categories": [ + 6 + ], + "date_created": "2025-02-05", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9091, + "documentation": "https://www.authelia.com/integration/deployment/bare-metal/", + "website": "https://www.authelia.com/", + "logo": "https://www.authelia.com/images/branding/logo.png", + "description": "Authelia is an open-source authentication and authorization server and portal fulfilling the identity and access management (IAM) role of information security in providing multi-factor authentication and single sign-on (SSO) for your applications via a web portal. It acts as a companion for common reverse proxies.", + "install_methods": [ + { + "type": "default", + "script": "ct/authelia.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "authelia", + "password": "authelia" + }, + "notes": [] + } \ No newline at end of file From ebf63f55e6989534f4648d60fe6c670c314f5d35 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:24:25 +0100 Subject: [PATCH 010/167] Update date in json (#2589) Co-authored-by: GitHub Actions --- json/authelia.json | 64 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/json/authelia.json b/json/authelia.json index dcdb922a6..d8f2d1c02 100644 --- a/json/authelia.json +++ b/json/authelia.json @@ -1,34 +1,34 @@ { - "name": "Authelia", - "slug": "authelia", - "categories": [ - 6 - ], - "date_created": "2025-02-05", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 9091, - "documentation": "https://www.authelia.com/integration/deployment/bare-metal/", - "website": "https://www.authelia.com/", - "logo": "https://www.authelia.com/images/branding/logo.png", - "description": "Authelia is an open-source authentication and authorization server and portal fulfilling the identity and access management (IAM) role of information security in providing multi-factor authentication and single sign-on (SSO) for your applications via a web portal. It acts as a companion for common reverse proxies.", - "install_methods": [ - { - "type": "default", - "script": "ct/authelia.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 2, - "os": "Debian", - "version": "12" - } + "name": "Authelia", + "slug": "authelia", + "categories": [ + 6 + ], + "date_created": "2025-02-24", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9091, + "documentation": "https://www.authelia.com/integration/deployment/bare-metal/", + "website": "https://www.authelia.com/", + "logo": "https://www.authelia.com/images/branding/logo.png", + "description": "Authelia is an open-source authentication and authorization server and portal fulfilling the identity and access management (IAM) role of information security in providing multi-factor authentication and single sign-on (SSO) for your applications via a web portal. It acts as a companion for common reverse proxies.", + "install_methods": [ + { + "type": "default", + "script": "ct/authelia.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "Debian", + "version": "12" } - ], - "default_credentials": { - "username": "authelia", - "password": "authelia" - }, - "notes": [] - } \ No newline at end of file + } + ], + "default_credentials": { + "username": "authelia", + "password": "authelia" + }, + "notes": [] +} From df110695cd9bcd1f44820fa0a0b20ec5de8702be Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:24:48 +0100 Subject: [PATCH 011/167] Update .app files (#2590) Co-authored-by: GitHub Actions --- ct/headers/authelia | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/authelia diff --git a/ct/headers/authelia b/ct/headers/authelia new file mode 100644 index 000000000..ed9aa67a7 --- /dev/null +++ b/ct/headers/authelia @@ -0,0 +1,6 @@ + ___ __ __ ___ + / | __ __/ /_/ /_ ___ / (_)___ _ + / /| |/ / / / __/ __ \/ _ \/ / / __ `/ + / ___ / /_/ / /_/ / / / __/ / / /_/ / +/_/ |_\__,_/\__/_/ /_/\___/_/_/\__,_/ + From acf5eda756eba27eb44a05fb2b48c68213fb374e Mon Sep 17 00:00:00 2001 From: TyrantRey <48596994+LostALice@users.noreply.github.com> Date: Mon, 24 Feb 2025 18:24:58 +0800 Subject: [PATCH 012/167] Fix: Wireguard - Restart wgdashboard after update (#2587) Fix: Restart wgdashboard automatically after update --- ct/wireguard.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/wireguard.sh b/ct/wireguard.sh index 0d39e6811..66518d009 100644 --- a/ct/wireguard.sh +++ b/ct/wireguard.sh @@ -32,6 +32,7 @@ function update_script() { sleep 2 cd /etc/wgdashboard/src ./wgd.sh update + ./wgd.sh start exit } @@ -42,4 +43,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} WGDashboard Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:10086${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:10086${CL}" From eb3a2e41ed54a7986a4ef6a6452c6da6f51aaa86 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:25:30 +0100 Subject: [PATCH 013/167] Update CHANGELOG.md (#2588) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04f16010a..5aff2da2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,10 +23,13 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts +- New Script: Authelia [@thost96](https://github.com/thost96) ([#2060](https://github.com/community-scripts/ProxmoxVE/pull/2060)) - New Script: Jupyter Notebook [@Dave-code-creater](https://github.com/Dave-code-creater) ([#2561](https://github.com/community-scripts/ProxmoxVE/pull/2561)) ### 🚀 Updated Scripts +- Fix: Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) +- Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) - fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) ### 🌐 Website From de2e7857317e3dec86d39601e31bf780b8ea4e70 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:31:13 +0100 Subject: [PATCH 014/167] Update CHANGELOG.md (#2591) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aff2da2b..d753667f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts -- Fix: Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) +- Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) - Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) - fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) From a97a56bf8801386d329330592a0758c52e17e9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:25:18 +0100 Subject: [PATCH 015/167] New Script: VictoriaMetrics (#2565) * Add VictoriaMetrics script * fix file name * Update json/victoriametrics.json Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Update ct/victoriametrics.sh Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> * Update victoriametrics.sh --------- Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> --- ct/victoriametrics.sh | 69 ++++++++++++++++++++++++++++++ install/victoriametrics-install.sh | 60 ++++++++++++++++++++++++++ json/victoriametrics.json | 34 +++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 ct/victoriametrics.sh create mode 100644 install/victoriametrics-install.sh create mode 100644 json/victoriametrics.json diff --git a/ct/victoriametrics.sh b/ct/victoriametrics.sh new file mode 100644 index 000000000..10ef77c40 --- /dev/null +++ b/ct/victoriametrics.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/VictoriaMetrics/VictoriaMetrics + +APP="VictoriaMetrics" +var_tags="database" +var_cpu="2" +var_ram="2048" +var_disk="16" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/victoriametrics ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping $APP" + systemctl stop victoriametrics + msg_ok "Stopped $APP" + + msg_info "Updating ${APP} to v${RELEASE}" + temp_dir=$(mktemp -d) + cd $temp_dir + wget -q https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/victoria-metrics-linux-amd64-v${RELEASE}.tar.gz + wget -q https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/vmutils-linux-amd64-v${RELEASE}.tar.gz + find /opt/victoriametrics -maxdepth 1 -type f -executable -delete + tar -xf victoria-metrics-linux-amd64-v${RELEASE}.tar.gz -C /opt/victoriametrics + tar -xf vmutils-linux-amd64-v${RELEASE}.tar.gz -C /opt/victoriametrics + chmod +x /opt/victoriametrics/* + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start victoriametrics + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf $temp_dir + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:8428/vmui${CL}" diff --git a/install/victoriametrics-install.sh b/install/victoriametrics-install.sh new file mode 100644 index 000000000..4ba74fb8d --- /dev/null +++ b/install/victoriametrics-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/VictoriaMetrics/VictoriaMetrics + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + sudo \ + curl \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setup VictoriaMetrics" +temp_dir=$(mktemp -d) +cd $temp_dir +mkdir -p /opt/victoriametrics/data +RELEASE=$(curl -s https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/victoria-metrics-linux-amd64-v${RELEASE}.tar.gz +wget -q https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v${RELEASE}/vmutils-linux-amd64-v${RELEASE}.tar.gz +tar -xf victoria-metrics-linux-amd64-v${RELEASE}.tar.gz -C /opt/victoriametrics +tar -xf vmutils-linux-amd64-v${RELEASE}.tar.gz -C /opt/victoriametrics +chmod +x /opt/victoriametrics/* +msg_ok "Setup VictoriaMetrics" + +msg_info "Creating Service" +cat </etc/systemd/system/victoriametrics.service +[Unit] +Description=VictoriaMetrics Service + +[Service] +Type=simple +Restart=always +User=root +WorkingDirectory=/opt/victoriametrics +ExecStart=/opt/victoriametrics/victoria-metrics-prod --storageDataPath="/opt/victoriametrics/data" + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now victoriametrics +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $temp_dir +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/victoriametrics.json b/json/victoriametrics.json new file mode 100644 index 000000000..18dceabbb --- /dev/null +++ b/json/victoriametrics.json @@ -0,0 +1,34 @@ +{ + "name": "VictoriaMetrics", + "slug": "victoria", + "categories": [ + 8 + ], + "date_created": "2025-02-23", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8428, + "documentation": "https://docs.victoriametrics.com/", + "website": "https://victoriametrics.com/", + "logo": "https://marketplace-assets.digitalocean.com/logos/victoriametrics-victoriametricss.png", + "description": "VictoriaMetrics is a fast, cost-saving, and scalable solution for monitoring and managing time series data. It delivers high performance and reliability, making it an ideal choice for businesses of all sizes.", + "install_methods": [ + { + "type": "default", + "script": "ct/victoriametrics.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 16, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From fc9a7f2cd47ac63eeaa8681116a0391848c81666 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:26:34 +0100 Subject: [PATCH 016/167] Update date in json (#2593) Co-authored-by: GitHub Actions --- json/victoriametrics.json | 66 +++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/json/victoriametrics.json b/json/victoriametrics.json index 18dceabbb..43955e6ca 100644 --- a/json/victoriametrics.json +++ b/json/victoriametrics.json @@ -1,34 +1,34 @@ { - "name": "VictoriaMetrics", - "slug": "victoria", - "categories": [ - 8 - ], - "date_created": "2025-02-23", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8428, - "documentation": "https://docs.victoriametrics.com/", - "website": "https://victoriametrics.com/", - "logo": "https://marketplace-assets.digitalocean.com/logos/victoriametrics-victoriametricss.png", - "description": "VictoriaMetrics is a fast, cost-saving, and scalable solution for monitoring and managing time series data. It delivers high performance and reliability, making it an ideal choice for businesses of all sizes.", - "install_methods": [ - { - "type": "default", - "script": "ct/victoriametrics.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 16, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} \ No newline at end of file + "name": "VictoriaMetrics", + "slug": "victoria", + "categories": [ + 8 + ], + "date_created": "2025-02-24", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8428, + "documentation": "https://docs.victoriametrics.com/", + "website": "https://victoriametrics.com/", + "logo": "https://marketplace-assets.digitalocean.com/logos/victoriametrics-victoriametricss.png", + "description": "VictoriaMetrics is a fast, cost-saving, and scalable solution for monitoring and managing time series data. It delivers high performance and reliability, making it an ideal choice for businesses of all sizes.", + "install_methods": [ + { + "type": "default", + "script": "ct/victoriametrics.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 16, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From 7700b1a5414ba93f9a3162f3f3b4be1f54095316 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:26:50 +0100 Subject: [PATCH 017/167] Update .app files (#2594) Co-authored-by: GitHub Actions --- ct/headers/victoriametrics | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/victoriametrics diff --git a/ct/headers/victoriametrics b/ct/headers/victoriametrics new file mode 100644 index 000000000..5e705603d --- /dev/null +++ b/ct/headers/victoriametrics @@ -0,0 +1,6 @@ + _ ___ __ _ __ ___ __ _ +| | / (_)____/ /_____ _____(_)___ _/ |/ /__ / /______(_)_________ +| | / / / ___/ __/ __ \/ ___/ / __ `/ /|_/ / _ \/ __/ ___/ / ___/ ___/ +| |/ / / /__/ /_/ /_/ / / / / /_/ / / / / __/ /_/ / / / /__(__ ) +|___/_/\___/\__/\____/_/ /_/\__,_/_/ /_/\___/\__/_/ /_/\___/____/ + From 20cc7572a56a338a3e83b5aa21f7849bf9f5deea Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:27:20 +0100 Subject: [PATCH 018/167] Update CHANGELOG.md (#2595) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d753667f7..248292e78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts +- New Script: VictoriaMetrics [@tremor021](https://github.com/tremor021) ([#2565](https://github.com/community-scripts/ProxmoxVE/pull/2565)) - New Script: Authelia [@thost96](https://github.com/thost96) ([#2060](https://github.com/community-scripts/ProxmoxVE/pull/2060)) - New Script: Jupyter Notebook [@Dave-code-creater](https://github.com/Dave-code-creater) ([#2561](https://github.com/community-scripts/ProxmoxVE/pull/2561)) From ece3ad2b1369524e54a1ef6178646ab174f17a1b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:49:16 +0100 Subject: [PATCH 019/167] Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) (#2596) * Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) * Update crafty-controller.sh --- ct/2fauth.sh | 6 +++--- ct/actualbudget.sh | 6 +++--- ct/adventurelog.sh | 12 +++++------ ct/alpine-it-tools.sh | 2 +- ct/apt-cacher-ng.sh | 4 ++-- ct/aria2.sh | 4 ++-- ct/authelia.sh | 10 +++++----- ct/authentik.sh | 18 ++++++++--------- ct/bazarr.sh | 4 ++-- ct/blocky.sh | 4 ++-- ct/bookstack.sh | 10 +++++----- ct/caddy.sh | 4 ++-- ct/calibre-web.sh | 4 ++-- ct/casaos.sh | 4 ++-- ct/changedetection.sh | 26 ++++++++++++------------ ct/checkmk.sh | 14 ++++++------- ct/cloudflared.sh | 4 ++-- ct/cockpit.sh | 32 +++++++++++++++--------------- ct/cronicle.sh | 34 ++++++++++++++++---------------- ct/cross-seed.sh | 2 +- ct/daemonsync.sh | 4 ++-- ct/debian.sh | 4 ++-- ct/deconz.sh | 4 ++-- ct/deluge.sh | 2 +- ct/docker.sh | 4 ++-- ct/docmost.sh | 4 ++-- ct/dotnetaspwebapi.sh | 4 ++-- ct/elementsynapse.sh | 4 ++-- ct/emby.sh | 4 ++-- ct/emqx.sh | 4 ++-- ct/esphome.sh | 4 ++-- ct/evcc.sh | 4 ++-- ct/excalidraw.sh | 2 +- ct/fhem.sh | 4 ++-- ct/firefly.sh | 14 ++++++------- ct/ghost.sh | 2 +- ct/grafana.sh | 4 ++-- ct/graylog.sh | 4 ++-- ct/grist.sh | 6 +++--- ct/heimdall-dashboard.sh | 4 ++-- ct/hoarder.sh | 10 +++++----- ct/homarr.sh | 6 +++--- ct/homeassistant-core.sh | 24 +++++++++++----------- ct/homeassistant.sh | 16 +++++++-------- ct/homebridge.sh | 4 ++-- ct/homepage.sh | 10 +++++----- ct/homer.sh | 2 +- ct/hyperhdr.sh | 4 ++-- ct/hyperion.sh | 4 ++-- ct/influxdb.sh | 4 ++-- ct/inspircd.sh | 2 +- ct/iobroker.sh | 4 ++-- ct/jellyfin.sh | 6 +++--- ct/jellyseerr.sh | 12 +++++------ ct/jenkins.sh | 4 ++-- ct/jupyternotebook.sh | 6 +++--- ct/kavita.sh | 2 +- ct/keycloak.sh | 4 ++-- ct/kimai.sh | 4 ++-- ct/koillection.sh | 10 +++++----- ct/kometa.sh | 2 +- ct/komodo.sh | 2 +- ct/kubo.sh | 4 ++-- ct/lazylibrarian.sh | 2 +- ct/lidarr.sh | 4 ++-- ct/linkwarden.sh | 10 +++++----- ct/listmonk.sh | 2 +- ct/magicmirror.sh | 2 +- ct/mariadb.sh | 4 ++-- ct/mattermost.sh | 4 ++-- ct/memos.sh | 6 +++--- ct/meshcentral.sh | 4 ++-- ct/metube.sh | 10 +++++----- ct/mongodb.sh | 4 ++-- ct/monica.sh | 8 ++++---- ct/motioneye.sh | 2 +- ct/mqtt.sh | 4 ++-- ct/myspeed.sh | 2 +- ct/mysql.sh | 4 ++-- ct/n8n.sh | 4 ++-- ct/navidrome.sh | 2 +- ct/neo4j.sh | 4 ++-- ct/netbox.sh | 2 +- ct/nextcloudpi.sh | 4 ++-- ct/nextpvr.sh | 6 +++--- ct/nginxproxymanager.sh | 20 +++++++++---------- ct/node-red.sh | 6 +++--- ct/nodebb.sh | 2 +- ct/notifiarr.sh | 4 ++-- ct/ntfy.sh | 4 ++-- ct/nxwitness.sh | 2 +- ct/nzbget.sh | 4 ++-- ct/octoprint.sh | 2 +- ct/ollama.sh | 4 ++-- ct/omv.sh | 4 ++-- ct/onedev.sh | 2 +- ct/opengist.sh | 8 ++++---- ct/openhab.sh | 4 ++-- ct/openwebui.sh | 6 +++--- ct/overseerr.sh | 6 +++--- ct/owncast.sh | 4 ++-- ct/paperless-ai.sh | 2 +- ct/paperless-ngx.sh | 10 +++++----- ct/part-db.sh | 10 +++++----- ct/paymenter.sh | 2 +- ct/peanut.sh | 4 ++-- ct/pf2etools.sh | 8 ++++---- ct/photoprism.sh | 2 +- ct/pingvin.sh | 8 ++++---- ct/plex.sh | 4 ++-- ct/podman-homeassistant.sh | 20 +++++++++---------- ct/podman.sh | 4 ++-- ct/postgresql.sh | 4 ++-- ct/prometheus-pve-exporter.sh | 2 +- ct/proxmox-backup-server.sh | 4 ++-- ct/proxmox-datacenter-manager.sh | 4 ++-- ct/proxmox-mail-gateway.sh | 4 ++-- ct/ps5-mqtt.sh | 4 ++-- ct/qbittorrent.sh | 4 ++-- ct/rabbitmq.sh | 2 +- ct/rdtclient.sh | 4 ++-- ct/readarr.sh | 4 ++-- ct/rtsptoweb.sh | 4 ++-- ct/rustdeskserver.sh | 2 +- ct/sabnzbd.sh | 6 +++--- ct/seelf.sh | 2 +- ct/semaphore.sh | 2 +- ct/sftpgo.sh | 4 ++-- ct/smokeping.sh | 4 ++-- ct/snipeit.sh | 20 +++++++++---------- ct/spoolman.sh | 2 +- ct/sqlserver2022.sh | 4 ++-- ct/stirling-pdf.sh | 6 +++--- ct/syncthing.sh | 4 ++-- ct/tandoor.sh | 14 ++++++------- ct/tasmoadmin.sh | 4 ++-- ct/tasmocompiler.sh | 6 +++--- ct/tautulli.sh | 4 ++-- ct/tdarr.sh | 4 ++-- ct/technitiumdns.sh | 8 ++++---- ct/the-lounge.sh | 2 +- ct/tianji.sh | 14 ++++++------- ct/transmission.sh | 4 ++-- ct/typesense.sh | 4 ++-- ct/ubuntu.sh | 4 ++-- ct/umbrel.sh | 4 ++-- ct/unbound.sh | 4 ++-- ct/unifi.sh | 4 ++-- ct/unmanic.sh | 4 ++-- ct/uptimekuma.sh | 14 ++++++------- ct/urbackupserver.sh | 4 ++-- ct/vaultwarden.sh | 10 +++++----- ct/vikunja.sh | 2 +- ct/wallos.sh | 2 +- ct/watcharr.sh | 4 ++-- ct/whisparr.sh | 4 ++-- ct/whoogle.sh | 2 +- ct/wikijs.sh | 2 +- ct/yunohost.sh | 4 ++-- ct/zabbix.sh | 6 +++--- ct/zammad.sh | 14 ++++++------- ct/zerotier-one.sh | 2 +- ct/zigbee2mqtt.sh | 6 +++--- ct/zipline.sh | 6 +++--- ct/zitadel.sh | 2 +- 165 files changed, 475 insertions(+), 475 deletions(-) diff --git a/ct/2fauth.sh b/ct/2fauth.sh index 61f94c496..bb68cb3cb 100644 --- a/ct/2fauth.sh +++ b/ct/2fauth.sh @@ -35,8 +35,8 @@ function update_script() { if [[ "${RELEASE}" != "$(cat /opt/2fauth_version.txt)" ]] || [[ ! -f /opt/2fauth_version.txt ]]; then msg_info "Updating $APP to ${RELEASE}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade # Creating Backup msg_info "Creating Backup" @@ -55,7 +55,7 @@ function update_script() { chmod -R 755 "/opt/2fauth" export COMPOSER_ALLOW_SUPERUSER=1 - composer install --no-dev --prefer-source &>/dev/null + $STD composer install --no-dev --prefer-source php artisan 2fauth:install diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 34a405a86..85ca87333 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -42,13 +42,13 @@ function update_script() { wget -q "https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz" mv /opt/actualbudget /opt/actualbudget_bak - tar -xzf "v${RELEASE}.tar.gz" &>/dev/null + $STD tar -xzf "v${RELEASE}.tar.gz" mv *ctual-server-* /opt/actualbudget mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config} for dir in server-files .migrate user-files migrations; do if [[ -d /opt/actualbudget_bak/$dir ]]; then - mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ 2>/dev/null || true + mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ || true fi done if [[ -f /opt/actualbudget-data/migrate/.migrations ]]; then @@ -74,7 +74,7 @@ ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt EOF fi cd /opt/actualbudget - yarn install &>/dev/null + $STD yarn install echo "${RELEASE}" > /opt/actualbudget_version.txt msg_ok "Updated ${APP}" diff --git a/ct/adventurelog.sh b/ct/adventurelog.sh index 57ebda107..990790ca2 100644 --- a/ct/adventurelog.sh +++ b/ct/adventurelog.sh @@ -43,15 +43,15 @@ function update_script() { mv /opt/adventurelog-backup/backend/server/.env /opt/adventurelog/backend/server/.env mv /opt/adventurelog-backup/backend/server/media /opt/adventurelog/backend/server/media cd /opt/adventurelog/backend/server - pip install --upgrade pip &>/dev/null - pip install -r requirements.txt &>/dev/null - python3 manage.py collectstatic --noinput &>/dev/null - python3 manage.py migrate &>/dev/null + $STD pip install --upgrade pip + $STD pip install -r requirements.txt + $STD python3 manage.py collectstatic --noinput + $STD python3 manage.py migrate mv /opt/adventurelog-backup/frontend/.env /opt/adventurelog/frontend/.env cd /opt/adventurelog/frontend - pnpm install &>/dev/null - pnpm run build &>/dev/null + $STD pnpm install + $STD pnpm run build echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/ct/alpine-it-tools.sh b/ct/alpine-it-tools.sh index d24f267f6..0aaa2a175 100644 --- a/ct/alpine-it-tools.sh +++ b/ct/alpine-it-tools.sh @@ -30,7 +30,7 @@ if [ ! -d /usr/share/nginx/html ]; then fi RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4) -if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ] || [ ! -f /opt/${APP}_version.txt ]; then +if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt" ] || [ ! -f /opt/${APP}_version.txt ]; then DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" msg_info "Updating ${APP} LXC" curl -fsSL -o it-tools.zip "$DOWNLOAD_URL" diff --git a/ct/apt-cacher-ng.sh b/ct/apt-cacher-ng.sh index 37ba6f51f..0db7408b9 100644 --- a/ct/apt-cacher-ng.sh +++ b/ct/apt-cacher-ng.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/aria2.sh b/ct/aria2.sh index d899d6072..fe92d5814 100644 --- a/ct/aria2.sh +++ b/ct/aria2.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/authelia.sh b/ct/authelia.sh index 5e4dd6489..de6eb07ca 100644 --- a/ct/authelia.sh +++ b/ct/authelia.sh @@ -29,14 +29,14 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/authelia/authelia/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ "${RELEASE}" != "$(/usr/bin/authelia -v | awk '{print substr($3, 2, length($2)) }' )" ]]; then msg_info "Updating $APP to ${RELEASE}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade wget -q "https://github.com/authelia/authelia/releases/download/${RELEASE}/authelia_${RELEASE}_amd64.deb" - dpkg -i "authelia_${RELEASE}_amd64.deb" &>/dev/null + $STD dpkg -i "authelia_${RELEASE}_amd64.deb" msg_info "Cleaning Up" rm -f "authelia_${RELEASE}_amd64.deb" - apt-get -y autoremove &>/dev/null - apt-get -y autoclean &>/dev/null + $STD apt-get -y autoremove + $STD apt-get -y autoclean msg_ok "Cleanup Completed" msg_ok "Updated $APP to ${RELEASE}" else diff --git a/ct/authentik.sh b/ct/authentik.sh index 44beaf8e0..48e9a93ba 100644 --- a/ct/authentik.sh +++ b/ct/authentik.sh @@ -40,11 +40,11 @@ function update_script() { tar -xzf authentik.tar.gz -C /opt/authentik --strip-components 1 --overwrite rm -rf authentik.tar.gz cd /opt/authentik/website - npm install &>/dev/null - npm run build-bundled &>/dev/null + $STD npm install + $STD npm run build-bundled cd /opt/authentik/web - npm install &>/dev/null - npm run build &>/dev/null + $STD npm install + $STD npm run build msg_ok "Built ${APP} website" msg_info "Building ${APP} server" @@ -56,15 +56,15 @@ function update_script() { msg_info "Installing Python Dependencies" cd /opt/authentik - poetry install --only=main --no-ansi --no-interaction --no-root &>/dev/null - poetry export --without-hashes --without-urls -f requirements.txt --output requirements.txt &>/dev/null - pip install --no-cache-dir -r requirements.txt &>/dev/null - pip install . &>/dev/null + $STD poetry install --only=main --no-ansi --no-interaction --no-root + $STD poetry export --without-hashes --without-urls -f requirements.txt --output requirements.txt + $STD pip install --no-cache-dir -r requirements.txt + $STD pip install . msg_ok "Installed Python Dependencies" msg_info "Updating ${APP} to v${RELEASE} (Patience)" cp -r /opt/authentik/authentik/blueprints /opt/authentik/blueprints - bash /opt/authentik/lifecycle/ak migrate &>/dev/null + $STD bash /opt/authentik/lifecycle/ak migrate echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/bazarr.sh b/ct/bazarr.sh index aec94f837..f628941f3 100755 --- a/ct/bazarr.sh +++ b/ct/bazarr.sh @@ -25,8 +25,8 @@ function update_script() { check_container_resources if [[ ! -d /var/lib/bazarr/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/blocky.sh b/ct/blocky.sh index 70e9b4722..9b5113a4e 100644 --- a/ct/blocky.sh +++ b/ct/blocky.sh @@ -25,8 +25,8 @@ function update_script() { check_container_resources if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/bookstack.sh b/ct/bookstack.sh index f61806b1a..bfd90689f 100644 --- a/ct/bookstack.sh +++ b/ct/bookstack.sh @@ -39,12 +39,12 @@ function update_script() { unzip -q /opt/v${RELEASE}.zip -d /opt mv /opt/BookStack-${RELEASE} /opt/bookstack cp /opt/bookstack-backup/.env /opt/bookstack/.env - cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ 2>/dev/null || true - cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ 2>/dev/null || true - cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ 2>/dev/null || true + cp -r /opt/bookstack-backup/public/uploads/* /opt/bookstack/public/uploads/ || true + cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true + cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ || true cd /opt/bookstack - COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &>/dev/null - php artisan migrate --force &>/dev/null + $STD COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev + $STD php artisan migrate --force chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage chmod -R 775 /opt/bookstack/storage /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads diff --git a/ct/caddy.sh b/ct/caddy.sh index ab6c664e1..a0f6e1dfa 100644 --- a/ct/caddy.sh +++ b/ct/caddy.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index a8e202d61..4e4001d1d 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -115,10 +115,10 @@ function update_script() { echo "${options[*]}" ) echo $cps_options >/opt/calibre-web/options.txt - pip install --upgrade calibreweb[$cps_options] &>/dev/null + $STD pip install --upgrade calibreweb[$cps_options] else rm -rf /opt/calibre-web/options.txt - pip install --upgrade calibreweb &>/dev/null + $STD pip install --upgrade calibreweb fi msg_info "Starting ${APP}" diff --git a/ct/casaos.sh b/ct/casaos.sh index 68adb8520..0191c4128 100644 --- a/ct/casaos.sh +++ b/ct/casaos.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 07fc43ead..04dc36547 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -31,31 +31,31 @@ function update_script() { if ! dpkg -s libjpeg-dev >/dev/null 2>&1; then msg_info "Installing Dependencies" - apt-get update - apt-get install -y libjpeg-dev + $STD apt-get update + $STD apt-get install -y libjpeg-dev msg_ok "Updated Dependencies" fi msg_info "Updating ${APP}" - pip3 install changedetection.io --upgrade &>/dev/null + $STD pip3 install changedetection.io --upgrade msg_ok "Updated ${APP}" msg_info "Updating Playwright" - pip3 install playwright --upgrade &>/dev/null + $STD pip3 install playwright --upgrade msg_ok "Updated Playwright" if [[ -f /etc/systemd/system/browserless.service ]]; then msg_info "Updating Browserless (Patience)" - git -C /opt/browserless/ fetch --all &>/dev/null - git -C /opt/browserless/ reset --hard origin/main &>/dev/null - npm update --prefix /opt/browserless &>/dev/null - /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null + $STD git -C /opt/browserless/ fetch --all + $STD git -C /opt/browserless/ reset --hard origin/main + $STD npm update --prefix /opt/browserless + $STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps # Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed. - /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null - /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null - npm run build --prefix /opt/browserless &>/dev/null - npm run build:function --prefix /opt/browserless &>/dev/null - npm prune production --prefix /opt/browserless &>/dev/null + $STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome + $STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit + $STD npm run build --prefix /opt/browserless + $STD npm run build:function --prefix /opt/browserless + $STD npm prune production --prefix /opt/browserless systemctl restart browserless msg_ok "Updated Browserless" else diff --git a/ct/checkmk.sh b/ct/checkmk.sh index 086216c34..931830dd4 100644 --- a/ct/checkmk.sh +++ b/ct/checkmk.sh @@ -30,14 +30,14 @@ function update_script() { RELEASE=$(curl -fsSL https://api.github.com/repos/checkmk/checkmk/tags | grep "name" | awk '{print substr($2, 3, length($2)-4) }' | tr ' ' '\n' | grep -v '\-rc' | sort -V | tail -n 1) if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to v${RELEASE}" - omd stop monitoring &>/dev/null - omd cp monitoring monitoringbackup &>/dev/null + $STD omd stop monitoring + $STD omd cp monitoring monitoringbackup wget -q https://download.checkmk.com/checkmk/${RELEASE}/check-mk-raw-${RELEASE}_0.bookworm_amd64.deb -O /opt/checkmk.deb - apt-get install -y /opt/checkmk.deb &>/dev/null - omd --force -V ${RELEASE}.cre update --conflict=install monitoring &>/dev/null - omd start monitoring &>/dev/null - omd -f rm monitoringbackup &>/dev/null - omd cleanup &>/dev/null + $STD apt-get install -y /opt/checkmk.deb + $STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring + $STD omd start monitoring + $STD omd -f rm monitoringbackup + $STD omd cleanup rm -rf /opt/checkmk.deb msg_ok "Updated ${APP} to v${RELEASE}" else diff --git a/ct/cloudflared.sh b/ct/cloudflared.sh index aa88988a8..ceaa963f7 100644 --- a/ct/cloudflared.sh +++ b/ct/cloudflared.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/cockpit.sh b/ct/cockpit.sh index 6b54d8844..e6df8eb1a 100644 --- a/ct/cockpit.sh +++ b/ct/cockpit.sh @@ -36,48 +36,48 @@ function update_script() { if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit fi if [ "$UPD" == "2" ]; then msg_info "Installing dependencies (patience)" - apt-get install -y attr &>/dev/null - apt-get install -y nfs-kernel-server &>/dev/null - apt-get install -y samba &>/dev/null - apt-get install -y samba-common-bin &>/dev/null - apt-get install -y winbind &>/dev/null - apt-get install -y gawk &>/dev/null + $STD apt-get install -y attr + $STD apt-get install -y nfs-kernel-server + $STD apt-get install -y samba + $STD apt-get install -y samba-common-bin + $STD apt-get install -y winbind + $STD apt-get install -y gawk msg_ok "Installed dependencies" msg_info "Installing Cockpit file sharing" wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4) - dpkg -i cockpit-file-sharing_*focal_all.deb &>/dev/null + $STD dpkg -i cockpit-file-sharing_*focal_all.deb rm cockpit-file-sharing_*focal_all.deb msg_ok "Installed Cockpit file sharing" exit fi if [ "$UPD" == "3" ]; then msg_info "Installing dependencies (patience)" - apt-get install -y psmisc &>/dev/null - apt-get install -y samba &>/dev/null - apt-get install -y samba-common-bin &>/dev/null + $STD apt-get install -y psmisc + $STD apt-get install -y samba + $STD apt-get install -y samba-common-bin msg_ok "Installed dependencies" msg_info "Installing Cockpit identities" wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4) - dpkg -i cockpit-identities_*focal_all.deb &>/dev/null + $STD dpkg -i cockpit-identities_*focal_all.deb rm cockpit-identities_*focal_all.deb msg_ok "Installed Cockpit identities" exit fi if [ "$UPD" == "4" ]; then msg_info "Installing dependencies" - apt-get install -y rsync &>/dev/null - apt-get install -y zip &>/dev/null + $STD apt-get install -y rsync + $STD apt-get install -y zip msg_ok "Installed dependencies" msg_info "Installing Cockpit navigator" wget -q $(curl -s https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep download | grep focal_all.deb | cut -d\" -f4) - dpkg -i cockpit-navigator_*focal_all.deb &>/dev/null + $STD dpkg -i cockpit-navigator_*focal_all.deb rm cockpit-navigator_*focal_all.deb msg_ok "Installed Cockpit navigator" exit diff --git a/ct/cronicle.sh b/ct/cronicle.sh index dcbc3439b..8ce0e6783 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -36,12 +36,12 @@ function update_script() { if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 + $STD apt-get install -y npm echo "Installed NPM..." fi fi msg_info "Updating ${APP}" - /opt/cronicle/bin/control.sh upgrade &>/dev/null + $STD /opt/cronicle/bin/control.sh upgrade msg_ok "Updated ${APP}" exit fi @@ -49,7 +49,7 @@ function update_script() { if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 + $STD apt-get install -y npm echo "Installed NPM..." fi fi @@ -57,12 +57,12 @@ function update_script() { IP=$(hostname -I | awk '{print $1}') msg_info "Installing Dependencies" - apt-get install -y git &>/dev/null - apt-get install -y make &>/dev/null - apt-get install -y g++ &>/dev/null - apt-get install -y gcc &>/dev/null - apt-get install -y ca-certificates &>/dev/null - apt-get install -y gnupg &>/dev/null + $STD apt-get install -y git + $STD apt-get install -y make + $STD apt-get install -y g++ + $STD apt-get install -y gcc + $STD apt-get install -y ca-certificates + $STD apt-get install -y gnupg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -72,21 +72,21 @@ function update_script() { msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" - apt-get update &>/dev/null - apt-get install -y nodejs &>/dev/null + $STD apt-get update + $STD apt-get install -y nodejs msg_ok "Installed Node.js" msg_info "Installing Cronicle Worker" mkdir -p /opt/cronicle cd /opt/cronicle - tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 &>/dev/null - npm install &>/dev/null - node bin/build.js dist &>/dev/null + $STD tar zxvf <(curl -fsSL https://github.com/jhuckaby/Cronicle/archive/${LATEST}.tar.gz) --strip-components 1 + $STD npm install + $STD node bin/build.js dist sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json - /opt/cronicle/bin/control.sh start &>/dev/null - cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled &>/dev/null + $STD /opt/cronicle/bin/control.sh start + $STD cp /opt/cronicle/bin/cronicled.init /etc/init.d/cronicled chmod 775 /etc/init.d/cronicled - update-rc.d cronicled defaults &>/dev/null + $STD update-rc.d cronicled defaults msg_ok "Installed Cronicle Worker" echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" exit diff --git a/ct/cross-seed.sh b/ct/cross-seed.sh index 1cb34a39a..0a2337acf 100644 --- a/ct/cross-seed.sh +++ b/ct/cross-seed.sh @@ -29,7 +29,7 @@ function update_script() { latest_version=$(npm show cross-seed version) if [ "$current_version" != "$latest_version" ]; then msg_info "Updating ${APP} from version v${current_version} to v${latest_version}" - npm install -g cross-seed@latest &> /dev/null + $STD npm install -g cross-seed@latest systemctl restart cross-seed msg_ok "Updated Successfully" else diff --git a/ct/daemonsync.sh b/ct/daemonsync.sh index 38f2502f7..93c9bf63e 100644 --- a/ct/daemonsync.sh +++ b/ct/daemonsync.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/debian.sh b/ct/debian.sh index 125c9df12..3ccd702f0 100644 --- a/ct/debian.sh +++ b/ct/debian.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/deconz.sh b/ct/deconz.sh index 70bbea020..6207822f3 100644 --- a/ct/deconz.sh +++ b/ct/deconz.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/deluge.sh b/ct/deluge.sh index ba8177f32..e226ecd20 100644 --- a/ct/deluge.sh +++ b/ct/deluge.sh @@ -28,7 +28,7 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null + $STD apt-get update pip3 install deluge[all] --upgrade msg_ok "Updated $APP LXC" exit diff --git a/ct/docker.sh b/ct/docker.sh index fa08d2b6c..cf79db906 100644 --- a/ct/docker.sh +++ b/ct/docker.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/docmost.sh b/ct/docmost.sh index 75e1f9363..4c3896a74 100644 --- a/ct/docmost.sh +++ b/ct/docmost.sh @@ -41,8 +41,8 @@ function update_script() { mv docmost-${RELEASE} /opt/docmost cd /opt/docmost mv /opt/.env /opt/docmost/.env - pnpm install --force &>/dev/null - pnpm build &>/dev/null + $STD pnpm install --force + $STD pnpm build echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/ct/dotnetaspwebapi.sh b/ct/dotnetaspwebapi.sh index 6b0350058..508465b8b 100644 --- a/ct/dotnetaspwebapi.sh +++ b/ct/dotnetaspwebapi.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/elementsynapse.sh b/ct/elementsynapse.sh index d1b482be5..64057fa4d 100644 --- a/ct/elementsynapse.sh +++ b/ct/elementsynapse.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/emby.sh b/ct/emby.sh index d830c735e..b63e6085b 100644 --- a/ct/emby.sh +++ b/ct/emby.sh @@ -33,8 +33,8 @@ function update_script() { msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" - wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb &>/dev/null - dpkg -i emby-server-deb_${LATEST}_amd64.deb &>/dev/null + $STD wget https://github.com/MediaBrowser/Emby.Releases/releases/download/${LATEST}/emby-server-deb_${LATEST}_amd64.deb + $STD dpkg -i emby-server-deb_${LATEST}_amd64.deb rm emby-server-deb_${LATEST}_amd64.deb msg_ok "Updated ${APP}" diff --git a/ct/emqx.sh b/ct/emqx.sh index 6481b3a19..64282ba48 100644 --- a/ct/emqx.sh +++ b/ct/emqx.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/esphome.sh b/ct/esphome.sh index 85db1bb9d..aaadfa2c3 100644 --- a/ct/esphome.sh +++ b/ct/esphome.sh @@ -33,9 +33,9 @@ function update_script() { msg_info "Updating ESPHome" if [[ -d /srv/esphome ]]; then - source /srv/esphome/bin/activate &>/dev/null + $STD source /srv/esphome/bin/activate fi - pip3 install -U esphome &>/dev/null + $STD pip3 install -U esphome msg_ok "Updated ESPHome" msg_info "Starting ESPHome" diff --git a/ct/evcc.sh b/ct/evcc.sh index bef7c610f..f79a6ba51 100644 --- a/ct/evcc.sh +++ b/ct/evcc.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating evcc LXC" - apt update &>/dev/null - apt --only-upgrade install -y evcc &>/dev/null + $STD apt update + $STD apt --only-upgrade install -y evcc msg_ok "Updated Successfully" exit } diff --git a/ct/excalidraw.sh b/ct/excalidraw.sh index d0ff3a27a..c1347b41c 100644 --- a/ct/excalidraw.sh +++ b/ct/excalidraw.sh @@ -43,7 +43,7 @@ function update_script() { rm -rf /opt/excalidraw mv excalidraw-${RELEASE} /opt/excalidraw cd /opt/excalidraw - yarn &> /dev/null + $STD yarn msg_ok "Updated $APP to v${RELEASE}" msg_info "Starting $APP" diff --git a/ct/fhem.sh b/ct/fhem.sh index 63156dfe5..e5680d816 100644 --- a/ct/fhem.sh +++ b/ct/fhem.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/firefly.sh b/ct/firefly.sh index 526fdcd59..1a5dbd557 100644 --- a/ct/firefly.sh +++ b/ct/firefly.sh @@ -42,13 +42,13 @@ check_container_resources wget -q "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz" tar -xzf FireflyIII-v${RELEASE}.tar.gz -C /opt/firefly --exclude='storage' cd /opt/firefly - composer install --no-dev --no-interaction &>/dev/null - php artisan migrate --seed --force &>/dev/null - php artisan firefly:decrypt-all &>/dev/null - php artisan cache:clear &>/dev/null - php artisan view:clear &>/dev/null - php artisan firefly:upgrade-database &>/dev/null - php artisan firefly:laravel-passport-keys &>/dev/null + $STD composer install --no-dev --no-interaction + $STD php artisan migrate --seed --force + $STD php artisan firefly:decrypt-all + $STD php artisan cache:clear + $STD php artisan view:clear + $STD php artisan firefly:upgrade-database + $STD php artisan firefly:laravel-passport-keys chown -R www-data:www-data /opt/firefly chmod -R 775 /opt/firefly/storage diff --git a/ct/ghost.sh b/ct/ghost.sh index 379189fe0..5aa325317 100644 --- a/ct/ghost.sh +++ b/ct/ghost.sh @@ -30,7 +30,7 @@ function update_script() { latest_version=$(npm show ghost-cli version) if [ "$current_version" != "$latest_version" ]; then msg_info "Updating ${APP} from version v${current_version} to v${latest_version}" - npm install -g ghost-cli@latest &> /dev/null + $STD npm install -g ghost-cli@latest msg_ok "Updated Successfully" else msg_ok "${APP} is already at v${current_version}" diff --git a/ct/grafana.sh b/ct/grafana.sh index ebada4986..7a42a86ec 100644 --- a/ct/grafana.sh +++ b/ct/grafana.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/graylog.sh b/ct/graylog.sh index ffed4bf22..5beed3753 100644 --- a/ct/graylog.sh +++ b/ct/graylog.sh @@ -34,8 +34,8 @@ function update_script() { msg_ok "Stopped $APP" msg_info "Updating $APP" - apt-get update &> /dev/null - apt-get upgrade -y &> /dev/null + $STD apt-get update + $STD apt-get upgrade -y msg_ok "Updated $APP" msg_info "Starting $APP" diff --git a/ct/grist.sh b/ct/grist.sh index 83035b0ff..ab37a164b 100644 --- a/ct/grist.sh +++ b/ct/grist.sh @@ -51,15 +51,15 @@ function update_script() { cd grist msg_info "Installing Dependencies" - yarn install >/dev/null 2>&1 + $STD yarn install msg_ok "Installed Dependencies" msg_info "Building" - yarn run build:prod >/dev/null 2>&1 + $STD yarn run build:prod msg_ok "Done building" msg_info "Installing Python" - yarn run install:python >/dev/null 2>&1 + $STD yarn run install:python msg_ok "Installed Python" echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/ct/heimdall-dashboard.sh b/ct/heimdall-dashboard.sh index 279513d25..0d31e2e96 100644 --- a/ct/heimdall-dashboard.sh +++ b/ct/heimdall-dashboard.sh @@ -44,8 +44,8 @@ function update_script() { VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') cp -R Heimdall-${VER}/* /opt/Heimdall cd /opt/Heimdall - apt-get install -y composer &>/dev/null - COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null + $STD apt-get install -y composer + $STD COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated Heimdall Dashboard to ${RELEASE}" msg_info "Restoring Data" diff --git a/ct/hoarder.sh b/ct/hoarder.sh index 1302bb944..15d96efab 100644 --- a/ct/hoarder.sh +++ b/ct/hoarder.sh @@ -35,7 +35,7 @@ function update_script() { msg_ok "Stopped Services" msg_info "Updating ${APP} to v${RELEASE}" if [[ $(corepack -v) < "0.31.0" ]]; then - npm install -g corepack@0.31.0 &>/dev/null + $STD npm install -g corepack@0.31.0 fi cd /opt if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then @@ -47,14 +47,14 @@ function update_script() { unzip -q v${RELEASE}.zip mv hoarder-${RELEASE} /opt/hoarder cd /opt/hoarder/apps/web - pnpm install --frozen-lockfile &>/dev/null - pnpm exec next build --experimental-build-mode compile &>/dev/null + $STD pnpm install --frozen-lockfile + $STD pnpm exec next build --experimental-build-mode compile cp -r /opt/hoarder/apps/web/.next/standalone/apps/web/server.js /opt/hoarder/apps/web cd /opt/hoarder/apps/workers - pnpm install --frozen-lockfile &>/dev/null + $STD pnpm install --frozen-lockfile export DATA_DIR=/opt/hoarder_data cd /opt/hoarder/packages/db - pnpm migrate &>/dev/null + $STD pnpm migrate sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/homarr.sh b/ct/homarr.sh index f459717c2..b24891889 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -38,7 +38,7 @@ fi if [[ ! -f /opt/run_homarr.sh ]]; then msg_info "Detected outdated and missing service files" msg_error "Warning - The port of homarr changed from 3000 to 7575" - apt-get install -y nginx gettext openssl gpg &>/dev/null + $STD apt-get install -y nginx gettext openssl gpg sed -i '/^NODE_ENV=/d' /opt/homarr/.env && echo "NODE_ENV='production'" >> /opt/homarr/.env sed -i '/^DB_DIALECT=/d' /opt/homarr/.env && echo "DB_DIALECT='sqlite'" >> /opt/homarr/.env cat <<'EOF' >/opt/run_homarr.sh @@ -114,8 +114,8 @@ EOF mv homarr-${RELEASE} /opt/homarr mv /opt/homarr-data-backup/.env /opt/homarr/.env cd /opt/homarr - pnpm install &>/dev/null - pnpm build &>/dev/null + $STD pnpm install + $STD pnpm build cp /opt/homarr/apps/nextjs/next.config.ts . cp /opt/homarr/apps/nextjs/package.json . cp -r /opt/homarr/packages/db/migrations /opt/homarr_db/migrations diff --git a/ct/homeassistant-core.sh b/ct/homeassistant-core.sh index fd7ef36da..85f181a9c 100644 --- a/ct/homeassistant-core.sh +++ b/ct/homeassistant-core.sh @@ -59,7 +59,7 @@ function update_script() { msg_info "Updating Home Assistant" source /srv/homeassistant/bin/activate - pip install ${BR}--upgrade homeassistant &>/dev/null + $STD pip install ${BR}--upgrade homeassistant msg_ok "Updated Home Assistant" msg_info "Starting Home Assistant" @@ -72,10 +72,10 @@ function update_script() { fi if [ "$UPD" == "2" ]; then msg_info "Installing Home Assistant Community Store (HACS)" - apt update &>/dev/null - apt install -y unzip &>/dev/null + $STD apt update + $STD apt install -y unzip cd .homeassistant - bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + $STD bash <(curl -fsSL https://get.hacs.xyz) msg_ok "Installed Home Assistant Community Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit @@ -85,17 +85,17 @@ function update_script() { read -r -p "Would you like to use No Authentication? " prompt msg_info "Installing FileBrowser" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') - curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null + $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/$RELEASE/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser config set --auth.method=noauth &>/dev/null - filebrowser users add ID 1 --perm.admin &>/dev/null + $STD filebrowser config init -a '0.0.0.0' + $STD filebrowser config set -a '0.0.0.0' + $STD filebrowser config set --auth.method=noauth + $STD filebrowser users add ID 1 --perm.admin else - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null + $STD filebrowser config init -a '0.0.0.0' + $STD filebrowser config set -a '0.0.0.0' + $STD filebrowser users add admin helper-scripts.com --perm.admin fi msg_ok "Installed FileBrowser" diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 71aff0b16..6cd1946a5 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -61,10 +61,10 @@ function update_script() { fi if [ "$UPD" == "3" ]; then msg_info "Installing Home Assistant Community Store (HACS)" - apt update &>/dev/null - apt install unzip &>/dev/null + $STD apt update + $STD apt install unzip cd /var/lib/docker/volumes/hass_config/_data - bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + $STD bash <(curl -fsSL https://get.hacs.xyz) msg_ok "Installed Home Assistant Community Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit @@ -73,10 +73,10 @@ function update_script() { IP=$(hostname -I | awk '{print $1}') msg_info "Installing FileBrowser" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') - curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null + $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin + $STD filebrowser config init -a '0.0.0.0' + $STD filebrowser config set -a '0.0.0.0' + $STD filebrowser users add admin helper-scripts.com --perm.admin msg_ok "Installed FileBrowser" msg_info "Creating Service" @@ -91,7 +91,7 @@ ExecStart=/usr/local/bin/filebrowser -r / [Install] WantedBy=default.target" >$service_path - systemctl enable --now filebrowser.service &>/dev/null + $STD systemctl enable --now filebrowser.service msg_ok "Created Service" msg_ok "Completed Successfully!\n" diff --git a/ct/homebridge.sh b/ct/homebridge.sh index 97dddac16..7a24f0a85 100644 --- a/ct/homebridge.sh +++ b/ct/homebridge.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get install -y homebridge &>/dev/null + $STD apt-get update + $STD apt-get install -y homebridge msg_ok "Updated Successfully" exit } diff --git a/ct/homepage.sh b/ct/homepage.sh index 9e050c032..eb866dca8 100644 --- a/ct/homepage.sh +++ b/ct/homepage.sh @@ -30,8 +30,8 @@ function update_script() { if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 - npm install -g pnpm >/dev/null 2>&1 + $STD apt-get install -y npm + $STD npm install -g pnpm echo "Installed NPM..." fi fi @@ -45,11 +45,11 @@ function update_script() { cp -r homepage-${RELEASE}/* /opt/homepage/ rm -rf homepage-${RELEASE} cd /opt/homepage - npx --yes update-browserslist-db@latest >/dev/null 2>&1 - pnpm install >/dev/null 2>&1 + $STD npx --yes update-browserslist-db@latest + $STD pnpm install export NEXT_PUBLIC_VERSION="v$RELEASE" export NEXT_PUBLIC_REVISION="source" - pnpm build >/dev/null 2>&1 + $STD pnpm build systemctl start homepage echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated Homepage to v${RELEASE}" diff --git a/ct/homer.sh b/ct/homer.sh index 15488940d..eee1bc12a 100644 --- a/ct/homer.sh +++ b/ct/homer.sh @@ -41,7 +41,7 @@ function update_script() { rm -rf /opt/homer/* cd /opt/homer wget -q https://github.com/bastienwirtz/homer/releases/latest/download/homer.zip - unzip homer.zip &>/dev/null + $STD unzip homer.zip msg_ok "Updated ${APP}" msg_info "Restoring assets directory" diff --git a/ct/hyperhdr.sh b/ct/hyperhdr.sh index 720829e5b..f9c74d2a9 100644 --- a/ct/hyperhdr.sh +++ b/ct/hyperhdr.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/hyperion.sh b/ct/hyperion.sh index d04dced8c..3d4671da4 100644 --- a/ct/hyperion.sh +++ b/ct/hyperion.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get install -y hyperion &>/dev/null + $STD apt-get update + $STD apt-get install -y hyperion msg_ok "Updated Successfully" exit } diff --git a/ct/influxdb.sh b/ct/influxdb.sh index e4a295209..f4bfbbecb 100644 --- a/ct/influxdb.sh +++ b/ct/influxdb.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/inspircd.sh b/ct/inspircd.sh index bec679b03..1b55493d9 100644 --- a/ct/inspircd.sh +++ b/ct/inspircd.sh @@ -36,7 +36,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" cd /opt wget -q https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u1_amd64.deb - apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y &>/dev/nul + $STD apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y echo "${RELEASE}" >"/opt/${APP}_version.txt" msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/iobroker.sh b/ct/iobroker.sh index 570b64354..9a8591897 100644 --- a/ct/iobroker.sh +++ b/ct/iobroker.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/jellyfin.sh b/ct/jellyfin.sh index ac67f717d..4e22f6e84 100644 --- a/ct/jellyfin.sh +++ b/ct/jellyfin.sh @@ -28,9 +28,9 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null - apt-get -y --with-new-pkgs upgrade jellyfin jellyfin-server &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade + $STD apt-get -y --with-new-pkgs upgrade jellyfin jellyfin-server msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index f68d0e31c..3d44e6fba 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -35,8 +35,8 @@ function update_script() { msg_ok "Updating Node.js Repository" msg_info "Updating Packages" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updating Packages" msg_info "Cleaning up" @@ -53,10 +53,10 @@ function update_script() { if [ -z "$pnpm_current" ]; then msg_error "pnpm not found. Installing version $pnpm_desired..." - npm install -g pnpm@"$pnpm_desired" &>/dev/null + $STD npm install -g pnpm@"$pnpm_desired" elif ! node -e "const semver = require('semver'); process.exit(semver.satisfies('$pnpm_current', '$pnpm_desired') ? 0 : 1)" ; then msg_error "Updating pnpm from version $pnpm_current to $pnpm_desired..." - npm install -g pnpm@"$pnpm_desired" &>/dev/null + $STD npm install -g pnpm@"$pnpm_desired" else msg_ok "pnpm is already installed and satisfies version $pnpm_desired." fi @@ -70,9 +70,9 @@ function update_script() { systemctl stop jellyseerr rm -rf dist .next node_modules export CYPRESS_INSTALL_BINARY=0 - pnpm install --frozen-lockfile &>/dev/null + $STD pnpm install --frozen-lockfile export NODE_OPTIONS="--max-old-space-size=3072" - pnpm build &>/dev/null + $STD pnpm build cat </etc/systemd/system/jellyseerr.service [Unit] diff --git a/ct/jenkins.sh b/ct/jenkins.sh index 4d479a870..6341716ae 100644 --- a/ct/jenkins.sh +++ b/ct/jenkins.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/jupyternotebook.sh b/ct/jupyternotebook.sh index bbeb4ae0a..a40f3ac21 100644 --- a/ct/jupyternotebook.sh +++ b/ct/jupyternotebook.sh @@ -25,9 +25,9 @@ function update_script() { check_container_resources msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get install -y upgrade &>/dev/null - pip3 install jupyter --upgrade &>/dev/null + $STD apt-get update + $STD apt-get install -y upgrade + $STD pip3 install jupyter --upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/kavita.sh b/ct/kavita.sh index 7a704f864..2ffd78c83 100644 --- a/ct/kavita.sh +++ b/ct/kavita.sh @@ -30,7 +30,7 @@ function update_script() { msg_info "Updating $APP LXC" systemctl stop kavita RELEASE=$(curl -s https://api.github.com/repos/Kareadita/Kavita/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') - tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) --no-same-owner &>/dev/null + $STD tar -xvzf <(curl -fsSL https://github.com/Kareadita/Kavita/releases/download/$RELEASE/kavita-linux-x64.tar.gz) --no-same-owner rm -rf Kavita/config cp -r Kavita/* /opt/Kavita rm -rf Kavita diff --git a/ct/keycloak.sh b/ct/keycloak.sh index 96e14c1c3..437bf5c47 100644 --- a/ct/keycloak.sh +++ b/ct/keycloak.sh @@ -30,8 +30,8 @@ function update_script() { msg_info "Updating ${APP} LXC" msg_info "Updating packages" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Updating Keycloak to v$RELEASE" diff --git a/ct/kimai.sh b/ct/kimai.sh index 3a00ca4bf..8b03eafbd 100644 --- a/ct/kimai.sh +++ b/ct/kimai.sh @@ -41,8 +41,8 @@ function update_script() { mv kimai-${RELEASE} /opt/kimai mv /opt/.env /opt/kimai/.env cd /opt/kimai - composer install --no-dev --optimize-autoloader &>/dev/null - bin/console kimai:update &>/dev/null + $STD composer install --no-dev --optimize-autoloader + $STD bin/console kimai:update chown -R :www-data . chmod -R g+r . chmod -R g+rw var/ diff --git a/ct/koillection.sh b/ct/koillection.sh index 64dfde90d..31af04542 100644 --- a/ct/koillection.sh +++ b/ct/koillection.sh @@ -43,12 +43,12 @@ function update_script() { cp -r /opt/koillection-backup/.env.local /opt/koillection cp -r /opt/koillection-backup/public/uploads/. /opt/koillection/public/uploads/ export COMPOSER_ALLOW_SUPERUSER=1 - composer install --no-dev -o --no-interaction --classmap-authoritative &>/dev/null - php bin/console doctrine:migrations:migrate --no-interaction &>/dev/null - php bin/console app:translations:dump &>/dev/null + $STD composer install --no-dev -o --no-interaction --classmap-authoritative + $STD php bin/console doctrine:migrations:migrate --no-interaction + $STD php bin/console app:translations:dump cd assets/ - yarn install &>/dev/null - yarn build &>/dev/null + $STD yarn install + $STD yarn build chown -R www-data:www-data /opt/koillection/public/uploads echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/ct/kometa.sh b/ct/kometa.sh index 76d4adba3..757ad69db 100644 --- a/ct/kometa.sh +++ b/ct/kometa.sh @@ -46,7 +46,7 @@ function update_script() { mv Kometa-${RELEASE} /opt/kometa cd /opt/kometa rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED - pip install -r requirements.txt --ignore-installed &> /dev/null + $STD pip install -r requirements.txt --ignore-installed mkdir -p config/assets cp /opt/config.yml config/config.yml echo "${RELEASE}" >/opt/kometa_version.txt diff --git a/ct/komodo.sh b/ct/komodo.sh index e1a967057..56a140132 100644 --- a/ct/komodo.sh +++ b/ct/komodo.sh @@ -54,7 +54,7 @@ function update_script() { exit 1 } - docker compose -p komodo -f "/opt/komodo/$COMPOSE_FILE" --env-file /opt/komodo/compose.env up -d &>/dev/null + $STD docker compose -p komodo -f "/opt/komodo/$COMPOSE_FILE" --env-file /opt/komodo/compose.env up -d msg_ok "Updated ${APP}" } diff --git a/ct/kubo.sh b/ct/kubo.sh index 90bffaa77..84875d69a 100644 --- a/ct/kubo.sh +++ b/ct/kubo.sh @@ -30,8 +30,8 @@ function update_script() { RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-amd64.tar.gz" tar -xzf "kubo_${RELEASE}_linux-amd64.tar.gz" -C /usr/local systemctl restart ipfs.service diff --git a/ct/lazylibrarian.sh b/ct/lazylibrarian.sh index 5f020a486..0a3475026 100644 --- a/ct/lazylibrarian.sh +++ b/ct/lazylibrarian.sh @@ -32,7 +32,7 @@ function update_script() { msg_ok "LazyLibrarian Stopped" msg_info "Updating $APP LXC" - git -C /opt/LazyLibrarian pull origin master &>/dev/null + $STD git -C /opt/LazyLibrarian pull origin master msg_ok "Updated $APP LXC" msg_info "Starting LazyLibrarian" diff --git a/ct/lidarr.sh b/ct/lidarr.sh index a1c7592c5..0ce059c28 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index 732033d15..a224cd633 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -41,12 +41,12 @@ function update_script() { unzip -q ${RELEASE}.zip mv linkwarden-${RELEASE:1} /opt/linkwarden cd /opt/linkwarden - yarn &>/dev/null - npx playwright install-deps &>/dev/null - yarn playwright install &>/dev/null + $STD yarn + $STD npx playwright install-deps + $STD yarn playwright install cp /opt/.env /opt/linkwarden/.env - yarn build &>/dev/null - yarn prisma migrate deploy &>/dev/null + $STD yarn build + $STD yarn prisma migrate deploy echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" diff --git a/ct/listmonk.sh b/ct/listmonk.sh index e7b5d26ca..60b2acd80 100644 --- a/ct/listmonk.sh +++ b/ct/listmonk.sh @@ -42,7 +42,7 @@ function update_script() { tar -xzf "listmonk_${RELEASE}_linux_amd64.tar.gz" -C /opt/listmonk mv /opt/listmonk-backup/config.toml /opt/listmonk/config.toml mv /opt/listmonk-backup/uploads /opt/listmonk/uploads - /opt/listmonk/listmonk --upgrade --yes --config /opt/listmonk/config.toml &>/dev/null + $STD /opt/listmonk/listmonk --upgrade --yes --config /opt/listmonk/config.toml echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/ct/magicmirror.sh b/ct/magicmirror.sh index 02eca74e2..88ca03b1d 100644 --- a/ct/magicmirror.sh +++ b/ct/magicmirror.sh @@ -50,7 +50,7 @@ function update_script() { rm -rf /opt/magicmirror mv MagicMirror-${RELEASE} /opt/magicmirror cd /opt/magicmirror - npm run install-mm &> /dev/null + $STD npm run install-mm cp /opt/magicmirror-backup/config.js /opt/magicmirror/config/ if [[ -f /opt/magicmirror-backup/custom.css ]]; then cp /opt/magicmirror-backup/custom.css /opt/magicmirror/css/ diff --git a/ct/mariadb.sh b/ct/mariadb.sh index fecac4716..4ffd6657d 100644 --- a/ct/mariadb.sh +++ b/ct/mariadb.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/mattermost.sh b/ct/mattermost.sh index 485962870..910d00bd2 100644 --- a/ct/mattermost.sh +++ b/ct/mattermost.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/memos.sh b/ct/memos.sh index 0f9b05664..b19d72690 100644 --- a/ct/memos.sh +++ b/ct/memos.sh @@ -37,13 +37,13 @@ function update_script() { fi systemctl stop memos cd /opt/memos/web - pnpm i --frozen-lockfile &>/dev/null - pnpm build &>/dev/null + $STD pnpm i --frozen-lockfile + $STD pnpm build cd /opt/memos mkdir -p /opt/memos/server/dist cp -r web/dist/* /opt/memos/server/dist/ cp -r web/dist/* /opt/memos/server/router/frontend/dist/ - go build -o /opt/memos/memos -tags=embed bin/memos/main.go &>/dev/null + $STD go build -o /opt/memos/memos -tags=embed bin/memos/main.go systemctl start memos msg_ok "Updated $APP" exit diff --git a/ct/meshcentral.sh b/ct/meshcentral.sh index 6f8c2543d..621182dc7 100644 --- a/ct/meshcentral.sh +++ b/ct/meshcentral.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/metube.sh b/ct/metube.sh index deaf65798..42107309f 100644 --- a/ct/metube.sh +++ b/ct/metube.sh @@ -37,14 +37,14 @@ function update_script() { rm -rf metube_bak fi mv metube metube_bak - git clone https://github.com/alexta69/metube /opt/metube >/dev/null 2>&1 + $STD git clone https://github.com/alexta69/metube /opt/metube cd /opt/metube/ui - npm install >/dev/null 2>&1 - node_modules/.bin/ng build >/dev/null 2>&1 + $STD npm install + $STD node_modules/.bin/ng build cd /opt/metube cp /opt/metube_bak/.env /opt/metube/ - pip3 install pipenv >/dev/null 2>&1 - pipenv install >/dev/null 2>&1 + $STD pip3 install pipenv + $STD pipenv install if [ -d "/opt/metube_bak" ]; then rm -rf /opt/metube_bak diff --git a/ct/mongodb.sh b/ct/mongodb.sh index 392da311e..96f2f5368 100644 --- a/ct/mongodb.sh +++ b/ct/mongodb.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/monica.sh b/ct/monica.sh index 3a43f7e1a..7c84f2197 100644 --- a/ct/monica.sh +++ b/ct/monica.sh @@ -42,10 +42,10 @@ function update_script() { cd /opt/monica/ cp -r /opt/monica-backup/.env /opt/monica cp -r /opt/monica-backup/storage/* /opt/monica/storage/ - composer install --no-interaction --no-dev &>/dev/null - yarn install &>/dev/null - yarn run production &>/dev/null - php artisan monica:update --force &>/dev/null + $STD composer install --no-interaction --no-dev + $STD yarn install + $STD yarn run production + $STD php artisan monica:update --force chown -R www-data:www-data /opt/monica chmod -R 775 /opt/monica/storage echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/ct/motioneye.sh b/ct/motioneye.sh index 89904cfcc..2cf0490d0 100644 --- a/ct/motioneye.sh +++ b/ct/motioneye.sh @@ -28,7 +28,7 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - pip install motioneye --upgrade &>/dev/null + $STD pip install motioneye --upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/mqtt.sh b/ct/mqtt.sh index 8de9cba56..4594fa8d6 100644 --- a/ct/mqtt.sh +++ b/ct/mqtt.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/myspeed.sh b/ct/myspeed.sh index 794436921..1d6cd221d 100644 --- a/ct/myspeed.sh +++ b/ct/myspeed.sh @@ -41,7 +41,7 @@ function update_script() { wget -q https://github.com/gnmyt/myspeed/releases/download/v$RELEASE/MySpeed-$RELEASE.zip unzip -q MySpeed-$RELEASE.zip -d myspeed cd myspeed - npm install >/dev/null 2>&1 + $STD npm install echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" diff --git a/ct/mysql.sh b/ct/mysql.sh index 387c7db8f..c35ac114f 100644 --- a/ct/mysql.sh +++ b/ct/mysql.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/n8n.sh b/ct/n8n.sh index 38b804d25..06bc93428 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -30,12 +30,12 @@ function update_script() { if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 + $STD apt-get install -y npm echo "Installed NPM..." fi fi msg_info "Updating ${APP} LXC" - npm update -g n8n &>/dev/null + $STD npm update -g n8n systemctl restart n8n msg_ok "Updated Successfully" exit diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 32e280d0e..a271f556a 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -35,7 +35,7 @@ function update_script() { msg_info "Updating to v${RELEASE}" cd /opt wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_amd64.tar.gz -O Navidrome.tar.gz - tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null + $STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ chmod +x /opt/navidrome/navidrome msg_ok "Updated ${APP}" rm -rf /opt/Navidrome.tar.gz diff --git a/ct/neo4j.sh b/ct/neo4j.sh index ed981d2d4..3049d9e70 100644 --- a/ct/neo4j.sh +++ b/ct/neo4j.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/netbox.sh b/ct/netbox.sh index 219a0021a..6db15b373 100644 --- a/ct/netbox.sh +++ b/ct/netbox.sh @@ -56,7 +56,7 @@ function update_script() { cp -r /opt/netbox-backup/netbox/netbox/ldap_config.py /opt/netbox/netbox/netbox/ fi - /opt/netbox/upgrade.sh &>/dev/null + $STD /opt/netbox/upgrade.sh echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/ct/nextcloudpi.sh b/ct/nextcloudpi.sh index dae1463ee..687cf46dd 100644 --- a/ct/nextcloudpi.sh +++ b/ct/nextcloudpi.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/nextpvr.sh b/ct/nextpvr.sh index c18cdb4ec..76065b975 100644 --- a/ct/nextpvr.sh +++ b/ct/nextpvr.sh @@ -33,14 +33,14 @@ function update_script() { msg_ok "Stopped ${APP}" msg_info "Updating LXC packages" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated LXC packages" msg_info "Updating ${APP}" cd /opt wget -q https://nextpvr.com/nextpvr-helper.deb - dpkg -i nextpvr-helper.deb &>/dev/null + $STD dpkg -i nextpvr-helper.deb msg_ok "Updated ${APP}" msg_info "Starting ${APP}" diff --git a/ct/nginxproxymanager.sh b/ct/nginxproxymanager.sh index c44065b9d..08d359944 100644 --- a/ct/nginxproxymanager.sh +++ b/ct/nginxproxymanager.sh @@ -30,7 +30,7 @@ function update_script() { if ! command -v pnpm &> /dev/null; then msg_info "Installing pnpm" #export NODE_OPTIONS=--openssl-legacy-provider - npm install -g pnpm@8.15 &>/dev/null + $STD npm install -g pnpm@8.15 msg_ok "Installed pnpm" fi RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | @@ -47,11 +47,11 @@ function update_script() { /etc/nginx \ /var/log/nginx \ /var/lib/nginx \ - /var/cache/nginx &>/dev/null + $STD /var/cache/nginx msg_ok "Cleaned Old Files" msg_info "Downloading NPM v${RELEASE}" - wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz &>/dev/null + $STD wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz cd nginx-proxy-manager-${RELEASE} msg_ok "Downloaded NPM v${RELEASE}" @@ -96,25 +96,25 @@ function update_script() { chown root /tmp/nginx echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then - openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null + $STD openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem fi mkdir -p /app/global /app/frontend/images cp -r backend/* /app cp -r global/* /app/global - python3 -m pip install --no-cache-dir certbot-dns-cloudflare &>/dev/null + $STD python3 -m pip install --no-cache-dir certbot-dns-cloudflare msg_ok "Setup Enviroment" msg_info "Building Frontend" cd ./frontend - pnpm install &>/dev/null - pnpm upgrade &>/dev/null - pnpm run build &>/dev/null + $STD pnpm install + $STD pnpm upgrade + $STD pnpm run build cp -r dist/* /app/frontend cp -r app-images/* /app/frontend/images msg_ok "Built Frontend" msg_info "Initializing Backend" - rm -rf /app/config/default.json &>/dev/null + $STD rm -rf /app/config/default.json if [ ! -f /app/config/production.json ]; then cat <<'EOF' >/app/config/production.json { @@ -131,7 +131,7 @@ function update_script() { EOF fi cd /app - pnpm install &>/dev/null + $STD pnpm install msg_ok "Initialized Backend" msg_info "Starting Services" diff --git a/ct/node-red.sh b/ct/node-red.sh index 7b8713fb6..8321d7d6a 100644 --- a/ct/node-red.sh +++ b/ct/node-red.sh @@ -35,7 +35,7 @@ function update_script() { if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then msg_info "Installing NPM" - apt-get install -y npm >/dev/null 2>&1 + $STD apt-get install -y npm msg_ok "Installed NPM" fi fi @@ -44,7 +44,7 @@ function update_script() { msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" - npm install -g --unsafe-perm node-red &>/dev/null + $STD npm install -g --unsafe-perm node-red msg_ok "Updated ${APP}" msg_info "Starting ${APP}" @@ -84,7 +84,7 @@ function update_script() { msg_info "Installing ${THEME} Theme" cd /root/.node-red sed -i 's|// theme: ".*",|theme: "",|g' /root/.node-red/settings.js - npm install @node-red-contrib-themes/theme-collection &>/dev/null + $STD npm install @node-red-contrib-themes/theme-collection sed -i "{s/theme: ".*"/theme: '${THEME}',/g}" /root/.node-red/settings.js systemctl restart nodered msg_ok "Installed ${THEME} Theme" diff --git a/ct/nodebb.sh b/ct/nodebb.sh index 7317abe7f..4b79273a8 100644 --- a/ct/nodebb.sh +++ b/ct/nodebb.sh @@ -39,7 +39,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" cd /opt/nodebb - ./nodebb upgrade >/dev/null 2>&1 + $STD ./nodebb upgrade echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/notifiarr.sh b/ct/notifiarr.sh index e732b81cc..0dd171dec 100644 --- a/ct/notifiarr.sh +++ b/ct/notifiarr.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP" exit } diff --git a/ct/ntfy.sh b/ct/ntfy.sh index 78ef16ab4..81bfcec4d 100644 --- a/ct/ntfy.sh +++ b/ct/ntfy.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/nxwitness.sh b/ct/nxwitness.sh index 35fb307a8..ebcbe69cd 100644 --- a/ct/nxwitness.sh +++ b/ct/nxwitness.sh @@ -41,7 +41,7 @@ function update_script() { wget -q "$DOWNLOAD_URL" -O "nxwitness-server-$RELEASE-linux_x64.deb" export DEBIAN_FRONTEND=noninteractive export DEBCONF_NOWARNINGS=yes - dpkg -i nxwitness-server-$RELEASE-linux_x64.deb >/dev/null 2>&1 + $STD dpkg -i nxwitness-server-$RELEASE-linux_x64.deb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/ct/nzbget.sh b/ct/nzbget.sh index a5f86aeec..57279e4ec 100644 --- a/ct/nzbget.sh +++ b/ct/nzbget.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/octoprint.sh b/ct/octoprint.sh index 25fd271f3..f701fd6be 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -33,7 +33,7 @@ function update_script() { msg_info "Updating OctoPrint" source /opt/octoprint/bin/activate - pip3 install octoprint --upgrade &>/dev/null + $STD pip3 install octoprint --upgrade msg_ok "Updated OctoPrint" msg_info "Starting OctoPrint" diff --git a/ct/ollama.sh b/ct/ollama.sh index ecae89545..7604c22b8 100644 --- a/ct/ollama.sh +++ b/ct/ollama.sh @@ -27,8 +27,8 @@ function update_script() { exit fi msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/omv.sh b/ct/omv.sh index 9b2641445..7a34ae6c6 100644 --- a/ct/omv.sh +++ b/ct/omv.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/onedev.sh b/ct/onedev.sh index 16db56480..e1f706d06 100644 --- a/ct/onedev.sh +++ b/ct/onedev.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt wget -q https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz tar -xzf onedev-latest.tar.gz - /opt/onedev-latest/bin/upgrade.sh /opt/onedev >/dev/null + $STD /opt/onedev-latest/bin/upgrade.sh /opt/onedev RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2) echo "${RELEASE}" >"/opt/${APP}_version.txt" msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/opengist.sh b/ct/opengist.sh index 81f15e5a0..7b946bc16 100644 --- a/ct/opengist.sh +++ b/ct/opengist.sh @@ -34,8 +34,8 @@ function update_script() { msg_ok "Stopped Service" msg_info "Updating ${APP} to v${RELEASE}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade cd /opt mv /opt/opengist /opt/opengist-backup wget -q "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz" @@ -52,8 +52,8 @@ function update_script() { msg_info "Cleaning up" rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz rm -rf /opt/opengist-backup - apt-get -y autoremove &>/dev/null - apt-get -y autoclean &>/dev/null + $STD apt-get -y autoremove + $STD apt-get -y autoclean msg_ok "Cleaned" msg_ok "Updated Successfully" else diff --git a/ct/openhab.sh b/ct/openhab.sh index 43aab08ac..24dc9d540 100644 --- a/ct/openhab.sh +++ b/ct/openhab.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/openwebui.sh b/ct/openwebui.sh index d140710da..17fff9d8b 100644 --- a/ct/openwebui.sh +++ b/ct/openwebui.sh @@ -35,11 +35,11 @@ function update_script() { exit fi systemctl stop open-webui.service - npm install &>/dev/null + $STD npm install export NODE_OPTIONS="--max-old-space-size=3584" - npm run build &>/dev/null + $STD npm run build cd ./backend - pip install -r requirements.txt -U &>/dev/null + $STD pip install -r requirements.txt -U systemctl start open-webui.service msg_ok "Updated Successfully" exit diff --git a/ct/overseerr.sh b/ct/overseerr.sh index 2e14369f4..a408543f5 100644 --- a/ct/overseerr.sh +++ b/ct/overseerr.sh @@ -31,14 +31,14 @@ function update_script() { systemctl stop overseerr cd /opt/overseerr output=$(git pull) - git pull &>/dev/null + $STD git pull if echo "$output" | grep -q "Already up to date."; then msg_ok " $APP is already up to date." systemctl start overseerr exit fi - yarn install &>/dev/null - yarn build &>/dev/null + $STD yarn install + $STD yarn build systemctl start overseerr msg_ok "Updated $APP" exit diff --git a/ct/owncast.sh b/ct/owncast.sh index a69accc03..c4f4660bd 100644 --- a/ct/owncast.sh +++ b/ct/owncast.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/paperless-ai.sh b/ct/paperless-ai.sh index c4e02d1d5..60cd99faf 100644 --- a/ct/paperless-ai.sh +++ b/ct/paperless-ai.sh @@ -42,7 +42,7 @@ function update_script() { mkdir -p /opt/paperless-ai/data cp -a /opt/paperless-ai_bak/data/. /opt/paperless-ai/data/ cd /opt/paperless-ai - npm install &>/dev/null + $STD npm install echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index 2a62c7b59..df89acd28 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -41,9 +41,9 @@ function update_script() { wget -q https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz tar -xzf ghostscript-10.04.0.tar.gz cd ghostscript-10.04.0 - ./configure &>/dev/null - make &>/dev/null - sudo make install &>/dev/null + $STD ./configure + $STD make + $STD sudo make install rm -rf /tmp/ghostscript* msg_ok "Ghostscript updated to 10.04.0" fi @@ -58,9 +58,9 @@ function update_script() { cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r paperless-ngx/* /opt/paperless/ cd /opt/paperless - pip install -r requirements.txt &>/dev/null + $STD pip install -r requirements.txt cd /opt/paperless/src - /usr/bin/python3 manage.py migrate &>/dev/null + $STD /usr/bin/python3 manage.py migrate echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated to ${RELEASE}" diff --git a/ct/part-db.sh b/ct/part-db.sh index d7f114570..a2df14f21 100644 --- a/ct/part-db.sh +++ b/ct/part-db.sh @@ -46,11 +46,11 @@ function update_script() { cp -r "/opt/partdb-backup/config/banner.md" /opt/partdb/config/ export COMPOSER_ALLOW_SUPERUSER=1 - composer install --no-dev -o --no-interaction &>/dev/null - yarn install &>/dev/null - yarn build &>/dev/null - php bin/console cache:clear &>/dev/null - php bin/console doctrine:migrations:migrate -n &>/dev/null + $STD composer install --no-dev -o --no-interaction + $STD yarn install + $STD yarn build + $STD php bin/console cache:clear + $STD php bin/console doctrine:migrations:migrate -n chown -R www-data:www-data /opt/partdb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to v${RELEASE}" diff --git a/ct/paymenter.sh b/ct/paymenter.sh index fbdf78466..9bab05f48 100644 --- a/ct/paymenter.sh +++ b/ct/paymenter.sh @@ -33,7 +33,7 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" echo "${RELEASE}" >/opt/${APP}_version.txt cd /opt/paymenter - php artisan p:upgrade --no-interaction &>/dev/null + $STD php artisan p:upgrade --no-interaction msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}." diff --git a/ct/peanut.sh b/ct/peanut.sh index fd59ce1e2..fc18a49a4 100644 --- a/ct/peanut.sh +++ b/ct/peanut.sh @@ -35,8 +35,8 @@ function update_script() { tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1 rm peanut.tar.gz cd /opt/peanut - pnpm i &>/dev/null - pnpm run build &>/dev/null + $STD pnpm i + $STD pnpm run build cp -r .next/static .next/standalone/.next/ mkdir -p /opt/peanut/.next/standalone/config ln -sf /etc/peanut/settings.yml /opt/peanut/.next/standalone/config/settings.yml diff --git a/ct/pf2etools.sh b/ct/pf2etools.sh index 364561e0c..c4f6de890 100644 --- a/ct/pf2etools.sh +++ b/ct/pf2etools.sh @@ -32,8 +32,8 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f "/opt/${APP}_version.txt" ]]; then msg_info "Updating System" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated System" msg_info "Updating ${APP}" @@ -43,8 +43,8 @@ function update_script() { rm -rf "/opt/${APP}" mv ${APP}-${RELEASE:1} /opt/${APP} cd /opt/Pf2eTools - npm install &>/dev/null - npm run build &>/dev/null + $STD npm install + $STD npm run build chown -R www-data: "/opt/${APP}" chmod -R 755 "/opt/${APP}" echo "${RELEASE}" >"/opt/${APP}_version.txt" diff --git a/ct/photoprism.sh b/ct/photoprism.sh index 9e946fdc3..0187e06d9 100644 --- a/ct/photoprism.sh +++ b/ct/photoprism.sh @@ -32,7 +32,7 @@ function update_script() { msg_ok "Stopped PhotoPrism" msg_info "Updating PhotoPrism" - apt-get install -y libvips42 &>/dev/null + $STD apt-get install -y libvips42 wget -q -cO - https://dl.photoprism.app/pkg/linux/amd64.tar.gz | tar -xzf - -C /opt/photoprism --strip-components=1 msg_ok "Updated PhotoPrism" diff --git a/ct/pingvin.sh b/ct/pingvin.sh index 2f34972cb..0283015ae 100644 --- a/ct/pingvin.sh +++ b/ct/pingvin.sh @@ -42,11 +42,11 @@ function update_script() { cp -rf pingvin-share-${RELEASE}/* /opt/pingvin-share cd /opt/pingvin-share cd backend - npm install &>/dev/null - npm run build &>/dev/null + $STD npm install + $STD npm run build cd ../frontend - npm install &>/dev/null - npm run build &>/dev/null + $STD npm install + $STD npm run build echo "${RELEASE}" >"/opt/pingvin_version.txt" rm -rf /opt/v${RELEASE}.zip rm -rf /opt/pingvin-share-${RELEASE} diff --git a/ct/plex.sh b/ct/plex.sh index e22660859..f742e127d 100644 --- a/ct/plex.sh +++ b/ct/plex.sh @@ -33,8 +33,8 @@ function update_script() { 3>&1 1>&2 2>&3) if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit fi diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index ceb3856c4..0f7b3ea3c 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -33,8 +33,8 @@ check_container_resources if [ "$UPD" == "1" ]; then msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" msg_info "Updating All Containers\n" @@ -54,10 +54,10 @@ if [ "$UPD" == "1" ]; then fi if [ "$UPD" == "2" ]; then msg_info "Installing Home Assistant Community Store (HACS)" - apt update &>/dev/null - apt install unzip &>/dev/null + $STD apt update + $STD apt install unzip cd /var/lib/containers/storage/volumes/hass_config/_data - bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null + $STD bash <(curl -fsSL https://get.hacs.xyz) msg_ok "Installed Home Assistant Community Store (HACS)" echo -e "\n Reboot Home Assistant and clear browser cache then Add HACS integration.\n" exit @@ -65,10 +65,10 @@ fi if [ "$UPD" == "3" ]; then IP=$(hostname -I | awk '{print $1}') msg_info "Installing FileBrowser" - curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash &>/dev/null - filebrowser config init -a '0.0.0.0' &>/dev/null - filebrowser config set -a '0.0.0.0' &>/dev/null - filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null + $STD curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash + $STD filebrowser config init -a '0.0.0.0' + $STD filebrowser config set -a '0.0.0.0' + $STD filebrowser users add admin helper-scripts.com --perm.admin msg_ok "Installed FileBrowser" msg_info "Creating Service" @@ -83,7 +83,7 @@ if [ "$UPD" == "3" ]; then [Install] WantedBy=default.target" >$service_path - systemctl enable --now filebrowser.service &>/dev/null + $STD systemctl enable --now filebrowser.service msg_ok "Created Service" msg_ok "Completed Successfully!\n" diff --git a/ct/podman.sh b/ct/podman.sh index 284f0ed58..cf885e062 100644 --- a/ct/podman.sh +++ b/ct/podman.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/postgresql.sh b/ct/postgresql.sh index 850a8120b..fb79e5f59 100644 --- a/ct/postgresql.sh +++ b/ct/postgresql.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/prometheus-pve-exporter.sh b/ct/prometheus-pve-exporter.sh index 69b10a582..4987f816a 100644 --- a/ct/prometheus-pve-exporter.sh +++ b/ct/prometheus-pve-exporter.sh @@ -32,7 +32,7 @@ function update_script() { msg_ok "Stopped ${APP}" msg_info "Updating ${APP}" - pip install prometheus-pve-exporter --default-timeout=300 --upgrade --root-user-action=ignore &>/dev/null + $STD pip install prometheus-pve-exporter --default-timeout=300 --upgrade --root-user-action=ignore msg_ok "Updated ${APP}" msg_info "Starting ${APP}" diff --git a/ct/proxmox-backup-server.sh b/ct/proxmox-backup-server.sh index 671a45826..e51a68d98 100644 --- a/ct/proxmox-backup-server.sh +++ b/ct/proxmox-backup-server.sh @@ -25,8 +25,8 @@ function update_script() { check_container_resources if [[ ! -e /usr/sbin/proxmox-backup-manager ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/proxmox-datacenter-manager.sh b/ct/proxmox-datacenter-manager.sh index afdbbdb6f..ea3627bad 100644 --- a/ct/proxmox-datacenter-manager.sh +++ b/ct/proxmox-datacenter-manager.sh @@ -25,8 +25,8 @@ function update_script() { check_container_resources if [[ ! -e /usr/sbin/proxmox-datacenter-manager-admin ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/proxmox-mail-gateway.sh b/ct/proxmox-mail-gateway.sh index 654bbc4b1..30b1656a3 100644 --- a/ct/proxmox-mail-gateway.sh +++ b/ct/proxmox-mail-gateway.sh @@ -25,8 +25,8 @@ function update_script() { check_container_resources if [[ ! -e /usr/bin/pmgproxy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP}" exit } diff --git a/ct/ps5-mqtt.sh b/ct/ps5-mqtt.sh index 3afe55565..8978e4ee9 100644 --- a/ct/ps5-mqtt.sh +++ b/ct/ps5-mqtt.sh @@ -47,8 +47,8 @@ function update_script() { msg_info "Building new PS5-MQTT version" cd /opt/ps5-mqtt/ps5-mqtt/ - npm install &>/dev/null - npm run build &>/dev/null + $STD npm install + $STD npm run build msg_ok "Built new PS5-MQTT version" msg_info "Starting service" diff --git a/ct/qbittorrent.sh b/ct/qbittorrent.sh index 393847500..5b4fa0d48 100644 --- a/ct/qbittorrent.sh +++ b/ct/qbittorrent.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/rabbitmq.sh b/ct/rabbitmq.sh index a5a6b8967..317fc0e63 100644 --- a/ct/rabbitmq.sh +++ b/ct/rabbitmq.sh @@ -32,7 +32,7 @@ function update_script() { msg_ok "Stopped ${APP} Service" msg_info "Updating..." - apt install --only-upgrade rabbitmq-server &>/dev/null + $STD apt install --only-upgrade rabbitmq-server msg_ok "Update Successfully" msg_info "Starting ${APP}" diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index 1d5ea16ae..1737e5b81 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -33,8 +33,8 @@ function update_script() { msg_info "Updating ${APP}" if dpkg-query -W dotnet-sdk-8.0 >/dev/null 2>&1; then - apt-get remove --purge -y dotnet-sdk-8.0 &>/dev/null - apt-get install -y dotnet-sdk-9.0 &>/dev/null + $STD apt-get remove --purge -y dotnet-sdk-8.0 + $STD apt-get install -y dotnet-sdk-9.0 fi mkdir -p rdtc-backup cp -R /opt/rdtc/appsettings.json rdtc-backup/ diff --git a/ct/readarr.sh b/ct/readarr.sh index 357061eb6..0bb63efe6 100644 --- a/ct/readarr.sh +++ b/ct/readarr.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/rtsptoweb.sh b/ct/rtsptoweb.sh index 0534068d8..98cb65b6a 100644 --- a/ct/rtsptoweb.sh +++ b/ct/rtsptoweb.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/rustdeskserver.sh b/ct/rustdeskserver.sh index b98543283..16e306126 100644 --- a/ct/rustdeskserver.sh +++ b/ct/rustdeskserver.sh @@ -40,7 +40,7 @@ function update_script() { wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbr_${RELEASE}_amd64.deb" -P $TEMPDIR wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-hbbs_${RELEASE}_amd64.deb" -P $TEMPDIR wget -q "https://github.com/rustdesk/rustdesk-server/releases/download/${RELEASE}/rustdesk-server-utils_${RELEASE}_amd64.deb" -P $TEMPDIR - dpkg -i $TEMPDIR/*.deb &> /dev/null + $STD dpkg -i $TEMPDIR/*.deb msg_ok "Updated $APP to v${RELEASE}" msg_info "Cleaning Up" diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 27f9ccf5d..00a5343fd 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -31,11 +31,11 @@ function update_script() { if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating $APP to ${RELEASE}" systemctl stop sabnzbd.service - tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) &>/dev/null - \cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd &>/dev/null + $STD tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) + $STD \cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd rm -rf SABnzbd-${RELEASE} cd /opt/sabnzbd - python3 -m pip install -r requirements.txt &>/dev/null + $STD python3 -m pip install -r requirements.txt echo "${RELEASE}" >/opt/${APP}_version.txt systemctl start sabnzbd.service msg_ok "Updated ${APP} to ${RELEASE}" diff --git a/ct/seelf.sh b/ct/seelf.sh index 481d6287f..40d0a47a0 100644 --- a/ct/seelf.sh +++ b/ct/seelf.sh @@ -44,7 +44,7 @@ function update_script() { tar -xzf v${RELEASE}.tar.gz cp -r seelf-${RELEASE}/ /opt/seelf cd /opt/seelf - make build &> /dev/null + $STD make build msg_ok "Updated $APP to v${RELEASE}" msg_info "Starting $APP" diff --git a/ct/semaphore.sh b/ct/semaphore.sh index a4d969fe6..2dcf880fc 100644 --- a/ct/semaphore.sh +++ b/ct/semaphore.sh @@ -37,7 +37,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" cd /opt wget -q https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_amd64.deb - dpkg -i semaphore_${RELEASE}_linux_amd64.deb &>/dev/null + $STD dpkg -i semaphore_${RELEASE}_linux_amd64.deb echo "${RELEASE}" >"/opt/${APP}_version.txt" msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/sftpgo.sh b/ct/sftpgo.sh index 171e8f46a..b1cb00553 100644 --- a/ct/sftpgo.sh +++ b/ct/sftpgo.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/smokeping.sh b/ct/smokeping.sh index 4f2b9f247..848f8004e 100644 --- a/ct/smokeping.sh +++ b/ct/smokeping.sh @@ -29,8 +29,8 @@ function update_script() { fi msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/snipeit.sh b/ct/snipeit.sh index 0d52cc6af..bfc6ad32d 100644 --- a/ct/snipeit.sh +++ b/ct/snipeit.sh @@ -30,11 +30,11 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} to v${RELEASE}" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade mv /opt/snipe-it /opt/snipe-it-backup cd /opt - wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" &>/dev/null + $STD wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip mv snipe-it-${RELEASE} /opt/snipe-it cp /opt/snipe-it-backup/.env /opt/snipe-it/.env @@ -42,13 +42,13 @@ function update_script() { cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads cd /opt/snipe-it/ export COMPOSER_ALLOW_SUPERUSER=1 - composer install --no-dev --prefer-source &>/dev/null - composer dump-autoload &>/dev/null - php artisan migrate --force &>/dev/null - php artisan config:clear &>/dev/null - php artisan route:clear &>/dev/null - php artisan cache:clear &>/dev/null - php artisan view:clear &>/dev/null + $STD composer install --no-dev --prefer-source + $STD composer dump-autoload + $STD php artisan migrate --force + $STD php artisan config:clear + $STD php artisan route:clear + $STD php artisan cache:clear + $STD php artisan view:clear chown -R www-data: /opt/snipe-it chmod -R 755 /opt/snipe-it rm -rf /opt/v${RELEASE}.zip diff --git a/ct/spoolman.sh b/ct/spoolman.sh index 3bf555326..a587e360e 100644 --- a/ct/spoolman.sh +++ b/ct/spoolman.sh @@ -41,7 +41,7 @@ function update_script() { wget -q https://github.com/Donkie/Spoolman/releases/download/${RELEASE}/spoolman.zip unzip -q spoolman.zip -d spoolman cd spoolman - pip3 install -r requirements.txt >/dev/null 2>&1 + $STD pip3 install -r requirements.txt wget -q https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example -O .env echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" diff --git a/ct/sqlserver2022.sh b/ct/sqlserver2022.sh index e5cd23c6f..bf5d2c74d 100644 --- a/ct/sqlserver2022.sh +++ b/ct/sqlserver2022.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/stirling-pdf.sh b/ct/stirling-pdf.sh index d15f5edcf..91aa7bae9 100644 --- a/ct/stirling-pdf.sh +++ b/ct/stirling-pdf.sh @@ -30,15 +30,15 @@ function update_script() { msg_info "Updating ${APP}" systemctl stop stirlingpdf if [[ -n $(dpkg -l | grep -w ocrmypdf) ]] && [[ -z $(dpkg -l | grep -w qpdf) ]]; then - apt-get remove -y ocrmypdf &>/dev/null - apt-get install -y qpdf &>/dev/null + $STD apt-get remove -y ocrmypdf + $STD apt-get install -y qpdf fi RELEASE=$(curl -s https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') wget -q https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v$RELEASE.tar.gz tar -xzf v$RELEASE.tar.gz cd Stirling-PDF-$RELEASE chmod +x ./gradlew - ./gradlew build &>/dev/null + $STD ./gradlew build cp -r ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ cp -r scripts /opt/Stirling-PDF/ cd ~ diff --git a/ct/syncthing.sh b/ct/syncthing.sh index 5a41cc332..b7497921e 100644 --- a/ct/syncthing.sh +++ b/ct/syncthing.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/tandoor.sh b/ct/tandoor.sh index edf1d00a7..0508c759a 100644 --- a/ct/tandoor.sh +++ b/ct/tandoor.sh @@ -33,15 +33,15 @@ function update_script() { msg_info "Updating ${APP} (Patience)" export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs) cd /opt/tandoor/ - pip3 install -r requirements.txt >/dev/null 2>&1 - /usr/bin/python3 /opt/tandoor/manage.py migrate >/dev/null 2>&1 - /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input >/dev/null 2>&1 - /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse >/dev/null 2>&1 + $STD pip3 install -r requirements.txt + $STD /usr/bin/python3 /opt/tandoor/manage.py migrate + $STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input + $STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse cd /opt/tandoor/vue - yarn install >/dev/null 2>&1 - yarn build >/dev/null 2>&1 + $STD yarn install + $STD yarn build cd /opt/tandoor - python3 version.py &>/dev/null + $STD python3 version.py systemctl restart gunicorn_tandoor msg_ok "Updated ${APP}" fi diff --git a/ct/tasmoadmin.sh b/ct/tasmoadmin.sh index 402475ac1..f091c58ef 100644 --- a/ct/tasmoadmin.sh +++ b/ct/tasmoadmin.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/tasmocompiler.sh b/ct/tasmocompiler.sh index 275b31fa0..6bbc0b498 100644 --- a/ct/tasmocompiler.sh +++ b/ct/tasmocompiler.sh @@ -40,10 +40,10 @@ function update_script() { tar xzf v${RELEASE}.tar.gz mv tasmocompiler-${RELEASE}/ /opt/tasmocompiler/ cd /opt/tasmocompiler - yarn install &> /dev/null + $STD yarn install export NODE_OPTIONS=--openssl-legacy-provider - npm i &> /dev/null - yarn build &> /dev/null + $STD npm i + $STD yarn build msg_ok "Updated $APP to v${RELEASE}" msg_info "Starting $APP" systemctl start tasmocompiler diff --git a/ct/tautulli.sh b/ct/tautulli.sh index f5574d668..8ed7bb49b 100644 --- a/ct/tautulli.sh +++ b/ct/tautulli.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/tdarr.sh b/ct/tdarr.sh index b6b70c0f2..1dcc8eb67 100644 --- a/ct/tdarr.sh +++ b/ct/tdarr.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/technitiumdns.sh b/ct/technitiumdns.sh index cda740e2c..483d5eb34 100644 --- a/ct/technitiumdns.sh +++ b/ct/technitiumdns.sh @@ -31,12 +31,12 @@ function update_script() { if ! dpkg -s aspnetcore-runtime-8.0 >/dev/null 2>&1; then wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb - dpkg -i packages-microsoft-prod.deb &>/dev/null - apt-get update &>/dev/null - apt-get install -y aspnetcore-runtime-8.0 &>/dev/null + $STD dpkg -i packages-microsoft-prod.deb + $STD apt-get update + $STD apt-get install -y aspnetcore-runtime-8.0 rm packages-microsoft-prod.deb fi - bash <(curl -fsSL https://download.technitium.com/dns/install.sh) &>/dev/null + $STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh) msg_ok "Updated Successfully" exit } diff --git a/ct/the-lounge.sh b/ct/the-lounge.sh index 6a0497b59..a15b3be5a 100644 --- a/ct/the-lounge.sh +++ b/ct/the-lounge.sh @@ -34,7 +34,7 @@ function update_script() { msg_ok "Stopped Service" msg_info "Updating ${APP} to v${RELEASE}" - apt-get install --only-upgrade nodejs &>/dev/null + $STD apt-get install --only-upgrade nodejs cd /opt wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb dpkg -i ./thelounge_${RELEASE}_all.deb diff --git a/ct/tianji.sh b/ct/tianji.sh index b0551f09a..8a1fca82a 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -41,15 +41,15 @@ function update_script() { mv tianji-${RELEASE} /opt/tianji cd tianji export NODE_OPTIONS="--max_old_space_size=4096" - pnpm install --filter @tianji/client... --config.dedupe-peer-dependents=false --frozen-lockfile >/dev/null 2>&1 - pnpm build:static >/dev/null 2>&1 - pnpm install --filter @tianji/server... --config.dedupe-peer-dependents=false >/dev/null 2>&1 - mkdir -p ./src/server/public >/dev/null 2>&1 - cp -r ./geo ./src/server/public >/dev/null 2>&1 - pnpm build:server >/dev/null 2>&1 + $STD pnpm install --filter @tianji/client... --config.dedupe-peer-dependents=false --frozen-lockfile + $STD pnpm build:static + $STD pnpm install --filter @tianji/server... --config.dedupe-peer-dependents=false + mkdir -p ./src/server/public + cp -r ./geo ./src/server/public + $STD pnpm build:server mv /opt/.env /opt/tianji/src/server/.env cd src/server - pnpm db:migrate:apply >/dev/null 2>&1 + $STD pnpm db:migrate:apply echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to v${RELEASE}" diff --git a/ct/transmission.sh b/ct/transmission.sh index 332a6042d..a1bf17919 100644 --- a/ct/transmission.sh +++ b/ct/transmission.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/typesense.sh b/ct/typesense.sh index c2772a9cb..677f8107c 100644 --- a/ct/typesense.sh +++ b/ct/typesense.sh @@ -30,8 +30,8 @@ function update_script() { RELEASE=$(curl -s https://api.github.com/repos/typesense/typesense/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" diff --git a/ct/ubuntu.sh b/ct/ubuntu.sh index 6a170c3cb..c49f7eda4 100644 --- a/ct/ubuntu.sh +++ b/ct/ubuntu.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/umbrel.sh b/ct/umbrel.sh index eff5cccf9..92878d5f2 100644 --- a/ct/umbrel.sh +++ b/ct/umbrel.sh @@ -24,8 +24,8 @@ function update_script() { check_container_storage check_container_resources msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/unbound.sh b/ct/unbound.sh index 0a0402b26..23626bb2b 100644 --- a/ct/unbound.sh +++ b/ct/unbound.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/unifi.sh b/ct/unifi.sh index ad5707e20..fe36c5798 100644 --- a/ct/unifi.sh +++ b/ct/unifi.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP}" - apt-get update --allow-releaseinfo-change &>/dev/null - apt-get install -y unifi &>/dev/null + $STD apt-get update --allow-releaseinfo-change + $STD apt-get install -y unifi msg_ok "Updated Successfully" exit } diff --git a/ct/unmanic.sh b/ct/unmanic.sh index 267811b68..dc74a952f 100644 --- a/ct/unmanic.sh +++ b/ct/unmanic.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - pip3 install -U unmanic &>/dev/null - apt-get -y upgrade &>/dev/null + $STD pip3 install -U unmanic + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/uptimekuma.sh b/ct/uptimekuma.sh index d2ce116f6..b13bccc06 100644 --- a/ct/uptimekuma.sh +++ b/ct/uptimekuma.sh @@ -30,29 +30,29 @@ function update_script() { if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then if ! command -v npm >/dev/null 2>&1; then echo "Installing NPM..." - apt-get install -y npm >/dev/null 2>&1 + $STD apt-get install -y npm echo "Installed NPM..." fi fi LATEST=$(curl -sL https://api.github.com/repos/louislam/uptime-kuma/releases/latest | grep '"tag_name":' | cut -d'"' -f4) msg_info "Stopping ${APP}" - sudo systemctl stop uptime-kuma &>/dev/null + $STD sudo systemctl stop uptime-kuma msg_ok "Stopped ${APP}" cd /opt/uptime-kuma msg_info "Pulling ${APP} ${LATEST}" - git fetch --all &>/dev/null - git checkout $LATEST --force &>/dev/null + $STD git fetch --all + $STD git checkout $LATEST --force msg_ok "Pulled ${APP} ${LATEST}" msg_info "Updating ${APP} to ${LATEST}" - npm install --production &>/dev/null - npm run download-dist &>/dev/null + $STD npm install --production + $STD npm run download-dist msg_ok "Updated ${APP}" msg_info "Starting ${APP}" - sudo systemctl start uptime-kuma &>/dev/null + $STD sudo systemctl start uptime-kuma msg_ok "Started ${APP}" msg_ok "Updated Successfully" exit diff --git a/ct/urbackupserver.sh b/ct/urbackupserver.sh index 5383002b3..d60372faf 100644 --- a/ct/urbackupserver.sh +++ b/ct/urbackupserver.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated Successfully" exit } diff --git a/ct/vaultwarden.sh b/ct/vaultwarden.sh index 519946776..0ac8bf550 100644 --- a/ct/vaultwarden.sh +++ b/ct/vaultwarden.sh @@ -48,9 +48,9 @@ function update_script() { msg_info "Updating VaultWarden to $VAULT (Patience)" cd ~ && rm -rf vaultwarden - git clone https://github.com/dani-garcia/vaultwarden &>/dev/null + $STD git clone https://github.com/dani-garcia/vaultwarden cd vaultwarden - cargo build --features "sqlite,mysql,postgresql" --release &>/dev/null + $STD cargo build --features "sqlite,mysql,postgresql" --release DIR=/usr/bin/vaultwarden if [ -d "$DIR" ]; then cp target/release/vaultwarden /usr/bin/ @@ -76,8 +76,8 @@ function update_script() { msg_ok "Stopped Vaultwarden" msg_info "Updating Web-Vault to $WVRELEASE" - curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WVRELEASE/bw_web_$WVRELEASE.tar.gz &>/dev/null - tar -zxf bw_web_$WVRELEASE.tar.gz -C /opt/vaultwarden/ &>/dev/null + $STD curl -fsSLO https://github.com/dani-garcia/bw_web_builds/releases/download/$WVRELEASE/bw_web_$WVRELEASE.tar.gz + $STD tar -zxf bw_web_$WVRELEASE.tar.gz -C /opt/vaultwarden/ msg_ok "Updated Web-Vault" msg_info "Cleaning up" @@ -93,7 +93,7 @@ function update_script() { if [ "$UPD" == "3" ]; then if NEWTOKEN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --passwordbox "Set the ADMIN_TOKEN" 10 58 3>&1 1>&2 2>&3); then if [[ -z "$NEWTOKEN" ]]; then exit; fi - if ! command -v argon2 >/dev/null 2>&1; then apt-get install -y argon2 &>/dev/null; fi + if ! command -v argon2 >/dev/null 2>&1; then $STD apt-get install -y argon2; fi TOKEN=$(echo -n ${NEWTOKEN} | argon2 "$(openssl rand -base64 32)" -t 2 -m 16 -p 4 -l 64 -e) sed -i "s|ADMIN_TOKEN=.*|ADMIN_TOKEN='${TOKEN}'|" /opt/vaultwarden/.env if [[ -f /opt/vaultwarden/data/config.json ]]; then diff --git a/ct/vikunja.sh b/ct/vikunja.sh index bea6381d7..b6ac4bf01 100644 --- a/ct/vikunja.sh +++ b/ct/vikunja.sh @@ -37,7 +37,7 @@ function update_script() { cd /opt rm -rf /opt/vikunja/vikunja wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" - DEBIAN_FRONTEND=noninteractive dpkg -i vikunja-$RELEASE-amd64.deb &>/dev/null + $STD DEBIAN_FRONTEND=noninteractive dpkg -i vikunja-$RELEASE-amd64.deb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/ct/wallos.sh b/ct/wallos.sh index 4f193e283..e2ec95070 100644 --- a/ct/wallos.sh +++ b/ct/wallos.sh @@ -44,7 +44,7 @@ function update_script() { chown -R www-data:www-data /opt/wallos chmod -R 755 /opt/wallos mkdir -p /var/log/cron - curl http://localhost/endpoints/db/migrate.php &>/dev/null + $STD curl http://localhost/endpoints/db/migrate.php echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/ct/watcharr.sh b/ct/watcharr.sh index dd0f7835a..73daf7fc3 100644 --- a/ct/watcharr.sh +++ b/ct/watcharr.sh @@ -45,8 +45,8 @@ function update_script() { cp -rf ${temp_folder}/Watcharr-${RELEASE}/* /opt/watcharr cd /opt/watcharr export GOOS=linux - npm i &> /dev/null - npm run build &> /dev/null + $STD npm i + $STD npm run build mv ./build ./server/ui cd server go mod download diff --git a/ct/whisparr.sh b/ct/whisparr.sh index f9561d9b2..42a9d270e 100644 --- a/ct/whisparr.sh +++ b/ct/whisparr.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/whoogle.sh b/ct/whoogle.sh index 8e8237b89..514d655c2 100644 --- a/ct/whoogle.sh +++ b/ct/whoogle.sh @@ -28,7 +28,7 @@ function update_script() { exit fi msg_info "Updating ${APP} LXC" - pip3 install whoogle-search --upgrade &>/dev/null + $STD pip3 install whoogle-search --upgrade systemctl restart whoogle.service msg_ok "Updated Successfully" exit diff --git a/ct/wikijs.sh b/ct/wikijs.sh index 73b5e97d3..58ea8fff6 100644 --- a/ct/wikijs.sh +++ b/ct/wikijs.sh @@ -46,7 +46,7 @@ function update_script() { msg_info "Restoring Data" cp -R ~/data-backup/* /opt/wikijs rm -rf ~/data-backup - npm rebuild sqlite3 &>/dev/null + $STD npm rebuild sqlite3 msg_ok "Restored Data" msg_info "Starting ${APP}" diff --git a/ct/yunohost.sh b/ct/yunohost.sh index 7bd72f112..3e3d5e5e7 100644 --- a/ct/yunohost.sh +++ b/ct/yunohost.sh @@ -28,8 +28,8 @@ function update_script() { exit fi msg_info "Updating $APP LXC" - apt-get update &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-get -y upgrade msg_ok "Updated $APP LXC" exit } diff --git a/ct/zabbix.sh b/ct/zabbix.sh index 49bedcea6..84229c8c0 100644 --- a/ct/zabbix.sh +++ b/ct/zabbix.sh @@ -40,9 +40,9 @@ function update_script() { rm -Rf /etc/apt/sources.list.d/zabbix.list cd /tmp wget -q https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb - dpkg -i zabbix-release_latest+debian12_all.deb &>/dev/null - apt-get update &>/dev/null - apt-get install --only-upgrade zabbix-server-pgsql zabbix-frontend-php zabbix-agent2 zabbix-agent2-plugin-* &>/dev/null + $STD dpkg -i zabbix-release_latest+debian12_all.deb + $STD apt-get update + $STD apt-get install --only-upgrade zabbix-server-pgsql zabbix-frontend-php zabbix-agent2 zabbix-agent2-plugin-* msg_info "Starting ${APP} Services" systemctl start zabbix-server zabbix-agent2 diff --git a/ct/zammad.sh b/ct/zammad.sh index 5dfb4b3d0..43f219e5f 100644 --- a/ct/zammad.sh +++ b/ct/zammad.sh @@ -28,15 +28,15 @@ function update_script() { exit fi msg_info "Stopping Service" - systemctl stop zammad &>/dev/null + $STD systemctl stop zammad msg_info "Updating ${APP}" - apt-get update &>/dev/null - apt-mark hold zammad &>/dev/null - apt-get -y upgrade &>/dev/null - apt-mark unhold zammad &>/dev/null - apt-get -y upgrade &>/dev/null + $STD apt-get update + $STD apt-mark hold zammad + $STD apt-get -y upgrade + $STD apt-mark unhold zammad + $STD apt-get -y upgrade msg_info "Starting Service" - systemctl start zammad &>/dev/null + $STD systemctl start zammad msg_ok "Updated ${APP} LXC" exit } diff --git a/ct/zerotier-one.sh b/ct/zerotier-one.sh index f8a94787d..ecbd8ac0e 100644 --- a/ct/zerotier-one.sh +++ b/ct/zerotier-one.sh @@ -33,7 +33,7 @@ function update_script() { systemctl stop zerotier-one msg_ok "Stopping Service" msg_info "Updating ${APP}" - apt-get update &>/dev/null + $STD apt-get update apt-get -y upgrade msg_ok "Updated ${APP}" diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 1eaca00c8..508d513d7 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -36,7 +36,7 @@ function update_script() { msg_info "Creating Backup" rm -rf /opt/${APP}_backup*.tar.gz mkdir -p /opt/z2m_backup - tar -czf /opt/z2m_backup/${APP}_backup_$(date +%Y%m%d%H%M%S).tar.gz -C /opt zigbee2mqtt &>/dev/null + $STD tar -czf /opt/z2m_backup/${APP}_backup_$(date +%Y%m%d%H%M%S).tar.gz -C /opt zigbee2mqtt mv /opt/zigbee2mqtt/data /opt/z2m_backup msg_ok "Backup Created" @@ -49,8 +49,8 @@ function update_script() { rm -rf /opt/zigbee2mqtt/data mv /opt/z2m_backup/data /opt/zigbee2mqtt cd /opt/zigbee2mqtt - pnpm install --frozen-lockfile &>/dev/null - pnpm build &>/dev/null + $STD pnpm install --frozen-lockfile + $STD pnpm build msg_ok "Updated Zigbee2MQTT" msg_info "Starting Service" diff --git a/ct/zipline.sh b/ct/zipline.sh index 4f5905847..b02f044be 100644 --- a/ct/zipline.sh +++ b/ct/zipline.sh @@ -29,7 +29,7 @@ function update_script() { if ! command -v pnpm &>/dev/null; then msg_info "Installing pnpm" #export NODE_OPTIONS=--openssl-legacy-provider - npm install -g pnpm@latest &>/dev/null + $STD npm install -g pnpm@latest msg_ok "Installed pnpm" fi RELEASE=$(curl -s https://api.github.com/repos/diced/zipline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') @@ -46,8 +46,8 @@ function update_script() { mv zipline-${RELEASE} /opt/zipline cd /opt/zipline mv /opt/.env /opt/zipline/.env - pnpm install &>/dev/null - pnpm build &>/dev/null + $STD pnpm install + $STD pnpm build echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" diff --git a/ct/zitadel.sh b/ct/zitadel.sh index ce97e205a..f3f99c361 100644 --- a/ct/zitadel.sh +++ b/ct/zitadel.sh @@ -37,7 +37,7 @@ function update_script() { cd /tmp wget -qc https://github.com/zitadel/zitadel/releases/download/$RELEASE/zitadel-linux-amd64.tar.gz -O - | tar -xz mv zitadel-linux-amd64/zitadel /usr/local/bin - zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true &>/dev/null + $STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP to ${RELEASE}" From a03a1034de355227c42beaa62dfdaa00265ff249 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:10:32 +0100 Subject: [PATCH 020/167] Fix Docmost: default upload size and saving data when updating (#2598) --- ct/docmost.sh | 2 ++ install/docmost-install.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ct/docmost.sh b/ct/docmost.sh index 4c3896a74..443e7007e 100644 --- a/ct/docmost.sh +++ b/ct/docmost.sh @@ -34,6 +34,7 @@ function update_script() { msg_info "Updating ${APP} to v${RELEASE}" cp /opt/docmost/.env /opt/ + cp -r /opt/docmost/data /opt/ rm -rf /opt/docmost temp_file=$(mktemp) wget -q "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file" @@ -41,6 +42,7 @@ function update_script() { mv docmost-${RELEASE} /opt/docmost cd /opt/docmost mv /opt/.env /opt/docmost/.env + mv /opt/data /opt/docmost/data $STD pnpm install --force $STD pnpm build echo "${RELEASE}" >/opt/${APP}_version.txt diff --git a/install/docmost-install.sh b/install/docmost-install.sh index 3007b0140..298dba62e 100644 --- a/install/docmost-install.sh +++ b/install/docmost-install.sh @@ -61,8 +61,11 @@ tar -xzf "$temp_file" mv docmost-${RELEASE} /opt/docmost cd /opt/docmost mv .env.example .env -sed -i "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" /opt/docmost/.env -sed -i "s|DATABASE_URL=.*|DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME|" /opt/docmost/.env +mkdir data +sed -i -e "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" \ + -e "s|DATABASE_URL=.*|DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME|" \ + -e "s|FILE_UPLOAD_SIZE_LIMIT=.*|FILE_UPLOAD_SIZE_LIMIT=50mb|" \ + /opt/docmost/.env export NODE_OPTIONS="--max-old-space-size=2048" $STD pnpm install $STD pnpm build From 01a02c41ffea96792615b01d71162454a0a51419 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:13:32 +0100 Subject: [PATCH 021/167] Update CHANGELOG.md (#2597) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 248292e78..716b3ae2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,10 +29,15 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) - Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) - Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) - fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) +### ✨ Feature Updates (Updated Scripts) + +- Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) [@MickLesk](https://github.com/MickLesk) ([#2596](https://github.com/community-scripts/ProxmoxVE/pull/2596)) + ### 🌐 Website - Fix: Jupyter Json (missing logo & improve name on website) [@MickLesk](https://github.com/MickLesk) ([#2584](https://github.com/community-scripts/ProxmoxVE/pull/2584)) From 56a7505f15f0f4c1397c4182695997e026007319 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:40:09 +0100 Subject: [PATCH 022/167] Fix: Authelia Unbound Variable Argon2id (#2604) --- install/authelia-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/authelia-install.sh b/install/authelia-install.sh index 81ccfa3e6..15257af62 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -38,7 +38,7 @@ users: authelia: disabled: false displayname: "Authelia Admin" - password: "$argon2id$v=19$m=65536,t=3,p=4$ZBopMzXrzhHXPEZxRDVT2w$SxWm96DwhOsZyn34DLocwQEIb4kCDsk632PuiMdZnig" + password: "\$argon2id\$v=19\$m=65536,t=3,p=4\$ZBopMzXrzhHXPEZxRDVT2w\$SxWm96DwhOsZyn34DLocwQEIb4kCDsk632PuiMdZnig" groups: [] EOF From 62939edc2e7d00e060683c7f03cb203fa769e3fe Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:42:04 +0200 Subject: [PATCH 023/167] Update AppName.md & AppName.sh (#2603) --- .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md | 8 ++++---- .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md index 89421da2d..a85739b92 100644 --- a/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md +++ b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md @@ -95,7 +95,7 @@ Example: >| Variable | Description | Notes | >|----------|-------------|-------| >| `APP` | Application name | Must match ct\AppName.sh | ->| `TAGS` | Proxmox display tags without Spaces, only ; | Limit the number | +>| `var_tags` | Proxmox display tags without Spaces, only ; | Limit the number | >| `var_cpu` | CPU cores | Number of cores | >| `var_ram` | RAM | In MB | >| `var_disk` | Disk capacity | In GB | @@ -193,13 +193,13 @@ wget -q unzip -q ``` -- If a command does not come with this functionality use `&>/dev/null` to suppress it's output. +- If a command does not come with this functionality use `$STD` to suppress it's output. Example: ```bash -php artisan migrate --force &>/dev/null -php artisan config:clear &>/dev/null +$STD php artisan migrate --force +$STD php artisan config:clear ``` ### 3.5 **Backups** diff --git a/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh index ff8d03c27..b61262bb1 100644 --- a/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh +++ b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh @@ -8,7 +8,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # App Default Values APP="[APP_NAME]" # Name of the app (e.g. Google, Adventurelog, Apache-Guacamole" -TAGS="[TAGS]" +var_tags="[TAGS]" # Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp) var_cpu="[CPU]" # Number of cores (1-X) (e.g. 4) - default are 2 From 8a64d345a46c0c059b8f4b3449c0beb1dc532ed2 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:42:36 +0200 Subject: [PATCH 024/167] Update pihole.json (#2602) --- json/pihole.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/pihole.json b/json/pihole.json index a11a33903..9eafd4869 100644 --- a/json/pihole.json +++ b/json/pihole.json @@ -32,7 +32,7 @@ }, "notes": [ { - "text": "To set your password, log in to the container, and type the following: `pihole -a -p`", + "text": "To set your password, log in to the container, and type the following: `pihole setpassword`", "type": "info" }, { From ba0153539deb3fb8e0728871f582e8d6be2dd9c2 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:43:14 +0100 Subject: [PATCH 025/167] Update CHANGELOG.md (#2605) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 716b3ae2e..9ac6ed263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,19 +29,25 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Fix: Authelia Unbound Variable Argon2id [@MickLesk](https://github.com/MickLesk) ([#2604](https://github.com/community-scripts/ProxmoxVE/pull/2604)) - Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) - Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) -- Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) - fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) ### ✨ Feature Updates (Updated Scripts) +- Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) - Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) [@MickLesk](https://github.com/MickLesk) ([#2596](https://github.com/community-scripts/ProxmoxVE/pull/2596)) ### 🌐 Website +- Website: Change Info for PiHole Password [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2602](https://github.com/community-scripts/ProxmoxVE/pull/2602)) - Fix: Jupyter Json (missing logo & improve name on website) [@MickLesk](https://github.com/MickLesk) ([#2584](https://github.com/community-scripts/ProxmoxVE/pull/2584)) +### 🧰 Maintenance + +- [gh] Contributor-Guide: Update AppName.md & AppName.sh [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2603](https://github.com/community-scripts/ProxmoxVE/pull/2603)) + ## 2025-02-23 ### Changes From de4f7c3166a6d10b17e8757307878b8663b121a8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 13:55:31 +0100 Subject: [PATCH 026/167] =?UTF-8?q?Feature:=20Template-Check,=20Better=20H?= =?UTF-8?q?andling=20of=20Downloads,=20Better=20Network=E2=80=A6=20(#2592)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feature: Template-Check, Better Handling of Downloads, Better Network Check, Better CTID check * fix missing } * Update misc/build.func Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * remove useless space --------- Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> --- ct/create_lxc.sh | 133 ++++++++++++++++++++++++++++++++++------------- misc/build.func | 26 ++++----- 2 files changed, 112 insertions(+), 47 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index a62fd2d01..a2c98337c 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -36,7 +36,7 @@ trap 'error_handler $LINENO "$BASH_COMMAND"' ERR # This function handles errors function error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -51,13 +51,13 @@ function spinner() { local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') local spin_i=0 local interval=0.1 - printf "\e[?25l" + printf "\e[?25l" local color="${YWB}" while true; do printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(( (spin_i + 1) % ${#frames[@]} )) + spin_i=$(((spin_i + 1) % ${#frames[@]})) sleep "$interval" done } @@ -70,9 +70,16 @@ function msg_info() { SPINNER_PID=$! } +function msg_warn() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${INFO}${YWB}${msg}${CL}" +} + # This function displays a success message with a green color. function msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR}${CM}${GN}${msg}${CL}" @@ -80,7 +87,7 @@ function msg_ok() { # This function displays a error message with a red color. function msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR}${CROSS}${RD}${msg}${CL}" @@ -113,9 +120,12 @@ function select_storage() { CONTENT='vztmpl' CONTENT_LABEL='Container template' ;; - *) false || { msg_error "Invalid storage class."; exit 201; }; + *) false || { + msg_error "Invalid storage class." + exit 201 + } ;; esac - + # This Queries all storage locations local -a MENU while read -r line; do @@ -129,34 +139,60 @@ function select_storage() { fi MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') - + # Select storage location - if [ $((${#MENU[@]}/3)) -eq 1 ]; then + if [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} else local STORAGE while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ - "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ - 16 $(($MSG_MAX_LENGTH + 23)) 6 \ - "${MENU[@]}" 3>&1 1>&2 2>&3) || { msg_error "Menu aborted."; exit 202; } + "Which storage pool you would like to use for the ${CONTENT_LABEL,,}?\nTo make a selection, use the Spacebar.\n" \ + 16 $(($MSG_MAX_LENGTH + 23)) 6 \ + "${MENU[@]}" 3>&1 1>&2 2>&3) || { + msg_error "Menu aborted." + exit 202 + } if [ $? -ne 0 ]; then echo -e "${CROSS}${RD} Menu aborted by user.${CL}" - exit 0 + exit 0 fi done printf "%s" "$STORAGE" fi } # Test if required variables are set -[[ "${CTID:-}" ]] || { msg_error "You need to set 'CTID' variable."; exit 203; } -[[ "${PCT_OSTYPE:-}" ]] || { msg_error "You need to set 'PCT_OSTYPE' variable."; exit 204; } +[[ "${CTID:-}" ]] || { + msg_error "You need to set 'CTID' variable." + exit 203 +} +[[ "${PCT_OSTYPE:-}" ]] || { + msg_error "You need to set 'PCT_OSTYPE' variable." + exit 204 +} # Test if ID is valid -[ "$CTID" -ge "100" ] || { msg_error "ID cannot be less than 100."; exit 205; } +[ "$CTID" -ge "100" ] || { + msg_error "ID cannot be less than 100." + exit 205 +} + +# Check for network connectivity (IPv4 & IPv6) +function check_network() { + local CHECK_URLS=("8.8.8.8" "1.1.1.1" "9.9.9.9" "2606:4700:4700::1111" "2001:4860:4860::8888" "2620:fe::fe") + + for url in "${CHECK_URLS[@]}"; do + if ping -c 1 -W 2 "$url" &>/dev/null; then + return 0 # Success: At least one connection works + fi + done + + msg_error "No network connection detected. Check your internet connection." + exit 101 +} # Test if ID is in use -if pct status $CTID &>/dev/null; then +if qm status "$CTID" &>/dev/null || pct status "$CTID" &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID msg_error "Cannot use ID that is already in use." @@ -173,46 +209,73 @@ msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage." # Update LXC template list msg_info "Updating LXC Template List" +check_network pveam update >/dev/null msg_ok "Updated LXC Template List" # Get LXC template string TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || { msg_error "Unable to find a template when searching for '$TEMPLATE_SEARCH'."; exit 207; } +[ ${#TEMPLATES[@]} -gt 0 ] || { + msg_error "Unable to find a template when searching for '$TEMPLATE_SEARCH'." + exit 207 +} TEMPLATE="${TEMPLATES[-1]}" - TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" # Check if template exists, if corrupt remove and redownload -if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE"; then +if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then + msg_warn "Template $TEMPLATE not found in storage or seems to be corrupted. Redownloading." [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" - msg_info "Downloading LXC Template" - pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || - { msg_error "A problem occurred while downloading the LXC template."; exit 208; } - msg_ok "Downloaded LXC Template" + + # Download with 3 attempts + for attempt in {1..3}; do + msg_info "Attempt $attempt: Downloading LXC template..." + + if timeout 120 pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null; then + msg_ok "Template download successful." + break + fi + + if [ $attempt -eq 3 ]; then + msg_error "Three failed attempts. Aborting." + exit 208 + fi + + sleep $((attempt * 5)) + done fi +msg_ok "LXC Template is ready to use." # Check and fix subuid/subgid -grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >> /etc/subuid -grep -q "root:100000:65536" /etc/subgid || echo "root:100000:65536" >> /etc/subgid +grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >>/etc/subuid +grep -q "root:100000:65536" /etc/subgid || echo "root:100000:65536" >>/etc/subgid # Combine all options PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) [[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs "$CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}") -# Create container with template integrity check msg_info "Creating LXC Container" - if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then - [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" - - msg_ok "Template integrity check completed" - pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || - { msg_error "A problem occurred while re-downloading the LXC template."; exit 208; } - +if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then + msg_error "Container creation failed. Checking if template is corrupted." + + if ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then + msg_error "Template appears to be corrupted. Removing and re-downloading." + rm -f "$TEMPLATE_PATH" + + if ! timeout 120 pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null; then + msg_error "Failed to re-download template." + exit 208 + fi + msg_ok "Re-downloaded LXC Template" + if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then - msg_error "A problem occurred while trying to create container after re-downloading template." + msg_error "Container creation failed after re-downloading template." exit 200 fi + else + msg_error "Container creation failed, but template is not corrupted." + exit 209 fi +fi msg_ok "LXC Container ${BL}$CTID${CL} ${GN}was successfully created." diff --git a/misc/build.func b/misc/build.func index 9ef8c5419..9b2d42baa 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1250,19 +1250,21 @@ exit_script() { #200 exit codes indicate error in create_lxc.sh #100 exit codes indicate error in install.func - if [ $exit_code -ne 0 ]; then # Check if exit code is nonzero + if [ $exit_code -ne 0 ]; then case $exit_code in - 200) post_update_to_api "failed" "create_lxc.sh: Error during LXC creation" ;; - 201) post_update_to_api "failed" "create_lxc.sh Invalid Storage class" ;; - 202) post_update_to_api "failed" "create_lxc.sh Invalid Menu aborted" ;; - 203) post_update_to_api "failed" "create_lxc.sh CTID was unset" ;; - 204) post_update_to_api "failed" "create_lxc.sh PCT_OSTYPE was unset" ;; - 205) post_update_to_api "failed" "create_lxc.sh ID cannot be less than 100" ;; - 206) post_update_to_api "failed" "create_lxc.sh ID already in use" ;; - 207) post_update_to_api "failed" "create_lxc.sh Template not found" ;; - 208) post_update_to_api "failed" "create_lxc.sh Error downloading template" ;; - 101) post_update_to_api "failed" "create_lxc.sh No Network connection" ;; - *) post_update_to_api "failed" "Unknown error, exit code: $exit_code" ;; + 100) post_update_to_api "failed" "100: Unexpected error in create_lxc.sh" ;; + 101) post_update_to_api "failed" "101: No network connection detected in create_lxc.sh" ;; + 200) post_update_to_api "failed" "200: LXC creation failed in create_lxc.sh" ;; + 201) post_update_to_api "failed" "201: Invalid Storage class in create_lxc.sh" ;; + 202) post_update_to_api "failed" "202: User aborted menu in create_lxc.sh" ;; + 203) post_update_to_api "failed" "203: CTID not set in create_lxc.sh" ;; + 204) post_update_to_api "failed" "204: PCT_OSTYPE not set in create_lxc.sh" ;; + 205) post_update_to_api "failed" "205: CTID cannot be less than 100 in create_lxc.sh" ;; + 206) post_update_to_api "failed" "206: CTID already in use in create_lxc.sh" ;; + 207) post_update_to_api "failed" "207: Template not found in create_lxc.sh" ;; + 208) post_update_to_api "failed" "208: Error downloading template in create_lxc.sh" ;; + 209) post_update_to_api "failed" "209: Container creation failed, but template is intact in create_lxc.sh" ;; + *) post_update_to_api "failed" "Unknown error, exit code: $exit_code in create_lxc.sh" ;; esac fi } From 03a2c417187e18b6bb5d924bb8359f35ec15b30c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:23:05 +0100 Subject: [PATCH 027/167] Update create_lxc.sh --- ct/create_lxc.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index a2c98337c..86065ca8f 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -178,18 +178,18 @@ function select_storage() { } # Check for network connectivity (IPv4 & IPv6) -function check_network() { - local CHECK_URLS=("8.8.8.8" "1.1.1.1" "9.9.9.9" "2606:4700:4700::1111" "2001:4860:4860::8888" "2620:fe::fe") - - for url in "${CHECK_URLS[@]}"; do - if ping -c 1 -W 2 "$url" &>/dev/null; then - return 0 # Success: At least one connection works - fi - done - - msg_error "No network connection detected. Check your internet connection." - exit 101 -} +#function check_network() { +# local CHECK_URLS=("8.8.8.8" "1.1.1.1" "9.9.9.9" "2606:4700:4700::1111" "2001:4860:4860::8888" "2620:fe::fe") +# +# for url in "${CHECK_URLS[@]}"; do +# if ping -c 1 -W 2 "$url" &>/dev/null; then +# return 0 # Success: At least one connection works +# fi +# done +# +# msg_error "No network connection detected. Check your internet connection." +# exit 101 +#} # Test if ID is in use if qm status "$CTID" &>/dev/null || pct status "$CTID" &>/dev/null; then @@ -209,7 +209,7 @@ msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage." # Update LXC template list msg_info "Updating LXC Template List" -check_network +#check_network pveam update >/dev/null msg_ok "Updated LXC Template List" From 05364685afbb348740420b9ef61582c4590c0d79 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:28:40 +0100 Subject: [PATCH 028/167] Update CHANGELOG.md (#2606) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac6ed263..052a58af0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Do not break established syntax in this file, as it is automatically updated by ### ✨ Feature Updates (Updated Scripts) +- Feature: Template-Check, Better Handling of Downloads, Better Network… [@MickLesk](https://github.com/MickLesk) ([#2592](https://github.com/community-scripts/ProxmoxVE/pull/2592)) - Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) - Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) [@MickLesk](https://github.com/MickLesk) ([#2596](https://github.com/community-scripts/ProxmoxVE/pull/2596)) From 0e5be846be8a1394107cef87a2ea3258b70b927c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:39:35 +0100 Subject: [PATCH 029/167] Fix config file missing domain if hostname fails (#2609) --- install/authelia-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/authelia-install.sh b/install/authelia-install.sh index 15257af62..514894e20 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -32,7 +32,9 @@ JWT_SECRET=$(openssl rand -hex 64) SESSION_SECRET=$(openssl rand -hex 64) STORAGE_KEY=$(openssl rand -hex 64) DOMAIN=$(hostname -d) - +if [ -z "$DOMAIN" ]; then + DOMAIN=$(hostname) +fi cat </etc/authelia/users.yml users: authelia: From 188712936f0cd6c92fb6edea62130347313cb615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:41:06 +0100 Subject: [PATCH 030/167] New Script: wger (#2574) * Add wger script * fixes * fixes v2 * fix json * Moved Apache config --- ct/wger.sh | 72 ++++++++++++++++++++++ install/wger-install.sh | 128 ++++++++++++++++++++++++++++++++++++++++ json/wger.json | 34 +++++++++++ 3 files changed, 234 insertions(+) create mode 100644 ct/wger.sh create mode 100644 install/wger-install.sh create mode 100644 json/wger.json diff --git a/ct/wger.sh b/ct/wger.sh new file mode 100644 index 000000000..3b017dd76 --- /dev/null +++ b/ct/wger.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tremor021/ProxmoxVE/refs/heads/wger/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/wger-project/wger + +APP="wger" +var_tags="management;fitness" +var_cpu="1" +var_ram="1024" +var_disk="6" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /home/wger ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/wger-project/wger/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop wger + msg_ok "Stopped $APP" + + msg_info "Updating $APP to v${RELEASE}" + temp_file=$(mktemp) + cd $temp_file + wget -q "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" -O $temp_file + tar xzf $temp_file + cp -rf wger-$RELEASE/* /home/wger/src + cd /home/wger/src + python3 manage.py migrate &>/dev/null + yarn install &>/dev/null + yarn build:css:sass &>/dev/null + python3 manage.py collectstatic --noinput &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start wger + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -rf $temp_file + msg_ok "Cleanup Completed" + + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/wger-install.sh b/install/wger-install.sh new file mode 100644 index 000000000..7ffcdfbca --- /dev/null +++ b/install/wger-install.sh @@ -0,0 +1,128 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/wger-project/wger + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + gnupg \ + apache2 \ + libapache2-mod-wsgi-py3 +msg_ok "Installed Dependencies" + +msg_info "Installing Python" +$STD apt-get install -y python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Installed Python" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g yarn sass +msg_ok "Installed Node.js" + +msg_info "Setting up wger" +$STD adduser wger --disabled-password --gecos "" +mkdir /home/wger/db +touch /home/wger/db/database.sqlite +chown :www-data -R /home/wger/db +chmod g+w /home/wger/db /home/wger/db/database.sqlite +mkdir /home/wger/{static,media} +chmod o+w /home/wger/media +temp_dir=$(mktemp -d) +cd $temp_dir +RELEASE=$(curl -s https://api.github.com/repos/wger-project/wger/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') +wget -q "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar.gz" +tar xzf $RELEASE.tar.gz +mv wger-$RELEASE /home/wger/src +cd /home/wger/src +$STD pip install -r requirements_prod.txt +$STD pip install -e . +$STD wger create-settings --database-path /home/wger/db/database.sqlite +sed -i "s#home/wger/src/media#home/wger/media#g" /home/wger/src/settings.py +sed -i "/MEDIA_ROOT = '\/home\/wger\/media'/a STATIC_ROOT = '/home/wger/static'" /home/wger/src/settings.py +$STD wger bootstrap +$STD python3 manage.py collectstatic +echo "${RELEASE}" >/opt/wger_version.txt +msg_ok "Finished setting up wger" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/wger.conf + + + Require all granted + + + + + WSGIApplicationGroup %{GLOBAL} + WSGIDaemonProcess wger python-path=/home/wger/src python-home=/home/wger + WSGIProcessGroup wger + WSGIScriptAlias / /home/wger/src/wger/wsgi.py + WSGIPassAuthorization On + + Alias /static/ /home/wger/static/ + + Require all granted + + + Alias /media/ /home/wger/media/ + + Require all granted + + + ErrorLog /var/log/apache2/wger-error.log + CustomLog /var/log/apache2/wger-access.log combined + +EOF +$STD a2dissite 000-default.conf +$STD a2ensite wger +systemctl restart apache2 +cat </etc/systemd/system/wger.service +[Unit] +Description=wger Service +After=network.target + +[Service] +Type=simple +User=root +ExecStart=/usr/local/bin/wger start -a 0.0.0.0 -p 3000 +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now wger +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $temp_dir +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize diff --git a/json/wger.json b/json/wger.json new file mode 100644 index 000000000..9e91b57b4 --- /dev/null +++ b/json/wger.json @@ -0,0 +1,34 @@ +{ + "name": "wger", + "slug": "wger", + "categories": [ + 24 + ], + "date_created": "2025-02-23", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://wger.readthedocs.io/en/latest/index.html#", + "website": "https://wger.de", + "logo": "https://avatars.githubusercontent.com/u/17430347?s=48&v=4", + "description": "wger (ˈvɛɡɐ) Workout Manager is a free, open source web application that helps you manage your personal workouts, weight and diet plans and can also be used as a simple gym management utility. It offers a REST API as well, for easy integration with other projects and tools.", + "install_methods": [ + { + "type": "default", + "script": "ct/wger.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "adminadmin" + }, + "notes": [] +} \ No newline at end of file From 157657b298d7a3e1274d40f0f8f64f5395b9e8ac Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:45:41 +0100 Subject: [PATCH 031/167] Update date in json (#2610) Co-authored-by: GitHub Actions --- json/wger.json | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/json/wger.json b/json/wger.json index 9e91b57b4..fcc8abc7e 100644 --- a/json/wger.json +++ b/json/wger.json @@ -1,34 +1,34 @@ { - "name": "wger", - "slug": "wger", - "categories": [ - 24 - ], - "date_created": "2025-02-23", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 3000, - "documentation": "https://wger.readthedocs.io/en/latest/index.html#", - "website": "https://wger.de", - "logo": "https://avatars.githubusercontent.com/u/17430347?s=48&v=4", - "description": "wger (ˈvɛɡɐ) Workout Manager is a free, open source web application that helps you manage your personal workouts, weight and diet plans and can also be used as a simple gym management utility. It offers a REST API as well, for easy integration with other projects and tools.", - "install_methods": [ - { - "type": "default", - "script": "ct/wger.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 6, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "admin", - "password": "adminadmin" - }, - "notes": [] -} \ No newline at end of file + "name": "wger", + "slug": "wger", + "categories": [ + 24 + ], + "date_created": "2025-02-24", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://wger.readthedocs.io/en/latest/index.html#", + "website": "https://wger.de", + "logo": "https://avatars.githubusercontent.com/u/17430347?s=48&v=4", + "description": "wger (ˈvɛɡɐ) Workout Manager is a free, open source web application that helps you manage your personal workouts, weight and diet plans and can also be used as a simple gym management utility. It offers a REST API as well, for easy integration with other projects and tools.", + "install_methods": [ + { + "type": "default", + "script": "ct/wger.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 6, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "admin", + "password": "adminadmin" + }, + "notes": [] +} From 1bb6e4e899fe299ef88180f36914fe473a182671 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:45:54 +0100 Subject: [PATCH 032/167] Update CHANGELOG.md (#2611) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 052a58af0..1feec80f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts +- New Script: wger [@tremor021](https://github.com/tremor021) ([#2574](https://github.com/community-scripts/ProxmoxVE/pull/2574)) - New Script: VictoriaMetrics [@tremor021](https://github.com/tremor021) ([#2565](https://github.com/community-scripts/ProxmoxVE/pull/2565)) - New Script: Authelia [@thost96](https://github.com/thost96) ([#2060](https://github.com/community-scripts/ProxmoxVE/pull/2060)) - New Script: Jupyter Notebook [@Dave-code-creater](https://github.com/Dave-code-creater) ([#2561](https://github.com/community-scripts/ProxmoxVE/pull/2561)) From 6eb272ba4a2b13edf14c4cadf9ad753414360d3d Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:46:13 +0100 Subject: [PATCH 033/167] Update .app files (#2612) Co-authored-by: GitHub Actions --- ct/headers/wger | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/wger diff --git a/ct/headers/wger b/ct/headers/wger new file mode 100644 index 000000000..85e0a5dd3 --- /dev/null +++ b/ct/headers/wger @@ -0,0 +1,6 @@ + + _ ______ ____ _____ +| | /| / / __ `/ _ \/ ___/ +| |/ |/ / /_/ / __/ / +|__/|__/\__, /\___/_/ + /____/ From 43dc12074d5feab89046666c3bb23fc739ade0ba Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:46:41 +0100 Subject: [PATCH 034/167] Update CHANGELOG.md (#2613) Co-authored-by: github-actions[bot] From 11726620952ed5f996407bcb51e40a630e26b8a3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:50:09 +0100 Subject: [PATCH 035/167] Fix: Omada check for AVX Support and use the correct MongoDB Version (#2600) * Update omada-install.sh * Update omada-install.sh * Update omada.sh --- ct/omada.sh | 19 +++++++++++++--- install/omada-install.sh | 49 ++++++++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/ct/omada.sh b/ct/omada.sh index e75a28b6b..b0a4f90d1 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -27,18 +27,31 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + + msg_info "Updating MongoDB" + MONGODB_VERSION="8.0" + if ! lscpu | grep -q 'avx'; then + MONGODB_VERSION="4.4" + fi + + wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg + echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list + $STD apt-get update + $STD apt-get install -y --only-upgrade mongodb-org + msg_ok "Updated MongoDB to $MONGODB_VERSION" + + msg_info "Updating Omada Controller" latest_url=$(curl -s "https://support.omadanetworks.com/en/product/omada-software-controller/?resourceType=download" | grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | head -n 1) latest_version=$(basename "$latest_url") if [ -z "${latest_version}" ]; then msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time." exit fi - echo -e "Updating Omada Controller" + wget -qL ${latest_url} dpkg -i ${latest_version} rm -rf ${latest_version} - echo -e "Updated Omada Controller" - exit + msg_ok "Updated Omada Controller" } start diff --git a/install/omada-install.sh b/install/omada-install.sh index c8de262ea..3c16d72e1 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -14,34 +14,49 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ - sudo \ - mc \ - gnupg \ - jsvc +$STD apt-get install -y curl sudo mc gnupg jsvc msg_ok "Installed Dependencies" -msg_info "Installing Azul Zulu" +msg_info "Checking CPU Features" +if lscpu | grep -q 'avx'; then + USE_AVX=true + MONGODB_VERSION="8.0" + msg_ok "AVX detected: Using MongoDB 8.0" +else + USE_AVX=false + MONGODB_VERSION="4.4" + msg_ok "No AVX detected: Using MongoDB 4.4" +fi + +msg_info "Installing Azul Zulu Java" wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9" wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb $STD dpkg -i zulu-repo_1.0.0-3_all.deb $STD apt-get update $STD apt-get -y install zulu8-jdk -msg_ok "Installed Azul Zulu" +msg_ok "Installed Azul Zulu Java" -msg_info "Installing MongoDB" -libssl=$(curl -fsSL "http://security.ubuntu.com/ubuntu/pool/main/o/openssl/" | grep -o 'libssl1\.1_1\.1\.1f-1ubuntu2\.2[^"]*amd64\.deb' | head -n1) -wget -qL http://security.ubuntu.com/ubuntu/pool/main/o/openssl/$libssl -$STD dpkg -i $libssl -wget -qL https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/multiverse/binary-amd64/mongodb-org-server_3.6.23_amd64.deb -$STD dpkg -i mongodb-org-server_3.6.23_amd64.deb -msg_ok "Installed MongoDB" +msg_info "Installing libssl (if needed)" +if ! dpkg -l | grep -q 'libssl1.1'; then + wget -qO /tmp/libssl.deb "https://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1w-0+deb11u2_amd64.deb" + $STD dpkg -i /tmp/libssl.deb + rm -f /tmp/libssl.deb + msg_ok "Installed libssl1.1" +else + msg_ok "libssl1.1 already installed" +fi +msg_info "Installing MongoDB $MONGODB_VERSION" +wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list +$STD apt-get update +$STD apt-get install -y mongodb-org +msg_ok "Installed MongoDB $MONGODB_VERSION" + +msg_info "Installing Omada Controller" latest_url=$(curl -s "https://support.omadanetworks.com/en/product/omada-software-controller/?resourceType=download" | grep -o 'https://static\.tp-link\.com/upload/software/[^"]*linux_x64[^"]*\.deb' | head -n 1) latest_version=$(basename "$latest_url") -msg_info "Installing Omada Controller" wget -qL ${latest_url} $STD dpkg -i ${latest_version} msg_ok "Installed Omada Controller" @@ -50,7 +65,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb $libssl +rm -rf ${latest_version} zulu-repo_1.0.0-3_all.deb $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 6827056a1d5b14e3e938324f6da7316a93c9d06e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:52:23 +0100 Subject: [PATCH 036/167] Fix: Firefly III - Update-Script based on their docs (#2534) * Fix: Update-Script Firefly III Based on there docs * Update autolabeler.yml * Update autolabeler.yml * Update firefly.sh * Update firefly.sh --- ct/firefly.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ct/firefly.sh b/ct/firefly.sh index 1a5dbd557..5f267af02 100644 --- a/ct/firefly.sh +++ b/ct/firefly.sh @@ -37,21 +37,19 @@ check_container_resources msg_info "Updating ${APP} to v${RELEASE}" cp /opt/firefly/.env /opt/.env cp -r /opt/firefly/storage /opt/storage - rm -rf /opt/firefly/* cd /opt wget -q "https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE}/FireflyIII-v${RELEASE}.tar.gz" tar -xzf FireflyIII-v${RELEASE}.tar.gz -C /opt/firefly --exclude='storage' + cp /opt/.env /opt/firefly/.env + cp -r /opt/storage /opt/firefly/storage cd /opt/firefly - $STD composer install --no-dev --no-interaction - $STD php artisan migrate --seed --force - $STD php artisan firefly:decrypt-all - $STD php artisan cache:clear - $STD php artisan view:clear - $STD php artisan firefly:upgrade-database - $STD php artisan firefly:laravel-passport-keys chown -R www-data:www-data /opt/firefly chmod -R 775 /opt/firefly/storage - + $STD php artisan migrate --seed --force + $STD php artisan cache:clear + $STD php artisan view:clear + $STD php artisan firefly-iii:upgrade-database + $STD php artisan firefly-iii:laravel-passport-keys echo "${RELEASE}" >"/opt/${APP}_version.txt" msg_ok "Updated ${APP} to v${RELEASE}" @@ -76,4 +74,4 @@ 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 "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" From 40469c5de5ef11707b71a652e04053c4e0e59774 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:54:51 +0200 Subject: [PATCH 037/167] [gh] Update Script Test Workflow (#2599) * Update Workflow * Update Workflow --- .github/workflows/script-test.yml | 47 ++++------- .../scripts/app-test/pr-alpine-install.func | 20 ++--- .../workflows/scripts/app-test/pr-build.func | 36 ++++---- .../scripts/app-test/pr-create-lxc.sh | 83 +++++++++++-------- .../scripts/app-test/pr-install.func | 44 +++++----- 5 files changed, 115 insertions(+), 115 deletions(-) diff --git a/.github/workflows/script-test.yml b/.github/workflows/script-test.yml index 6b9e100eb..3b86f3d89 100644 --- a/.github/workflows/script-test.yml +++ b/.github/workflows/script-test.yml @@ -13,7 +13,7 @@ jobs: run-install-script: runs-on: pvenode steps: - - name: Checkout PR branch (supports forks) + - name: Checkout PR branch uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} @@ -37,7 +37,8 @@ jobs: echo "Changed files: $CHANGED_FILES" echo "SCRIPT=$CHANGED_FILES" >> $GITHUB_ENV env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get scripts id: check-install-script @@ -68,11 +69,11 @@ jobs: echo "Running Test for: $STRIPPED_NAME" if [[ $FILE =~ ^install/.*-install\.sh$ ]]; then CT_SCRIPT="ct/$STRIPPED_NAME.sh" + echo $CT_SCRIPT if [[ ! -f $CT_SCRIPT ]]; then echo "No CT script found for $STRIPPED_NAME" ERROR_MSG="No CT script found for $FILE" - echo "$ERROR_MSG" > result_$STRIPPED_NAME.log - continue + RUN=false fi echo "Found CT script for $STRIPPED_NAME" chmod +x "$CT_SCRIPT" @@ -82,32 +83,19 @@ jobs: if [[ ! -f $INSTALL_SCRIPT ]]; then echo "No install script found for $STRIPPED_NAME" ERROR_MSG="No install script found for $FILE" - echo "$ERROR_MSG" > result_$STRIPPED_NAME.log - continue + RUN=false fi echo "Found install script for $STRIPPED_NAME" chmod +x "$INSTALL_SCRIPT" RUNNING_FILE=$FILE fi - git remote add community-scripts https://github.com/community-scripts/ProxmoxVE.git - git fetch community-scripts - rm -f .github/workflows/scripts/app-test/pr-build.func || true - rm -f .github/workflows/scripts/app-test/pr-install.func || true - rm -f .github/workflows/scripts/app-test/pr-alpine-install.func || true - rm -f .github/workflows/scripts/app-test/pr-create-lxc.sh || true - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-build.func - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-install.func - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-alpine-install.func - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-create-lxc.sh - chmod +x $RUNNING_FILE - chmod +x .github/workflows/scripts/app-test/pr-create-lxc.sh - chmod +x .github/workflows/scripts/app-test/pr-install.func - chmod +x .github/workflows/scripts/app-test/pr-alpine-install.func - chmod +x .github/workflows/scripts/app-test/pr-build.func - sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" - echo "Executing $RUNNING_FILE" - ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) - echo "Finished running $FILE" + if [[ $RUN != "false" ]]; then + chmod +x $RUNNING_FILE + sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/.github/workflows/scripts/app-test/pr-build.func)|g' "$RUNNING_FILE" + echo "Executing $RUNNING_FILE" + ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) + echo "Finished running $FILE" + fi if [ -n "$ERROR_MSG" ]; then echo "ERROR in $STRIPPED_NAME: $ERROR_MSG" echo "$ERROR_MSG" > result_$STRIPPED_NAME.log @@ -125,12 +113,13 @@ jobs: pct stop $container_id pct destroy $container_id fi - done + done + - name: Post error comments run: | ERROR="false" - SEARCH_LINE=".github/workflows/scripts/app-test/pr-build.func: line 253:" + SEARCH_LINE=".github/workflows/scripts/app-test/pr-build.func: line 255" for FILE in ${{ env.ALL_FILES }}; do STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') if [[ ! -f result_$STRIPPED_NAME.log ]]; then @@ -145,8 +134,6 @@ jobs: gh pr comment ${{ github.event.pull_request.number }} \ --repo ${{ github.repository }} \ --body ":warning: The script _**$FILE**_ failed with the following message:
${CLEANED_ERROR_MSG}
" - - ERROR="true" fi done @@ -157,3 +144,5 @@ jobs: - name: Fail if error if: ${{ env.ERROR == 'true' }} run: exit 1 + + diff --git a/.github/workflows/scripts/app-test/pr-alpine-install.func b/.github/workflows/scripts/app-test/pr-alpine-install.func index 39a6a82fb..ae3bc174d 100644 --- a/.github/workflows/scripts/app-test/pr-alpine-install.func +++ b/.github/workflows/scripts/app-test/pr-alpine-install.func @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: michelroegl-brunner +# Author: Michel Roegl-Brunner (michelroegl-brunner) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE color() { @@ -11,7 +11,7 @@ catch_errors() { trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } - +# This function handles errors error_handler() { local line_number="$1" local command="$2" @@ -21,8 +21,8 @@ error_handler() { exit 0 } verb_ip6() { - STD="" - return + STD="" + return } msg_info() { @@ -30,13 +30,13 @@ msg_info() { echo -ne "${msg}\n" } -msg_ok() { +msg_ok() { local msg="$1" echo -e "${msg}\n" } msg_error() { - + local msg="$1" echo -e "${msg}\n" } @@ -71,7 +71,7 @@ network_check() { } update_os() { - msg_info "Updating Container OS" + msg_info "Updating Container OS" apk update apk upgrade msg_ok "Updated Container OS" @@ -82,7 +82,5 @@ motd_ssh() { } customize() { - return -} - - + return +} \ No newline at end of file diff --git a/.github/workflows/scripts/app-test/pr-build.func b/.github/workflows/scripts/app-test/pr-build.func index 360c15ede..4ca15d099 100644 --- a/.github/workflows/scripts/app-test/pr-build.func +++ b/.github/workflows/scripts/app-test/pr-build.func @@ -6,12 +6,13 @@ variables() { NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces. var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP. + } NEXTID=$(pvesh get /cluster/nextid) timezone=$(cat /etc/timezone) -header_info(){ - return +header_info() { + return } base_settings() { @@ -20,10 +21,10 @@ base_settings() { DISK_SIZE="4" CORE_COUNT="1" RAM_SIZE="1024" - VERBOSE="${1:-no}" + VERBOSE="no" PW="" CT_ID=$NEXTID - HN="Testing" + HN=$NSAPP BRG="vmbr0" NET="dhcp" GATE="" @@ -106,7 +107,7 @@ catch_errors() { } # This function handles errors -error_handler() { +error_handler() { local line_number="$1" local command="$2" SCRIPT_NAME=$(basename "$0") @@ -120,17 +121,17 @@ msg_info() { echo -ne "${msg}\n" } -msg_ok() { +msg_ok() { local msg="$1" echo -e "${msg}\n" } msg_error() { - + local msg="$1" echo -e "${msg}\n" } -start(){ +start() { base_settings return } @@ -146,9 +147,9 @@ build_container() { TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/.github/workflows/scripts/app-test/pr-alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/.github/workflows/scripts/app-test/pr-alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/.github/workflows/scripts/app-test/pr-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/.github/workflows/scripts/app-test/pr-install.func)" fi export CACHER="$APT_CACHER" @@ -182,9 +183,8 @@ build_container() { " echo "Container ID: $CTID" - # This executes create_lxc.sh and creates the container and .conf file - bash /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/.github/workflows/scripts/app-test/pr-create-lxc.sh + bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/.github/workflows/scripts/app-test/pr-create-lxc.sh)" LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -233,6 +233,7 @@ EOF fi fi fi + # This starts the container and executes -install.sh msg_info "Starting LXC Container" pct start "$CTID" @@ -242,7 +243,7 @@ EOF msg_error "No install script found for $APP" exit 1 fi - if [ "$var_os" == "alpine" ]; then + if [ "$var_os" == "alpine" ]; then sleep 3 pct exec "$CTID" -- /bin/sh -c 'cat </etc/apk/repositories http://dl-cdn.alpinelinux.org/alpine/latest-stable/main @@ -250,11 +251,10 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/install/$var_install.sh)" $var_install.sh + lxc-attach -n "$CTID" -- bash -c "$(cat /root/actions-runner/_work/ProxmoxVE/ProxmoxVE/install/$var_install.sh)" } -description(){ - IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) - return -} +description() { + IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1) +} \ No newline at end of file diff --git a/.github/workflows/scripts/app-test/pr-create-lxc.sh b/.github/workflows/scripts/app-test/pr-create-lxc.sh index 6ca899cf4..0bb2a9d2f 100644 --- a/.github/workflows/scripts/app-test/pr-create-lxc.sh +++ b/.github/workflows/scripts/app-test/pr-create-lxc.sh @@ -11,8 +11,9 @@ catch_errors() { trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } +# This function handles errors error_handler() { - local exit_code="$?" + local exit_code="$?" local line_number="$1" local command="$2" local error_message="Failure in line $line_number: exit code $exit_code: while executing command $command" @@ -20,7 +21,7 @@ error_handler() { exit 100 } verb_ip6() { - return + return } msg_info() { @@ -28,18 +29,17 @@ msg_info() { echo -ne "${msg}\n" } -msg_ok() { +msg_ok() { local msg="$1" echo -e "${msg}\n" } msg_error() { - + local msg="$1" echo -e "${msg}\n" } - VALIDCT=$(pvesm status -content rootdir | awk 'NR>1') if [ -z "$VALIDCT" ]; then msg_error "Unable to detect a valid Container Storage location." @@ -64,9 +64,12 @@ function select_storage() { CONTENT='vztmpl' CONTENT_LABEL='Container template' ;; - *) false || { msg_error "Invalid storage class."; exit 201; };; + *) false || { + msg_error "Invalid storage class." + exit 201 + } ;; esac - + # This Queries all storage locations local -a MENU while read -r line; do @@ -80,23 +83,32 @@ function select_storage() { fi MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content $CONTENT | awk 'NR>1') - + # Select storage location - if [ $((${#MENU[@]}/3)) -eq 1 ]; then + if [ $((${#MENU[@]} / 3)) -eq 1 ]; then printf ${MENU[0]} else - msg_error "STORAGE ISSUES!" - exit 202 + msg_error "STORAGE ISSUES!" + exit 202 fi } +[[ "${CTID:-}" ]] || { + msg_error "You need to set 'CTID' variable." + exit 203 +} +[[ "${PCT_OSTYPE:-}" ]] || { + msg_error "You need to set 'PCT_OSTYPE' variable." + exit 204 +} +# Test if ID is valid +[ "$CTID" -ge "100" ] || { + msg_error "ID cannot be less than 100." + exit 205 +} -[[ "${CTID:-}" ]] || { msg_error "You need to set 'CTID' variable."; exit 203; } -[[ "${PCT_OSTYPE:-}" ]] || { msg_error "You need to set 'PCT_OSTYPE' variable."; exit 204; } - -[ "$CTID" -ge "100" ] || { msg_error "ID cannot be less than 100."; exit 205; } - +# Test if ID is in use if pct status $CTID &>/dev/null; then echo -e "ID '$CTID' is already in use." unset CTID @@ -110,10 +122,12 @@ CONTAINER_STORAGE=$(select_storage container) || exit pveam update >/dev/null - TEMPLATE_SEARCH=${PCT_OSTYPE}-${PCT_OSVERSION:-} mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLATE_SEARCH.*\)/\1/p" | sort -t - -k 2 -V) -[ ${#TEMPLATES[@]} -gt 0 ] || { msg_error "Unable to find a template when searching for '$TEMPLATE_SEARCH'."; exit 207; } +[ ${#TEMPLATES[@]} -gt 0 ] || { + msg_error "Unable to find a template when searching for '$TEMPLATE_SEARCH'." + exit 207 +} TEMPLATE="${TEMPLATES[-1]}" TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" @@ -121,28 +135,29 @@ TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE"; then [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || - { msg_error "A problem occurred while downloading the LXC template."; exit 208; } + { + msg_error "A problem occurred while downloading the LXC template." + exit 208 + } fi - -grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >> /etc/subuid -grep -q "root:100000:65536" /etc/subgid || echo "root:100000:65536" >> /etc/subgid +grep -q "root:100000:65536" /etc/subuid || echo "root:100000:65536" >>/etc/subuid +grep -q "root:100000:65536" /etc/subgid || echo "root:100000:65536" >>/etc/subgid PCT_OPTIONS=(${PCT_OPTIONS[@]:-${DEFAULT_PCT_OPTIONS[@]}}) [[ " ${PCT_OPTIONS[@]} " =~ " -rootfs " ]] || PCT_OPTIONS+=(-rootfs "$CONTAINER_STORAGE:${PCT_DISK_SIZE:-8}") +if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then + [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" + + pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || + { + msg_error "A problem occurred while re-downloading the LXC template." + exit 208 + } if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then - [[ -f "$TEMPLATE_PATH" ]] && rm -f "$TEMPLATE_PATH" - - - pveam download "$TEMPLATE_STORAGE" "$TEMPLATE" >/dev/null || - { msg_error "A problem occurred while re-downloading the LXC template."; exit 208; } - - - if ! pct create "$CTID" "${TEMPLATE_STORAGE}:vztmpl/${TEMPLATE}" "${PCT_OPTIONS[@]}" &>/dev/null; then - msg_error "A problem occurred while trying to create container after re-downloading template." - exit 200 - fi + msg_error "A problem occurred while trying to create container after re-downloading template." + exit 200 fi - +fi diff --git a/.github/workflows/scripts/app-test/pr-install.func b/.github/workflows/scripts/app-test/pr-install.func index 49195f365..1719a1a9e 100644 --- a/.github/workflows/scripts/app-test/pr-install.func +++ b/.github/workflows/scripts/app-test/pr-install.func @@ -1,31 +1,31 @@ #!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG -# Author: michelroegl-brunner +# Author: Michel Roegl-Brunner (michelroegl-brunner) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE color() { return } -SCRIPT_NAME="${BASH_SOURCE[0]:-unknown_script}" catch_errors() { - set -Euoe pipefail + set -Euo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR } error_handler() { local line_number="$1" local command="$2" - local error_message="$SCRIPT_NAME: Failure in line $line_number while executing command '$command'" - echo -e "\n$error_message" - exit 300 + local error_message="Failure in line $line_number while executing command '$command'" + echo -e "\n$error_message\n" >&2 + exit 1 } verb_ip6() { - STD="silent" - silent() { - "$@" >/dev/null 2>&1 || error_handler "${BASH_LINENO[0]}" "$*" - } + STD="silent" + silent() { + "$@" >/dev/null 2>&1 || error_handler "${BASH_LINENO[0]}" "$*" + } + return } msg_info() { @@ -33,19 +33,21 @@ msg_info() { echo -ne "${msg}\n" } -msg_ok() { +msg_ok() { local msg="$1" echo -e "${msg}\n" } msg_error() { - + local msg="$1" echo -e "${msg}\n" } - RETRY_NUM=10 - RETRY_EVERY=3 + +RETRY_NUM=10 +RETRY_EVERY=3 setting_up_container() { + sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1) echo "LANG=${locale_line}" >/etc/default/locale @@ -53,12 +55,11 @@ setting_up_container() { export LANG=${locale_line} echo $tz >/etc/timezone ln -sf /usr/share/zoneinfo/$tz /etc/localtime - + for ((i = RETRY_NUM; i > 0; i--)); do if [ "$(hostname -I)" != "" ]; then break fi - echo 1>&2 -en "No Network! " sleep $RETRY_EVERY done if [ "$(hostname -I)" = "" ]; then @@ -68,8 +69,6 @@ setting_up_container() { fi rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED systemctl disable -q --now systemd-networkd-wait-online.service - msg_ok "Set up Container OS" - msg_ok "Network Connected: $(hostname -I)" } network_check() { @@ -79,11 +78,10 @@ network_check() { } update_os() { - msg_info "Updating Container OS" - apt-get update - apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade + export DEBIAN_FRONTEND=noninteractive + apt-get update >/dev/null 2>&1 + apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade >/dev/null rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED - msg_ok "Updated Container OS" } motd_ssh() { @@ -91,5 +89,5 @@ motd_ssh() { } customize() { - return + return } \ No newline at end of file From c72e8d3da6ecbff8b0fb40b5f376fd83c13a3a5a Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:55:53 +0100 Subject: [PATCH 038/167] Update CHANGELOG.md (#2614) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1feec80f1..54092ea5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Fix: Update-Script Firefly III based on their docs [@MickLesk](https://github.com/MickLesk) ([#2534](https://github.com/community-scripts/ProxmoxVE/pull/2534)) +- Fix: Omada check for AVX Support and use the correct MongoDB Version [@MickLesk](https://github.com/MickLesk) ([#2600](https://github.com/community-scripts/ProxmoxVE/pull/2600)) - Fix: Authelia Unbound Variable Argon2id [@MickLesk](https://github.com/MickLesk) ([#2604](https://github.com/community-scripts/ProxmoxVE/pull/2604)) - Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) - Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) @@ -48,6 +50,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🧰 Maintenance +- [gh] Update Script Test Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2599](https://github.com/community-scripts/ProxmoxVE/pull/2599)) - [gh] Contributor-Guide: Update AppName.md & AppName.sh [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2603](https://github.com/community-scripts/ProxmoxVE/pull/2603)) ## 2025-02-23 From 5de3075252431d0ddb166c2246c0be535a198f7e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:03:37 +0100 Subject: [PATCH 039/167] Update autolabeler.yml --- .github/workflows/autolabeler.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index d0ebbcc25..d39abed76 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -32,7 +32,7 @@ jobs: const autolabelerConfig = JSON.parse(fileContent); const prNumber = context.payload.pull_request.number; - const prBody = context.payload.pull_request.body.toLowerCase(); + const prBody = context.payload.pull_request.body; // Label-Sammlung (um doppelte API-Calls zu vermeiden) let labelsToAdd = new Set(); @@ -70,9 +70,8 @@ jobs: }; for (const [checkbox, label] of Object.entries(templateLabelMappings)) { - const regex = new RegExp(`- \\[(.*?)\\] ${checkbox}`, "i"); - const match = prBody.match(regex); - if (match && match[1].trim() !== "") { // Checkbox ist gesetzt + const regex = new RegExp(`- \\[x\\] ${checkbox}`, "i"); // Match only checked checkboxes + if (regex.test(prBody)) { labelsToAdd.add(label); } } From 8c41fb692b775f870d8b2c2d4f7a11ff85a7347b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:04:11 +0100 Subject: [PATCH 040/167] Update autolabeler.yml --- .github/workflows/autolabeler.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index d39abed76..4e0a04348 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -34,10 +34,8 @@ jobs: const prNumber = context.payload.pull_request.number; const prBody = context.payload.pull_request.body; - // Label-Sammlung (um doppelte API-Calls zu vermeiden) let labelsToAdd = new Set(); - // Prüfe Datei-Änderungen const prListFilesResponse = await github.rest.pulls.listFiles({ owner: context.repo.owner, repo: context.repo.repo, @@ -61,7 +59,6 @@ jobs: } } - // Prüfe PR-Template Checkboxen mit den korrekten Labels const templateLabelMappings = { "🐞 bug fix": "bugfix", "✨ new feature": "feature", @@ -76,10 +73,8 @@ jobs: } } - // Debugging: Anzeigen, welche Labels tatsächlich erkannt wurden console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`); - // Labels setzen, falls neue erkannt wurden if (labelsToAdd.size > 0) { console.log(`Adding labels ${Array.from(labelsToAdd).join(", ")} to PR ${prNumber}`); await github.rest.issues.addLabels({ From 375275b9c0fa6c5e63d77f464ce139fb9d0b9e08 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:07:13 +0100 Subject: [PATCH 041/167] Update changelog-pr.yml --- .github/workflows/changelog-pr.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 19e9a70ed..58bfd8a4a 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -78,11 +78,30 @@ jobs: const prLabels = pr.labels.map(label => label.name.toLowerCase()); const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`; + let isCategorized = false; + for (const { labels, notes } of categorizedPRs) { - if (labels.length === 0 || labels.some(label => prLabels.includes(label))) { + // If no labels are specified (e.g., "Unlabelled"), assign to this category + if (labels.length === 0 && prLabels.length === 0) { notes.push(prNote); + isCategorized = true; break; } + + // If labels are specified, check if PR has ALL required labels + if (labels.length > 0 && labels.every(label => prLabels.includes(label.toLowerCase()))) { + notes.push(prNote); + isCategorized = true; + break; + } + } + + // If PR is not categorized, assign it to the "Unlabelled" category + if (!isCategorized) { + const unlabelledCategory = categorizedPRs.find(cat => cat.title === "❔ Unlabelled"); + if (unlabelledCategory) { + unlabelledCategory.notes.push(prNote); + } } }); @@ -110,7 +129,6 @@ jobs: const changelogContent = await fs.readFile(changelogPath, 'utf-8'); const changelogIncludesTodaysReleaseNotes = changelogContent.includes(`\n## ${today}`); - // Ersetze oder füge Release Notes ein const regex = changelogIncludesTodaysReleaseNotes ? new RegExp(`## ${today}.*(?=## ${latestDateInChangelog})`, "gs") : new RegExp(`(?=## ${latestDateInChangelog})`, "gs"); From f24286b717572415a8b9083624c8d1a5122b2d33 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:08:16 +0100 Subject: [PATCH 042/167] Update CHANGELOG.md (#2616) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54092ea5f..c1c1de339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,14 +30,14 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts -- Fix: Update-Script Firefly III based on their docs [@MickLesk](https://github.com/MickLesk) ([#2534](https://github.com/community-scripts/ProxmoxVE/pull/2534)) -- Fix: Omada check for AVX Support and use the correct MongoDB Version [@MickLesk](https://github.com/MickLesk) ([#2600](https://github.com/community-scripts/ProxmoxVE/pull/2600)) -- Fix: Authelia Unbound Variable Argon2id [@MickLesk](https://github.com/MickLesk) ([#2604](https://github.com/community-scripts/ProxmoxVE/pull/2604)) -- Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) +- Fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) - Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) -- fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) +- Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) +- Fix: Authelia Unbound Variable Argon2id [@MickLesk](https://github.com/MickLesk) ([#2604](https://github.com/community-scripts/ProxmoxVE/pull/2604)) +- Fix: Omada check for AVX Support and use the correct MongoDB Version [@MickLesk](https://github.com/MickLesk) ([#2600](https://github.com/community-scripts/ProxmoxVE/pull/2600)) +- Fix: Update-Script Firefly III based on their docs [@MickLesk](https://github.com/MickLesk) ([#2534](https://github.com/community-scripts/ProxmoxVE/pull/2534)) -### ✨ Feature Updates (Updated Scripts) +### ✨ New Features - Feature: Template-Check, Better Handling of Downloads, Better Network… [@MickLesk](https://github.com/MickLesk) ([#2592](https://github.com/community-scripts/ProxmoxVE/pull/2592)) - Feature: Possibility to perform updates in silent / verbose (+ logging) [@MickLesk](https://github.com/MickLesk) ([#2583](https://github.com/community-scripts/ProxmoxVE/pull/2583)) From a3b1984d0a484e98bd8d5e7ef9422a2dc2512a55 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:10:26 +0100 Subject: [PATCH 043/167] Update changelog-pr-config.json --- .github/changelog-pr-config.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index 8168251b6..ec5fb85e4 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -15,6 +15,10 @@ "title": "🐞 Bug Fixes (Updated Scripts)", "labels": ["update script", "bugfix"] }, + { + "title": "🐞 Bug Fixes", + "labels": ["bugfix"] + }, { "title": "✨ Feature Updates (Updated Scripts)", "labels": ["update script", "feature"] From e2b6296cdfbfbbce9f3d61a9eb0fa04c662a2e9b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:11:21 +0100 Subject: [PATCH 044/167] Update changelog-pr-config.json --- .github/changelog-pr-config.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index ec5fb85e4..56401f4fc 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -7,22 +7,10 @@ "title": "🆕 New Scripts", "labels": ["new script"] }, - { - "title": "🚀 Updated Scripts", - "labels": ["update script"] - }, - { - "title": "🐞 Bug Fixes (Updated Scripts)", - "labels": ["update script", "bugfix"] - }, { "title": "🐞 Bug Fixes", "labels": ["bugfix"] }, - { - "title": "✨ Feature Updates (Updated Scripts)", - "labels": ["update script", "feature"] - }, { "title": "✨ New Features", "labels": ["feature"] From 42ad6832eac30a018ded9f0090ee3a93e683adaa Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:12:00 +0100 Subject: [PATCH 045/167] Update CHANGELOG.md (#2617) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c1de339..370720926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ Do not break established syntax in this file, as it is automatically updated by - New Script: Authelia [@thost96](https://github.com/thost96) ([#2060](https://github.com/community-scripts/ProxmoxVE/pull/2060)) - New Script: Jupyter Notebook [@Dave-code-creater](https://github.com/Dave-code-creater) ([#2561](https://github.com/community-scripts/ProxmoxVE/pull/2561)) -### 🚀 Updated Scripts +### 🐞 Bug Fixes - Fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) - Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) From 377d11bf48dbfe19ba697a3d51c100f534c5bddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:19:41 +0100 Subject: [PATCH 046/167] Fix: Authelia - Make user enter their domain manually (#2618) * Make user enter domain manually * Update json to remind user * Update authelia.json --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> --- install/authelia-install.sh | 6 ++---- json/authelia.json | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/install/authelia-install.sh b/install/authelia-install.sh index 514894e20..2ea34521c 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -26,15 +26,13 @@ wget -q "https://github.com/authelia/authelia/releases/download/${RELEASE}/authe $STD dpkg -i "authelia_${RELEASE}_amd64.deb" msg_ok "Install Authelia completed" +read -p "Enter your domain (ex. example.com): " DOMAIN + msg_info "Setting Authelia up" touch /etc/authelia/emails.txt JWT_SECRET=$(openssl rand -hex 64) SESSION_SECRET=$(openssl rand -hex 64) STORAGE_KEY=$(openssl rand -hex 64) -DOMAIN=$(hostname -d) -if [ -z "$DOMAIN" ]; then - DOMAIN=$(hostname) -fi cat </etc/authelia/users.yml users: authelia: diff --git a/json/authelia.json b/json/authelia.json index d8f2d1c02..95ed5dbff 100644 --- a/json/authelia.json +++ b/json/authelia.json @@ -30,5 +30,10 @@ "username": "authelia", "password": "authelia" }, - "notes": [] + "notes": [ + { + "text": "During installation, you will have to input your domain (ex. domain.com). Authelia will use auth.domain.com", + "type": "info" + } + ] } From bf9edf41d9423b566d5294ad1025682b64e0f919 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:40:39 +0100 Subject: [PATCH 047/167] Update CHANGELOG.md (#2620) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 370720926..2f4b80c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,9 +30,9 @@ Do not break established syntax in this file, as it is automatically updated by ### 🐞 Bug Fixes +- Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) - Fix: homarr db migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2575](https://github.com/community-scripts/ProxmoxVE/pull/2575)) - Fix: Wireguard - Restart wgdashboard automatically after update [@LostALice](https://github.com/LostALice) ([#2587](https://github.com/community-scripts/ProxmoxVE/pull/2587)) -- Fix Docmost: default upload size and saving data when updating [@bvdberg01](https://github.com/bvdberg01) ([#2598](https://github.com/community-scripts/ProxmoxVE/pull/2598)) - Fix: Authelia Unbound Variable Argon2id [@MickLesk](https://github.com/MickLesk) ([#2604](https://github.com/community-scripts/ProxmoxVE/pull/2604)) - Fix: Omada check for AVX Support and use the correct MongoDB Version [@MickLesk](https://github.com/MickLesk) ([#2600](https://github.com/community-scripts/ProxmoxVE/pull/2600)) - Fix: Update-Script Firefly III based on their docs [@MickLesk](https://github.com/MickLesk) ([#2534](https://github.com/community-scripts/ProxmoxVE/pull/2534)) @@ -45,6 +45,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🌐 Website +- Fix: Authelia - Make user enter their domain manually [@tremor021](https://github.com/tremor021) ([#2618](https://github.com/community-scripts/ProxmoxVE/pull/2618)) - Website: Change Info for PiHole Password [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2602](https://github.com/community-scripts/ProxmoxVE/pull/2602)) - Fix: Jupyter Json (missing logo & improve name on website) [@MickLesk](https://github.com/MickLesk) ([#2584](https://github.com/community-scripts/ProxmoxVE/pull/2584)) From 03424f047470a0c98363d840d540248438b08216 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:19:18 +0100 Subject: [PATCH 048/167] Update bookstack.sh --- ct/bookstack.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/bookstack.sh b/ct/bookstack.sh index bfd90689f..1301e5f1f 100644 --- a/ct/bookstack.sh +++ b/ct/bookstack.sh @@ -43,7 +43,8 @@ function update_script() { cp -r /opt/bookstack-backup/storage/uploads/* /opt/bookstack/storage/uploads/ || true cp -r /opt/bookstack-backup/themes/* /opt/bookstack/themes/ || true cd /opt/bookstack - $STD COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev + export COMPOSER_ALLOW_SUPERUSER=1 + $STD composer install --no-dev $STD php artisan migrate --force chown www-data:www-data -R /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage chmod -R 755 /opt/bookstack /opt/bookstack/bootstrap/cache /opt/bookstack/public/uploads /opt/bookstack/storage From 87c17fc16d6368e70672ddf29ad8c19f4c198473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jc=20Mi=C3=B1arro?= Date: Tue, 25 Feb 2025 08:42:48 +0100 Subject: [PATCH 049/167] Downgrade mongodb to v7.0 when installing Omada controller (#2625) --- install/omada-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index 3c16d72e1..ebe98f9c4 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -20,7 +20,7 @@ msg_ok "Installed Dependencies" msg_info "Checking CPU Features" if lscpu | grep -q 'avx'; then USE_AVX=true - MONGODB_VERSION="8.0" + MONGODB_VERSION="7.0" msg_ok "AVX detected: Using MongoDB 8.0" else USE_AVX=false From 02fb3ab9b448f61cf0e0774347d0f92ed830d3af Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Feb 2025 08:44:53 +0100 Subject: [PATCH 050/167] Update omada-install.sh --- install/omada-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/omada-install.sh b/install/omada-install.sh index ebe98f9c4..2c4ee4f79 100644 --- a/install/omada-install.sh +++ b/install/omada-install.sh @@ -21,11 +21,12 @@ msg_info "Checking CPU Features" if lscpu | grep -q 'avx'; then USE_AVX=true MONGODB_VERSION="7.0" - msg_ok "AVX detected: Using MongoDB 8.0" + msg_ok "AVX detected: Using MongoDB 7.0" else USE_AVX=false MONGODB_VERSION="4.4" - msg_ok "No AVX detected: Using MongoDB 4.4" + msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/" + exit 1 fi msg_info "Installing Azul Zulu Java" From bef3ccd1642758fab4bfc44b712589d9bdd6ecff Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 25 Feb 2025 08:46:18 +0100 Subject: [PATCH 051/167] Update omada.sh --- ct/omada.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/omada.sh b/ct/omada.sh index b0a4f90d1..ace02b9b8 100644 --- a/ct/omada.sh +++ b/ct/omada.sh @@ -29,9 +29,11 @@ function update_script() { fi msg_info "Updating MongoDB" - MONGODB_VERSION="8.0" + MONGODB_VERSION="7.0" if ! lscpu | grep -q 'avx'; then MONGODB_VERSION="4.4" + msg_error "No AVX detected: TP-Link Canceled Support for Old MongoDB for Debian 12\n https://www.tp-link.com/baltic/support/faq/4160/" + exit 1 fi wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg From 893bff1b59957493f4554b203d0b9de47edca72a Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:55:17 +0200 Subject: [PATCH 052/167] [gh] Update Changelog Workflow (#2621) * Update Workflow * Update Workflow --- .github/autolabeler-config.json | 1 + .github/changelog-pr-config.json | 20 +++++-- .github/workflows/autolabeler.yml | 28 ++++++++-- .github/workflows/changelog-pr.yml | 83 +++++++++++++++++++++--------- 4 files changed, 100 insertions(+), 32 deletions(-) diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 399004ee1..7f577efa0 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -68,4 +68,5 @@ "excludeGlobs": [] } ] + } diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index 56401f4fc..833c2b372 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -7,14 +7,26 @@ "title": "🆕 New Scripts", "labels": ["new script"] }, - { - "title": "🐞 Bug Fixes", - "labels": ["bugfix"] - }, { "title": "✨ New Features", "labels": ["feature"] }, + { + "title": "🚀 Updated Scripts", + "labels": ["update script"], + "subCategories": [ + { + "title": "🐞 Bug Fixes", + "labels": ["bugfix"], + "notes" : [] + }, + { + "title": "General Updates", + "labels": ["general"], + "notes" : [] + } + ] + }, { "title": "🌐 Website", "labels": ["website"] diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 4e0a04348..f2df791fb 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -32,8 +32,9 @@ jobs: const autolabelerConfig = JSON.parse(fileContent); const prNumber = context.payload.pull_request.number; - const prBody = context.payload.pull_request.body; - + + const prBody = context.payload.pull_request.body.toLowerCase(); + let labelsToAdd = new Set(); const prListFilesResponse = await github.rest.pulls.listFiles({ @@ -42,14 +43,35 @@ jobs: pull_number: prNumber, }); const prFiles = prListFilesResponse.data; + + const templateLabelMappings = { + "🐞 **bug fix**": "bugfix", + "✨ **new feature**": "feature", + "💥 **breaking change**": "breaking change", + "🆕 **new script**": "new script" + }; + + for (const [checkbox, label] of Object.entries(templateLabelMappings)) { + const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); + const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i"); + const match = prBody.match(regex); + if (match) { + console.log(`Match: ${match}`); + labelsToAdd.add(label); + } + } + if (labelsToAdd.size === 0) { + labelsToAdd.add("general"); + } + // Apply labels based on file changes for (const [label, rules] of Object.entries(autolabelerConfig)) { const shouldAddLabel = prFiles.some((prFile) => { return rules.some((rule) => { const isFileStatusMatch = rule.fileStatus ? rule.fileStatus === prFile.status : true; const isIncludeGlobMatch = rule.includeGlobs.some((glob) => minimatch(prFile.filename, glob)); const isExcludeGlobMatch = rule.excludeGlobs.some((glob) => minimatch(prFile.filename, glob)); - + return isFileStatusMatch && isIncludeGlobMatch && !isExcludeGlobMatch; }); }); diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 58bfd8a4a..47f8f2218 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -30,7 +30,6 @@ jobs: - name: Get latest dates in changelog run: | - # Extrahiere die neuesten zwei Daten aus dem Changelog DATES=$(grep -E '^## [0-9]{4}-[0-9]{2}-[0-9]{2}' CHANGELOG.md | head -n 2 | awk '{print $2}') LATEST_DATE=$(echo "$DATES" | sed -n '1p') @@ -55,7 +54,15 @@ jobs: const configPath = path.resolve(process.env.CONFIG_PATH); const fileContent = await fs.readFile(configPath, 'utf-8'); const changelogConfig = JSON.parse(fileContent); - const categorizedPRs = changelogConfig.map(obj => ({ ...obj, notes: [] })); + + const categorizedPRs = changelogConfig.map(obj => ({ + ...obj, + notes: [], + subCategories: obj.subCategories ?? (obj.labels.includes("update script") ? [ + { title: "🐞 Bug Fixes", labels: ["bugfix"] }, + { title: "✨ Feature Updates", labels: ["feature"] } + ] : []) + })); const latestDateInChangelog = new Date(process.env.LATEST_DATE); latestDateInChangelog.setUTCHours(23, 59, 59, 999); @@ -70,29 +77,33 @@ jobs: per_page: 100, }); - pulls.filter(pr => - pr.merged_at && - new Date(pr.merged_at) > latestDateInChangelog && - !pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase())) + pulls.filter(pr => + pr.merged_at && + new Date(pr.merged_at) > latestDateInChangelog && + !pr.labels.some(label => + ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()) + ) ).forEach(pr => { + const prLabels = pr.labels.map(label => label.name.toLowerCase()); const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`; - let isCategorized = false; - for (const { labels, notes } of categorizedPRs) { - // If no labels are specified (e.g., "Unlabelled"), assign to this category - if (labels.length === 0 && prLabels.length === 0) { - notes.push(prNote); - isCategorized = true; - break; - } + const updateScriptsCategory = categorizedPRs.find(category => + category.labels.some(label => prLabels.includes(label)) + ); + + if (updateScriptsCategory) { + + const subCategory = updateScriptsCategory.subCategories.find(sub => + sub.labels.some(label => prLabels.includes(label)) + ); + + if (subCategory) { + subCategory.notes.push(prNote); + } else { + updateScriptsCategory.notes.push(prNote); - // If labels are specified, check if PR has ALL required labels - if (labels.length > 0 && labels.every(label => prLabels.includes(label.toLowerCase()))) { - notes.push(prNote); - isCategorized = true; - break; } } @@ -104,9 +115,12 @@ jobs: } } }); + + console.log(JSON.stringify(categorizedPRs, null, 2)); return categorizedPRs; + - name: Update CHANGELOG.md uses: actions/github-script@v7 with: @@ -119,13 +133,32 @@ jobs: const changelogPath = path.resolve('CHANGELOG.md'); const categorizedPRs = ${{ steps.get-categorized-prs.outputs.result }}; - let newReleaseNotes = `## ${today}\n\n### Changes\n\n`; - for (const { title, notes } of categorizedPRs) { - if (notes.length > 0) { - newReleaseNotes += `### ${title}\n\n${notes.join("\n")}\n\n`; - } - } + console.log(JSON.stringify(categorizedPRs, null, 2)); + let newReleaseNotes = `## ${today}\n\n### Changes\n\n`; + for (const { title, notes, subCategories } of categorizedPRs) { + const hasSubcategories = subCategories && subCategories.length > 0; + const hasMainNotes = notes.length > 0; + const hasSubNotes = hasSubcategories && subCategories.some(sub => sub.notes && sub.notes.length > 0); + + if (hasMainNotes || hasSubNotes) { + newReleaseNotes += `### ${title}\n\n`; + } + + if (hasMainNotes) { + newReleaseNotes += `${notes.join("\n")}\n\n`; + } + + if (hasSubcategories) { + for (const { title: subTitle, notes: subNotes } of subCategories) { + if (subNotes && subNotes.length > 0) { + newReleaseNotes += ` #### ${subTitle}\n\n`; + newReleaseNotes += ` ${subNotes.join("\n ")}\n\n`; + } + } + } + } + const changelogContent = await fs.readFile(changelogPath, 'utf-8'); const changelogIncludesTodaysReleaseNotes = changelogContent.includes(`\n## ${today}`); From aba73bd0f86aaa8e53bbdd90b8b4fdf41e43d454 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:00:28 +0100 Subject: [PATCH 053/167] Update CHANGELOG.md (#2628) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f4b80c9f..59309762c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,14 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-02-25 + +### Changes + +### ❔ Unlabelled + +- Fix Omada installer [@JcMinarro](https://github.com/JcMinarro) ([#2625](https://github.com/community-scripts/ProxmoxVE/pull/2625)) + ## 2025-02-24 ### Changes From 029332fb518d13f69fa3d0cc5a2a5856e3039bb9 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:20:09 +0200 Subject: [PATCH 054/167] Revert "[gh] Update Changelog Workflow (#2621)" (#2630) This reverts commit 893bff1b59957493f4554b203d0b9de47edca72a. --- .github/autolabeler-config.json | 1 - .github/changelog-pr-config.json | 20 ++------ .github/workflows/autolabeler.yml | 28 ++--------- .github/workflows/changelog-pr.yml | 81 +++++++++--------------------- 4 files changed, 31 insertions(+), 99 deletions(-) diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 7f577efa0..399004ee1 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -68,5 +68,4 @@ "excludeGlobs": [] } ] - } diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index 833c2b372..56401f4fc 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -7,26 +7,14 @@ "title": "🆕 New Scripts", "labels": ["new script"] }, + { + "title": "🐞 Bug Fixes", + "labels": ["bugfix"] + }, { "title": "✨ New Features", "labels": ["feature"] }, - { - "title": "🚀 Updated Scripts", - "labels": ["update script"], - "subCategories": [ - { - "title": "🐞 Bug Fixes", - "labels": ["bugfix"], - "notes" : [] - }, - { - "title": "General Updates", - "labels": ["general"], - "notes" : [] - } - ] - }, { "title": "🌐 Website", "labels": ["website"] diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index f2df791fb..4e0a04348 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -32,9 +32,8 @@ jobs: const autolabelerConfig = JSON.parse(fileContent); const prNumber = context.payload.pull_request.number; - - const prBody = context.payload.pull_request.body.toLowerCase(); - + const prBody = context.payload.pull_request.body; + let labelsToAdd = new Set(); const prListFilesResponse = await github.rest.pulls.listFiles({ @@ -43,35 +42,14 @@ jobs: pull_number: prNumber, }); const prFiles = prListFilesResponse.data; - - const templateLabelMappings = { - "🐞 **bug fix**": "bugfix", - "✨ **new feature**": "feature", - "💥 **breaking change**": "breaking change", - "🆕 **new script**": "new script" - }; - - for (const [checkbox, label] of Object.entries(templateLabelMappings)) { - const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); - const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i"); - const match = prBody.match(regex); - if (match) { - console.log(`Match: ${match}`); - labelsToAdd.add(label); - } - } - if (labelsToAdd.size === 0) { - labelsToAdd.add("general"); - } - // Apply labels based on file changes for (const [label, rules] of Object.entries(autolabelerConfig)) { const shouldAddLabel = prFiles.some((prFile) => { return rules.some((rule) => { const isFileStatusMatch = rule.fileStatus ? rule.fileStatus === prFile.status : true; const isIncludeGlobMatch = rule.includeGlobs.some((glob) => minimatch(prFile.filename, glob)); const isExcludeGlobMatch = rule.excludeGlobs.some((glob) => minimatch(prFile.filename, glob)); - + return isFileStatusMatch && isIncludeGlobMatch && !isExcludeGlobMatch; }); }); diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 47f8f2218..58bfd8a4a 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -30,6 +30,7 @@ jobs: - name: Get latest dates in changelog run: | + # Extrahiere die neuesten zwei Daten aus dem Changelog DATES=$(grep -E '^## [0-9]{4}-[0-9]{2}-[0-9]{2}' CHANGELOG.md | head -n 2 | awk '{print $2}') LATEST_DATE=$(echo "$DATES" | sed -n '1p') @@ -54,15 +55,7 @@ jobs: const configPath = path.resolve(process.env.CONFIG_PATH); const fileContent = await fs.readFile(configPath, 'utf-8'); const changelogConfig = JSON.parse(fileContent); - - const categorizedPRs = changelogConfig.map(obj => ({ - ...obj, - notes: [], - subCategories: obj.subCategories ?? (obj.labels.includes("update script") ? [ - { title: "🐞 Bug Fixes", labels: ["bugfix"] }, - { title: "✨ Feature Updates", labels: ["feature"] } - ] : []) - })); + const categorizedPRs = changelogConfig.map(obj => ({ ...obj, notes: [] })); const latestDateInChangelog = new Date(process.env.LATEST_DATE); latestDateInChangelog.setUTCHours(23, 59, 59, 999); @@ -77,33 +70,29 @@ jobs: per_page: 100, }); - pulls.filter(pr => - pr.merged_at && - new Date(pr.merged_at) > latestDateInChangelog && - !pr.labels.some(label => - ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()) - ) + pulls.filter(pr => + pr.merged_at && + new Date(pr.merged_at) > latestDateInChangelog && + !pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase())) ).forEach(pr => { - const prLabels = pr.labels.map(label => label.name.toLowerCase()); const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`; + let isCategorized = false; - const updateScriptsCategory = categorizedPRs.find(category => - category.labels.some(label => prLabels.includes(label)) - ); - - if (updateScriptsCategory) { - - const subCategory = updateScriptsCategory.subCategories.find(sub => - sub.labels.some(label => prLabels.includes(label)) - ); - - if (subCategory) { - subCategory.notes.push(prNote); - } else { - updateScriptsCategory.notes.push(prNote); + for (const { labels, notes } of categorizedPRs) { + // If no labels are specified (e.g., "Unlabelled"), assign to this category + if (labels.length === 0 && prLabels.length === 0) { + notes.push(prNote); + isCategorized = true; + break; + } + // If labels are specified, check if PR has ALL required labels + if (labels.length > 0 && labels.every(label => prLabels.includes(label.toLowerCase()))) { + notes.push(prNote); + isCategorized = true; + break; } } @@ -115,12 +104,9 @@ jobs: } } }); - - console.log(JSON.stringify(categorizedPRs, null, 2)); return categorizedPRs; - - name: Update CHANGELOG.md uses: actions/github-script@v7 with: @@ -133,32 +119,13 @@ jobs: const changelogPath = path.resolve('CHANGELOG.md'); const categorizedPRs = ${{ steps.get-categorized-prs.outputs.result }}; - console.log(JSON.stringify(categorizedPRs, null, 2)); - let newReleaseNotes = `## ${today}\n\n### Changes\n\n`; - for (const { title, notes, subCategories } of categorizedPRs) { - const hasSubcategories = subCategories && subCategories.length > 0; - const hasMainNotes = notes.length > 0; - const hasSubNotes = hasSubcategories && subCategories.some(sub => sub.notes && sub.notes.length > 0); - - if (hasMainNotes || hasSubNotes) { - newReleaseNotes += `### ${title}\n\n`; - } - - if (hasMainNotes) { - newReleaseNotes += `${notes.join("\n")}\n\n`; - } - - if (hasSubcategories) { - for (const { title: subTitle, notes: subNotes } of subCategories) { - if (subNotes && subNotes.length > 0) { - newReleaseNotes += ` #### ${subTitle}\n\n`; - newReleaseNotes += ` ${subNotes.join("\n ")}\n\n`; - } - } + for (const { title, notes } of categorizedPRs) { + if (notes.length > 0) { + newReleaseNotes += `### ${title}\n\n${notes.join("\n")}\n\n`; } - } - + } + const changelogContent = await fs.readFile(changelogPath, 'utf-8'); const changelogIncludesTodaysReleaseNotes = changelogContent.includes(`\n## ${today}`); From 59223628afa728f5b9cd2e0ff6c096ee075b149f Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:20:41 +0200 Subject: [PATCH 055/167] Update Tailscale-lxc Json: Add message for Supported OS (#2629) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update add-tailscale-lxc.json * Update json/add-tailscale-lxc.json Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> * Update json/add-tailscale-lxc.json Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- json/add-tailscale-lxc.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/json/add-tailscale-lxc.json b/json/add-tailscale-lxc.json index 5ee395600..13e247c84 100644 --- a/json/add-tailscale-lxc.json +++ b/json/add-tailscale-lxc.json @@ -31,6 +31,10 @@ "password": null }, "notes": [ + { + "text": "Only supported on Debian 12 LXCs", + "type": "warning" + }, { "text": "After the script finishes, reboot the LXC then run `tailscale up` in the LXC console", "type": "info" @@ -40,4 +44,4 @@ "type": "info" } ] -} \ No newline at end of file +} From 599a518cc36828c8d951d1700c53c47ff313d546 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 09:27:14 +0100 Subject: [PATCH 056/167] Update CHANGELOG.md (#2631) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59309762c..5cc7b12d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,14 @@ Do not break established syntax in this file, as it is automatically updated by ### Changes +### 🌐 Website + +- Update Tailscale-lxc Json: Add message for Supported OS [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2629](https://github.com/community-scripts/ProxmoxVE/pull/2629)) + +### 🧰 Maintenance + +- [gh] Update Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2621](https://github.com/community-scripts/ProxmoxVE/pull/2621)) + ### ❔ Unlabelled - Fix Omada installer [@JcMinarro](https://github.com/JcMinarro) ([#2625](https://github.com/community-scripts/ProxmoxVE/pull/2625)) From 3401b76c44926295a752983d30cd00f7a506efaa Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:27:31 +0200 Subject: [PATCH 057/167] Updated Changelog Workflow (#2632) --- .github/autolabeler-config.json | 2 +- .github/changelog-pr-config.json | 21 +++++-- .github/workflows/autolabeler.yml | 43 +++++++++------ .github/workflows/changelog-pr.yml | 89 +++++++++++++++++++----------- 4 files changed, 99 insertions(+), 56 deletions(-) diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 399004ee1..43c272f87 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -67,5 +67,5 @@ "includeGlobs": ["misc/build.func", "misc/install.func", "ct/create_lxc.sh"], "excludeGlobs": [] } - ] + ] } diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index 56401f4fc..558f32fe1 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -7,14 +7,27 @@ "title": "🆕 New Scripts", "labels": ["new script"] }, - { - "title": "🐞 Bug Fixes", - "labels": ["bugfix"] - }, { "title": "✨ New Features", "labels": ["feature"] }, + { + "title": "🚀 Updated Scripts", + "labels": ["update script"], + "subCategories": [ + { + "title": "🐞 Bug Fixes", + "labels": ["bugfix"], + "notes" : [] + }, + { + "title": "General Updates", + "labels": ["general"], + "notes" : [] + } + ] + }, + { "title": "🌐 Website", "labels": ["website"] diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 4e0a04348..0051d787d 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -32,8 +32,8 @@ jobs: const autolabelerConfig = JSON.parse(fileContent); const prNumber = context.payload.pull_request.number; - const prBody = context.payload.pull_request.body; - + const prBody = context.payload.pull_request.body.toLowerCase(); + let labelsToAdd = new Set(); const prListFilesResponse = await github.rest.pulls.listFiles({ @@ -42,14 +42,35 @@ jobs: pull_number: prNumber, }); const prFiles = prListFilesResponse.data; + + const templateLabelMappings = { + "🐞 **bug fix**": "bugfix", + "✨ **new feature**": "feature", + "💥 **breaking change**": "breaking change", + "🆕 **new script**": "new script" + }; + + for (const [checkbox, label] of Object.entries(templateLabelMappings)) { + const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); + const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i"); + const match = prBody.match(regex); + if (match) { + console.log(`Match: ${match}`); + labelsToAdd.add(label); + } + } + if (labelsToAdd.size === 0) { + labelsToAdd.add("general"); + } + // Apply labels based on file changes for (const [label, rules] of Object.entries(autolabelerConfig)) { const shouldAddLabel = prFiles.some((prFile) => { return rules.some((rule) => { const isFileStatusMatch = rule.fileStatus ? rule.fileStatus === prFile.status : true; const isIncludeGlobMatch = rule.includeGlobs.some((glob) => minimatch(prFile.filename, glob)); const isExcludeGlobMatch = rule.excludeGlobs.some((glob) => minimatch(prFile.filename, glob)); - + return isFileStatusMatch && isIncludeGlobMatch && !isExcludeGlobMatch; }); }); @@ -58,21 +79,7 @@ jobs: labelsToAdd.add(label); } } - - const templateLabelMappings = { - "🐞 bug fix": "bugfix", - "✨ new feature": "feature", - "💥 breaking change": "breaking change", - "🆕 new script": "new script" - }; - - for (const [checkbox, label] of Object.entries(templateLabelMappings)) { - const regex = new RegExp(`- \\[x\\] ${checkbox}`, "i"); // Match only checked checkboxes - if (regex.test(prBody)) { - labelsToAdd.add(label); - } - } - + console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`); if (labelsToAdd.size > 0) { diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 58bfd8a4a..5ca3b9bd7 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -30,7 +30,6 @@ jobs: - name: Get latest dates in changelog run: | - # Extrahiere die neuesten zwei Daten aus dem Changelog DATES=$(grep -E '^## [0-9]{4}-[0-9]{2}-[0-9]{2}' CHANGELOG.md | head -n 2 | awk '{print $2}') LATEST_DATE=$(echo "$DATES" | sed -n '1p') @@ -55,7 +54,15 @@ jobs: const configPath = path.resolve(process.env.CONFIG_PATH); const fileContent = await fs.readFile(configPath, 'utf-8'); const changelogConfig = JSON.parse(fileContent); - const categorizedPRs = changelogConfig.map(obj => ({ ...obj, notes: [] })); + + const categorizedPRs = changelogConfig.map(obj => ({ + ...obj, + notes: [], + subCategories: obj.subCategories ?? (obj.labels.includes("update script") ? [ + { title: "🐞 Bug Fixes", labels: ["bugfix"] }, + { title: "✨ Feature Updates", labels: ["feature"] } + ] : []) + })); const latestDateInChangelog = new Date(process.env.LATEST_DATE); latestDateInChangelog.setUTCHours(23, 59, 59, 999); @@ -70,40 +77,36 @@ jobs: per_page: 100, }); - pulls.filter(pr => - pr.merged_at && - new Date(pr.merged_at) > latestDateInChangelog && - !pr.labels.some(label => ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase())) + pulls.filter(pr => + pr.merged_at && + new Date(pr.merged_at) > latestDateInChangelog && + !pr.labels.some(label => + ["invalid", "wontdo", process.env.AUTOMATED_PR_LABEL].includes(label.name.toLowerCase()) + ) ).forEach(pr => { + const prLabels = pr.labels.map(label => label.name.toLowerCase()); const prNote = `- ${pr.title} [@${pr.user.login}](https://github.com/${pr.user.login}) ([#${pr.number}](${pr.html_url}))`; - let isCategorized = false; + const updateScriptsCategory = categorizedPRs.find(category => + category.labels.some(label => prLabels.includes(label)) + ); - for (const { labels, notes } of categorizedPRs) { - // If no labels are specified (e.g., "Unlabelled"), assign to this category - if (labels.length === 0 && prLabels.length === 0) { - notes.push(prNote); - isCategorized = true; - break; - } + if (updateScriptsCategory) { + + const subCategory = updateScriptsCategory.subCategories.find(sub => + sub.labels.some(label => prLabels.includes(label)) + ); - // If labels are specified, check if PR has ALL required labels - if (labels.length > 0 && labels.every(label => prLabels.includes(label.toLowerCase()))) { - notes.push(prNote); - isCategorized = true; - break; - } - } - - // If PR is not categorized, assign it to the "Unlabelled" category - if (!isCategorized) { - const unlabelledCategory = categorizedPRs.find(cat => cat.title === "❔ Unlabelled"); - if (unlabelledCategory) { - unlabelledCategory.notes.push(prNote); + if (subCategory) { + subCategory.notes.push(prNote); + } else { + updateScriptsCategory.notes.push(prNote); } } }); + + console.log(JSON.stringify(categorizedPRs, null, 2)); return categorizedPRs; @@ -119,13 +122,33 @@ jobs: const changelogPath = path.resolve('CHANGELOG.md'); const categorizedPRs = ${{ steps.get-categorized-prs.outputs.result }}; - let newReleaseNotes = `## ${today}\n\n### Changes\n\n`; - for (const { title, notes } of categorizedPRs) { - if (notes.length > 0) { - newReleaseNotes += `### ${title}\n\n${notes.join("\n")}\n\n`; - } - } + console.log(JSON.stringify(categorizedPRs, null, 2)); + let newReleaseNotes = `## ${today}\n\n### Changes\n\n`; + for (const { title, notes, subCategories } of categorizedPRs) { + const hasSubcategories = subCategories && subCategories.length > 0; + const hasMainNotes = notes.length > 0; + const hasSubNotes = hasSubcategories && subCategories.some(sub => sub.notes && sub.notes.length > 0); + + + if (hasMainNotes || hasSubNotes) { + newReleaseNotes += `### ${title}\n\n`; + } + + if (hasMainNotes) { + newReleaseNotes += `${notes.join("\n")}\n\n`; + } + + if (hasSubcategories) { + for (const { title: subTitle, notes: subNotes } of subCategories) { + if (subNotes && subNotes.length > 0) { + newReleaseNotes += ` #### ${subTitle}\n\n`; + newReleaseNotes += ` ${subNotes.join("\n ")}\n\n`; + } + } + } + } + const changelogContent = await fs.readFile(changelogPath, 'utf-8'); const changelogIncludesTodaysReleaseNotes = changelogContent.includes(`\n## ${today}`); From cb462dcb39984041b45d0ad8730cc0fecabba1ba Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:41:08 +0200 Subject: [PATCH 058/167] Update add-tailscale-lxc.sh (#2633) --- misc/add-tailscale-lxc.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/add-tailscale-lxc.sh b/misc/add-tailscale-lxc.sh index 36d148e40..93f37b9cd 100644 --- a/misc/add-tailscale-lxc.sh +++ b/misc/add-tailscale-lxc.sh @@ -67,6 +67,9 @@ echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https:// apt-get update &>/dev/null apt-get install -y tailscale &>/dev/null ' || exit +TAGS=$(awk -F': ' '/^tags:/ {print $2}' /etc/pve/lxc/${CTID}.conf) +TAGS="${TAGS:+$TAGS; }tailscale" +pct set "$CTID" -tags "${TAGS}" msg "\e[1;32m ✔ Installed Tailscale\e[0m" msg "\e[1;31m Reboot ${CTID} LXC to apply the changes, then run tailscale up in the LXC console\e[0m" From d564dc0ecb1130a7b4ca26fd9e1855f571ee16c4 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:38:57 +0100 Subject: [PATCH 059/167] Update CHANGELOG.md (#2634) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cc7b12d0..588bfd386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,17 +21,23 @@ Do not break established syntax in this file, as it is automatically updated by ### Changes +### ✨ New Features + +- Update Tailscale: Add Tag when installation is finished [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2633](https://github.com/community-scripts/ProxmoxVE/pull/2633)) + +### 🚀 Updated Scripts + + #### 🐞 Bug Fixes + + - Fix Omada installer [@JcMinarro](https://github.com/JcMinarro) ([#2625](https://github.com/community-scripts/ProxmoxVE/pull/2625)) + ### 🌐 Website - Update Tailscale-lxc Json: Add message for Supported OS [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2629](https://github.com/community-scripts/ProxmoxVE/pull/2629)) ### 🧰 Maintenance -- [gh] Update Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2621](https://github.com/community-scripts/ProxmoxVE/pull/2621)) - -### ❔ Unlabelled - -- Fix Omada installer [@JcMinarro](https://github.com/JcMinarro) ([#2625](https://github.com/community-scripts/ProxmoxVE/pull/2625)) +- [gh] Updated Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2632](https://github.com/community-scripts/ProxmoxVE/pull/2632)) ## 2025-02-24 From 82d4ee01d29bf5c0ccbe1a9b542d44aa928b8b49 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Feb 2025 09:18:00 +0100 Subject: [PATCH 060/167] Alpine IT-Tools fix typo "unexpected EOF while looking for matching `"' (#2644) --- ct/alpine-it-tools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-it-tools.sh b/ct/alpine-it-tools.sh index 0aaa2a175..40d9d087c 100644 --- a/ct/alpine-it-tools.sh +++ b/ct/alpine-it-tools.sh @@ -30,7 +30,7 @@ if [ ! -d /usr/share/nginx/html ]; then fi RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4) -if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt" ] || [ ! -f /opt/${APP}_version.txt ]; then +if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" msg_info "Updating ${APP} LXC" curl -fsSL -o it-tools.zip "$DOWNLOAD_URL" From 0641ec1e2ab1694a9deee101c0127f120453837c Mon Sep 17 00:00:00 2001 From: Sven Schneider Date: Wed, 26 Feb 2025 09:35:22 +0100 Subject: [PATCH 061/167] fix(pocketid): Website and documentation links updated (#2643) fix: #2639 --- json/pocketid.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/pocketid.json b/json/pocketid.json index 65f000408..31849fa18 100644 --- a/json/pocketid.json +++ b/json/pocketid.json @@ -9,8 +9,8 @@ "updateable": true, "privileged": false, "interface_port": 80, - "documentation": "https://stonith404.github.io/pocket-id/introduction", - "website": "https://github.com/stonith404/pocket-id", + "documentation": "https://pocket-id.org/docs/", + "website": "https://github.com/pocket-id/pocket-id", "logo": "https://raw.githubusercontent.com/pocket-id/pocket-id/refs/heads/main/backend/resources/images/logoDark.svg", "description": "Pocket ID is a simple OIDC provider that allows users to authenticate with their passkeys to your services.", "install_methods": [ From 90fc30a228da0694e7ac7320f25d527c09a3e51f Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 10:43:30 +0200 Subject: [PATCH 062/167] Update CHANGELOG.md (#2645) --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 588bfd386..d068f06da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,20 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-02-26 + +### Changes + +### 🚀 Updated Scripts + + #### 🐞 Bug Fixes + + - Alpine IT-Tools fix typo "unexpected EOF while looking for matching `"' [@MickLesk](https://github.com/MickLesk) ([#2644](https://github.com/community-scripts/ProxmoxVE/pull/2644)) + +### 🌐 Website + +- Website: PocketID Change of website and documentation links [@schneider-de-com](https://github.com/schneider-de-com) ([#2643](https://github.com/community-scripts/ProxmoxVE/pull/2643)) + ## 2025-02-25 ### Changes From 981baed9d38fc0f849d65d9a2b116a923e4da90d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Feb 2025 09:50:13 +0100 Subject: [PATCH 063/167] PiHole: Fix Unbound sed for DNS (#2647) --- install/pihole-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 3a8804752..5e3743432 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -141,7 +141,7 @@ server=8.8.8.8 server=8.8.4.4 EOF - sed -i -E "s|^(upstreams =).*|\1 [\"127.0.0.1#5335\", \"8.8.4.4\"]|" /etc/pihole/pihole.toml + sed -i -E 's|^(\s*upstreams =).*|\1 ["127.0.0.1#5335", "8.8.4.4"]|' /etc/pihole/pihole.toml systemctl enable -q --now unbound systemctl restart pihole-FTL.service msg_ok "Installed Unbound" From 633dbe3e2b63f21392d8b9726413c87659d78f17 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 09:57:04 +0100 Subject: [PATCH 064/167] Update CHANGELOG.md (#2648) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d068f06da..0dd747157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,8 @@ Do not break established syntax in this file, as it is automatically updated by #### 🐞 Bug Fixes - - Alpine IT-Tools fix typo "unexpected EOF while looking for matching `"' [@MickLesk](https://github.com/MickLesk) ([#2644](https://github.com/community-scripts/ProxmoxVE/pull/2644)) + - PiHole: Fix Unbound sed for DNS [@MickLesk](https://github.com/MickLesk) ([#2647](https://github.com/community-scripts/ProxmoxVE/pull/2647)) + - Alpine IT-Tools fix typo "unexpected EOF while looking for matching `"' [@MickLesk](https://github.com/MickLesk) ([#2644](https://github.com/community-scripts/ProxmoxVE/pull/2644)) ### 🌐 Website From fda95578112b018556911ea2eb6aec5fb8851250 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Feb 2025 13:16:11 +0100 Subject: [PATCH 065/167] Kimai: add local.yaml & fix path permissions (#2646) * Update kimai-install.sh * Update kimai.sh * Update kimai.sh --- ct/kimai.sh | 9 ++++++--- install/kimai-install.sh | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ct/kimai.sh b/ct/kimai.sh index 8b03eafbd..27ed79a18 100644 --- a/ct/kimai.sh +++ b/ct/kimai.sh @@ -35,19 +35,22 @@ function update_script() { msg_info "Updating ${APP} to ${RELEASE}" cp /opt/kimai/.env /opt/.env + [ -f /opt/kimai/config/packages/local.yaml ] && cp /opt/kimai/config/packages/local.yaml /opt/local.yaml rm -rf /opt/kimai wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" unzip -q ${RELEASE}.zip mv kimai-${RELEASE} /opt/kimai mv /opt/.env /opt/kimai/.env + [ -f /opt/local.yaml ] && mv /opt/local.yaml /opt/kimai/config/packages/local.yaml cd /opt/kimai $STD composer install --no-dev --optimize-autoloader $STD bin/console kimai:update chown -R :www-data . chmod -R g+r . chmod -R g+rw var/ - sudo chown -R www-data:www-data /opt/kimai - sudo chmod -R 755 /opt/kimai + chmod -R 777 /opt/kimai/var/ + chown -R www-data:www-data /opt/kimai + chmod -R 755 /opt/kimai echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP} to ${RELEASE}" @@ -72,4 +75,4 @@ 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 "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/install/kimai-install.sh b/install/kimai-install.sh index 77151fff8..7dc5c5b77 100644 --- a/install/kimai-install.sh +++ b/install/kimai-install.sh @@ -74,8 +74,9 @@ $STD bin/console kimai:install -n chown -R :www-data /opt/* chmod -R g+r /opt/* chmod -R g+rw /opt/* -sudo chown -R www-data:www-data /opt/* -sudo chmod -R 755 /opt/* +chown -R www-data:www-data /opt/* +chmod -R 755 /opt/* +chmod -R 777 /opt/kimai/var/ $STD expect </opt/kimai/config/packages/local.yaml +kimai: + timesheet: + rounding: + default: + begin: 15 + end: 15 + +admin_lte: + options: + default_avatar: build/apple-touch-icon.png +EOF + echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Kimai" From a971cedde5145900b0c0b24fb0f228778301ee59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 26 Feb 2025 14:32:16 +0100 Subject: [PATCH 066/167] Improve application description for website (#2658) --- json/graylog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/graylog.json b/json/graylog.json index 66cb9c13d..7258b2d15 100644 --- a/json/graylog.json +++ b/json/graylog.json @@ -12,7 +12,7 @@ "documentation": "https://go2docs.graylog.org/current/home.htm", "website": "https://graylog.org/", "logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/graylog.svg", - "description": "Graylog is a free and open log management platform.", + "description": "Graylog is an open-source log management and analysis platform that centralizes and processes log data from various sources, enabling real-time search, analysis, and alerting for IT infrastructure monitoring and troubleshooting.", "install_methods": [ { "type": "default", From 46462a790c1897eee95d1a045edc072e5662c2f2 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:38:35 +0200 Subject: [PATCH 067/167] [gh] Furhter Impove Changelog Workflow (#2655) * Impove Workflow * Impove Workflow --- .github/autolabeler-config.json | 55 +++++++++--------- .github/changelog-pr-config.json | 90 +++++++++++++++++++++++------- .github/pull_request_template.md | 18 +++--- .github/workflows/autolabeler.yml | 39 ++++++------- .github/workflows/changelog-pr.yml | 41 ++++++++++---- 5 files changed, 156 insertions(+), 87 deletions(-) diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 43c272f87..5406bdaa4 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -1,17 +1,5 @@ { - "breaking change": [ - { - "fileStatus": "renamed", - "includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"], - "excludeGlobs": [] - }, - { - "fileStatus": "removed", - "includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"], - "excludeGlobs": [] - } - ], "new script": [ { "fileStatus": "added", @@ -33,10 +21,17 @@ "excludeGlobs": [] } ], - "rename script": [ + "maintenance": [ { - "fileStatus": "renamed", - "includeGlobs": ["ct/**", "install/**", "misc/**", "turnkey/**", "vm/**"], + "fileStatus": null, + "includeGlobs": ["*.md", ".github/**", "misc/*.func", "ct/create_lxc.sh", "api/**"], + "excludeGlobs": [] + } + ], + "core": [ + { + "fileStatus": null, + "includeGlobs": ["misc/*.func", "ct/create_lxc.sh"], "excludeGlobs": [] } ], @@ -47,25 +42,35 @@ "excludeGlobs": [] } ], - "maintenance": [ - { - "fileStatus": null, - "includeGlobs": ["*.md", ".github/**", "misc/*.func", "ct/create_lxc.sh"], - "excludeGlobs": ["misc/api.func"] - } - ], - "api": [ + "api": [ { "fileStatus": null, "includeGlobs": ["api/**", "misc/api.func"], "excludeGlobs": [] } ], + "github": [ + { + "fileStatus": null, + "includeGlobs": [".github/**"], + "excludeGlobs": [] + } + ], + "json": [ + { + "fileStatus": "modified", + "includeGlobs": ["json/**"], + "excludeGlobs": [] + } + ], + "high risk": [ { "fileStatus": null, "includeGlobs": ["misc/build.func", "misc/install.func", "ct/create_lxc.sh"], "excludeGlobs": [] } - ] -} + ] + + +} \ No newline at end of file diff --git a/.github/changelog-pr-config.json b/.github/changelog-pr-config.json index 558f32fe1..2c62aa3f0 100644 --- a/.github/changelog-pr-config.json +++ b/.github/changelog-pr-config.json @@ -1,16 +1,8 @@ [ - { - "title": "💥 Breaking Changes", - "labels": ["breaking change"] - }, { "title": "🆕 New Scripts", "labels": ["new script"] }, - { - "title": "✨ New Features", - "labels": ["feature"] - }, { "title": "🚀 Updated Scripts", "labels": ["update script"], @@ -21,27 +13,85 @@ "notes" : [] }, { - "title": "General Updates", - "labels": ["general"], + "title": "✨ New Features", + "labels": ["feature"], + "notes" : [] + }, + { + "title": "💥 Breaking Changes", + "labels": ["breaking change"], "notes" : [] } ] }, - - { - "title": "🌐 Website", - "labels": ["website"] - }, - { - "title": "📡 API", - "labels": ["api"] - }, { "title": "🧰 Maintenance", - "labels": ["maintenance"] + "labels": ["maintenance"], + "subCategories": [ + { + "title": "🐞 Bug Fixes", + "labels": ["bugfix"], + "notes" : [] + }, + { + "title": "✨ New Features", + "labels": ["feature"], + "notes" : [] + }, + { + "title": "💥 Breaking Changes", + "labels": ["breaking change"], + "notes" : [] + }, + { + "title": "📡 API", + "labels": ["api"], + "notes" : [] + }, + { + "title": "💾 Core", + "labels": ["core"], + "notes" : [] + }, + { + "title": "📂 Github", + "labels": ["github"], + "notes" : [] + } + ] + }, + { + "title": "🌐 Website", + "labels": ["website"], + "subCategories": [ + { + "title": "🐞 Bug Fixes", + "labels": ["bugfix"], + "notes" : [] + }, + { + "title": "✨ New Features", + "labels": ["feature"], + "notes" : [] + }, + { + "title": "💥 Breaking Changes", + "labels": ["breaking change"], + "notes" : [] + }, + { + "title": "📝 Script Information", + "labels": ["json"], + "notes" : [] + } + ] }, { "title": "❔ Unlabelled", "labels": [] + }, + { + "title": "💥 Breaking Changes", + "labels": ["breaking change"] } ] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 11a90a774..d669ec78a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,25 +1,25 @@ ## ✍️ Description - ## 🔗 Related PR / Discussion / Issue + Link: # - - ## ✅ Prerequisites + Before this PR can be reviewed, the following must be completed: + - [] **Self-review performed** – Code follows established patterns and conventions. - [] **Testing performed** – Changes have been thoroughly tested and verified. - ## 🛠️ Type of Change -Select all that apply: -- [] 🐞 **Bug fix** – Resolves an issue without breaking functionality. -- [] ✨ **New feature** – Adds new, non-breaking functionality. -- [] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. -- [] 🆕 **New script** – A fully functional and tested script or script set. +Select all that apply: + +- [] 🆕 **New script** – A fully functional and tested script or script set. +- [] 🐞 **Bug fix** – Resolves an issue without breaking functionality. +- [] ✨ **New feature** – Adds new, non-breaking functionality. +- [] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. ## 📋 Additional Information (optional) diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 0051d787d..dfe1303e5 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -11,7 +11,7 @@ jobs: permissions: pull-requests: write env: - CONFIG_PATH: .github/autolabeler-config.json + CONFIG_PATH: .github/autolabeler-config_new.json steps: - name: Checkout repository uses: actions/checkout@v4 @@ -43,26 +43,8 @@ jobs: }); const prFiles = prListFilesResponse.data; - const templateLabelMappings = { - "🐞 **bug fix**": "bugfix", - "✨ **new feature**": "feature", - "💥 **breaking change**": "breaking change", - "🆕 **new script**": "new script" - }; - - for (const [checkbox, label] of Object.entries(templateLabelMappings)) { - const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); - const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i"); - const match = prBody.match(regex); - if (match) { - console.log(`Match: ${match}`); - labelsToAdd.add(label); - } - } - if (labelsToAdd.size === 0) { - labelsToAdd.add("general"); - } + // Apply labels based on file changes for (const [label, rules] of Object.entries(autolabelerConfig)) { const shouldAddLabel = prFiles.some((prFile) => { @@ -79,6 +61,21 @@ jobs: labelsToAdd.add(label); } } + const templateLabelMappings = { + "🐞 **Bug fix**": "bugfix", + "✨ **New feature**": "feature", + "💥 **Breaking change**": "breaking change", + }; + + for (const [checkbox, label] of Object.entries(templateLabelMappings)) { + const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); + const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i"); + const match = prBody.match(regex); + if (match) { + console.log(`Match: ${match}`); + labelsToAdd.add(label); + } + } console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`); @@ -90,4 +87,4 @@ jobs: issue_number: prNumber, labels: Array.from(labelsToAdd), }); - } + } \ No newline at end of file diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 5ca3b9bd7..dc5bcd3d3 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -58,10 +58,26 @@ jobs: const categorizedPRs = changelogConfig.map(obj => ({ ...obj, notes: [], - subCategories: obj.subCategories ?? (obj.labels.includes("update script") ? [ - { title: "🐞 Bug Fixes", labels: ["bugfix"] }, - { title: "✨ Feature Updates", labels: ["feature"] } - ] : []) + subCategories: obj.subCategories ?? ( + obj.labels.includes("update script") ? [ + { title: "🐞 Bug Fixes", labels: ["bugfix"], notes: [] }, + { title: "✨ New Features", labels: ["feature"], notes: [] }, + { title: "💥 Breaking Changes", labels: ["breaking change"], notes: [] } + ] : + obj.labels.includes("maintenance") ? [ + { title: "🐞 Bug Fixes", labels: ["bugfix"], notes: [] }, + { title: "✨ New Features", labels: ["feature"], notes: [] }, + { title: "💥 Breaking Changes", labels: ["breaking change"], notes: [] }, + { title: "📡 API", labels: ["api"], notes: [] }, + { title: "Github", labels: ["github"], notes: [] } + ] : + obj.labels.includes("website") ? [ + { title: "🐞 Bug Fixes", labels: ["bugfix"], notes: [] }, + { title: "✨ New Features", labels: ["feature"], notes: [] }, + { title: "💥 Breaking Changes", labels: ["breaking change"], notes: [] }, + { title: "Script Information", labels: ["json"], notes: [] } + ] : [] + ) })); const latestDateInChangelog = new Date(process.env.LATEST_DATE); @@ -110,6 +126,7 @@ jobs: return categorizedPRs; + - name: Update CHANGELOG.md uses: actions/github-script@v7 with: @@ -124,7 +141,8 @@ jobs: console.log(JSON.stringify(categorizedPRs, null, 2)); - let newReleaseNotes = `## ${today}\n\n### Changes\n\n`; + + let newReleaseNotes = `## ${today}\n\n`; for (const { title, notes, subCategories } of categorizedPRs) { const hasSubcategories = subCategories && subCategories.length > 0; const hasMainNotes = notes.length > 0; @@ -133,17 +151,16 @@ jobs: if (hasMainNotes || hasSubNotes) { newReleaseNotes += `### ${title}\n\n`; - } + } if (hasMainNotes) { - newReleaseNotes += `${notes.join("\n")}\n\n`; - } - + newReleaseNotes += ` ${notes.join("\n")}\n\n`; + } if (hasSubcategories) { for (const { title: subTitle, notes: subNotes } of subCategories) { if (subNotes && subNotes.length > 0) { - newReleaseNotes += ` #### ${subTitle}\n\n`; - newReleaseNotes += ` ${subNotes.join("\n ")}\n\n`; + newReleaseNotes += ` - #### ${subTitle}\n\n`; + newReleaseNotes += ` ${subNotes.join("\n ")}\n\n`; } } } @@ -206,4 +223,4 @@ jobs: PR_NUMBER=$(gh pr list --head "${BRANCH_NAME}" --json number --jq '.[].number') if [ -n "$PR_NUMBER" ]; then gh pr review $PR_NUMBER --approve - fi + fi \ No newline at end of file From a02a9d803ec921635362a4e2f1a841ca31088cd1 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 14:39:16 +0100 Subject: [PATCH 068/167] Update CHANGELOG.md (#2652) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd747157..c58f62375 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,18 +19,25 @@ Do not break established syntax in this file, as it is automatically updated by ## 2025-02-26 -### Changes - ### 🚀 Updated Scripts - #### 🐞 Bug Fixes + - #### 🐞 Bug Fixes - - PiHole: Fix Unbound sed for DNS [@MickLesk](https://github.com/MickLesk) ([#2647](https://github.com/community-scripts/ProxmoxVE/pull/2647)) + - Kimai: add local.yaml & fix path permissions [@MickLesk](https://github.com/MickLesk) ([#2646](https://github.com/community-scripts/ProxmoxVE/pull/2646)) + - PiHole: Fix Unbound sed for DNS [@MickLesk](https://github.com/MickLesk) ([#2647](https://github.com/community-scripts/ProxmoxVE/pull/2647)) - Alpine IT-Tools fix typo "unexpected EOF while looking for matching `"' [@MickLesk](https://github.com/MickLesk) ([#2644](https://github.com/community-scripts/ProxmoxVE/pull/2644)) +### 🧰 Maintenance + + - [gh] Furhter Impove Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2655](https://github.com/community-scripts/ProxmoxVE/pull/2655)) + ### 🌐 Website -- Website: PocketID Change of website and documentation links [@schneider-de-com](https://github.com/schneider-de-com) ([#2643](https://github.com/community-scripts/ProxmoxVE/pull/2643)) + - Fix: Graylog - Improve application description for website [@tremor021](https://github.com/tremor021) ([#2658](https://github.com/community-scripts/ProxmoxVE/pull/2658)) + + - #### 🐞 Bug Fixes + + - Website: PocketID Change of website and documentation links [@schneider-de-com](https://github.com/schneider-de-com) ([#2643](https://github.com/community-scripts/ProxmoxVE/pull/2643)) ## 2025-02-25 From 4354079c4ec34972f24a9efd969cf888f9a27bcc Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 14:45:52 +0100 Subject: [PATCH 069/167] Update CHANGELOG.md (#2659) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c58f62375..1c716d888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,16 +29,20 @@ Do not break established syntax in this file, as it is automatically updated by ### 🧰 Maintenance - - [gh] Furhter Impove Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2655](https://github.com/community-scripts/ProxmoxVE/pull/2655)) + - #### 📂 Github + + - [gh] Furhter Impove Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2655](https://github.com/community-scripts/ProxmoxVE/pull/2655)) ### 🌐 Website - - Fix: Graylog - Improve application description for website [@tremor021](https://github.com/tremor021) ([#2658](https://github.com/community-scripts/ProxmoxVE/pull/2658)) - - #### 🐞 Bug Fixes - Website: PocketID Change of website and documentation links [@schneider-de-com](https://github.com/schneider-de-com) ([#2643](https://github.com/community-scripts/ProxmoxVE/pull/2643)) + - #### 📝 Script Information + + - Fix: Graylog - Improve application description for website [@tremor021](https://github.com/tremor021) ([#2658](https://github.com/community-scripts/ProxmoxVE/pull/2658)) + ## 2025-02-25 ### Changes From e6792790cc9af894ff9d04dbf023b089283061d6 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:51:30 +0200 Subject: [PATCH 070/167] Update autolabeler.yml (#2660) --- .github/workflows/autolabeler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index dfe1303e5..013c40be5 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -11,7 +11,7 @@ jobs: permissions: pull-requests: write env: - CONFIG_PATH: .github/autolabeler-config_new.json + CONFIG_PATH: .github/autolabeler-config.json steps: - name: Checkout repository uses: actions/checkout@v4 @@ -87,4 +87,4 @@ jobs: issue_number: prNumber, labels: Array.from(labelsToAdd), }); - } \ No newline at end of file + } From 7d29d8a05ad2f4fae363e4a5af22b87fd0c67bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:17:22 +0100 Subject: [PATCH 071/167] New Script: Outline (#2653) * Added Outline script * Update outline-install.sh --- ct/outline.sh | 71 +++++++++++++++++++++++++ install/outline-install.sh | 106 +++++++++++++++++++++++++++++++++++++ json/outline.json | 43 +++++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 ct/outline.sh create mode 100644 install/outline-install.sh create mode 100644 json/outline.json diff --git a/ct/outline.sh b/ct/outline.sh new file mode 100644 index 000000000..a303be7e9 --- /dev/null +++ b/ct/outline.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/outline/outline + +APP="Outline" +var_tags="documentation" +var_disk="8" +var_cpu="2" +var_ram="4096" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/outline ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/outline/outline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Services" + systemctl stop outline + msg_ok "Services Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + temp_file=$(mktemp) + rm -rf /opt/outline/node_modules + wget -q "https://github.com/outline/outline/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + tar zxf $temp_file + cp -rf outline-${RELEASE}/* /opt/outline + cd /opt/outline + export NODE_OPTIONS="--max-old-space-size=3584" + $STD yarn install --frozen-lockfile + $STD yarn build + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting Services" + systemctl start outline + msg_ok "Started Services" + + msg_info "Cleaning Up" + rm -rf $temp_file + rm -rf $HOME/outline-${RELEASE} + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/outline-install.sh b/install/outline-install.sh new file mode 100644 index 000000000..52fde65cf --- /dev/null +++ b/install/outline-install.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/outline/outline + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ +curl \ +sudo \ +mc \ +gnupg \ +mkcert \ +git \ +redis +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Setting up PostgreSQL Repository" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list +msg_ok "Set up PostgreSQL Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g yarn +msg_ok "Installed Node.js" + +msg_info "Install/Set up PostgreSQL Database" +$STD apt-get install -y postgresql-16 +DB_NAME="outline" +DB_USER="outline" +DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" +msg_ok "Set up PostgreSQL" + +msg_info "Setup Outline (Patience)" +temp_file=$(mktemp) +LOCAL_IP="$(hostname -I | awk '{print $1}')" +RELEASE=$(curl -s https://api.github.com/repos/outline/outline/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/outline/outline/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +tar zxf $temp_file +mv outline-${RELEASE} /opt/outline +cd /opt/outline +cp .env.sample .env +sed -i 's/NODE_ENV=production/NODE_ENV=development/g' /opt/outline/.env +sed -i "s/generate_a_new_key/${SECRET_KEY}/g" /opt/outline/.env +sed -i "s/user:pass@postgres/${DB_USER}:${DB_PASS}@localhost/g" /opt/outline/.env +sed -i 's/redis:6379/localhost:6379/g' /opt/outline/.env +sed -i "32s#URL=#URL=http://${LOCAL_IP}#g" /opt/outline/.env +sed -i 's/FORCE_HTTPS=true/FORCE_HTTPS=false/g' /opt/outline/.env +$STD yarn install --frozen-lockfile +export NODE_OPTIONS="--max-old-space-size=3584" +$STD yarn build +sed -i 's/NODE_ENV=development/NODE_ENV=production/g' /opt/outline/.env +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Setup Outline" + +msg_info "Creating Service" +cat </etc/systemd/system/outline.service +[Unit] +Description=Outline Service +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/outline +ExecStart=/usr/bin/node ./build/server/index.js +Restart=always +EnvironmentFile=/opt/outline/.env + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now outline +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/outline.json b/json/outline.json new file mode 100644 index 000000000..b167040b7 --- /dev/null +++ b/json/outline.json @@ -0,0 +1,43 @@ +{ + "name": "Outline", + "slug": "outline", + "categories": [ + 12 + ], + "date_created": "2025-02-26", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://docs.getoutline.com/s/hosting/", + "website": "https://www.getoutline.com", + "logo": "https://www.getoutline.com/images/logo.svg", + "description": "The fastest knowledge base for growing teams. Beautiful, realtime collaborative, feature packed, and markdown compatible. It’s time to get your team’s knowledge organized.", + "install_methods": [ + { + "type": "default", + "script": "ct/outline.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "After installation finishes, application will do a database migration so web UI might be unavailable for a minute or two. Also you need to manually add authentication and/or enable HTTPS.", + "type": "info" + }, + { + "text": "Configuration file is at: `/opt/outline/.env`. Modify to suit your environment.", + "type": "info" + } + ] +} \ No newline at end of file From e68355d8805a2d20d6c5979790221770b9b2646a Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:21:35 +0100 Subject: [PATCH 072/167] Update .app files (#2665) Co-authored-by: GitHub Actions --- ct/headers/outline | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/outline diff --git a/ct/headers/outline b/ct/headers/outline new file mode 100644 index 000000000..66e98f4d2 --- /dev/null +++ b/ct/headers/outline @@ -0,0 +1,6 @@ + ____ __ ___ + / __ \__ __/ /_/ (_)___ ___ + / / / / / / / __/ / / __ \/ _ \ +/ /_/ / /_/ / /_/ / / / / / __/ +\____/\__,_/\__/_/_/_/ /_/\___/ + From 6722e52c9b4773bdaeeac0218643d9026b45bdf9 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 18:43:25 +0100 Subject: [PATCH 073/167] Update CHANGELOG.md (#2664) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c716d888..8c6bb55b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ Do not break established syntax in this file, as it is automatically updated by ## 2025-02-26 +### 🆕 New Scripts + + - New Script: Outline [@tremor021](https://github.com/tremor021) ([#2653](https://github.com/community-scripts/ProxmoxVE/pull/2653)) + ### 🚀 Updated Scripts - #### 🐞 Bug Fixes From c12470ff125b279fff1c6278753274a64dd4599a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:20:48 +0100 Subject: [PATCH 074/167] Fix: SABnzbd - Removed few artefacts in the code preventing the update (#2670) * Fix copy files to folder * Fix untaring the archive --- ct/sabnzbd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 00a5343fd..391056d2e 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -31,8 +31,8 @@ function update_script() { if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then msg_info "Updating $APP to ${RELEASE}" systemctl stop sabnzbd.service - $STD tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) - $STD \cp -r SABnzbd-${RELEASE}/* /opt/sabnzbd + tar zxvf <(curl -fsSL https://github.com/sabnzbd/sabnzbd/releases/download/$RELEASE/SABnzbd-${RELEASE}-src.tar.gz) + cp -rf SABnzbd-${RELEASE}/* /opt/sabnzbd rm -rf SABnzbd-${RELEASE} cd /opt/sabnzbd $STD python3 -m pip install -r requirements.txt From 41f4aebdc763e4afcb30f9e889f15a2ae827dfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:51:46 +0100 Subject: [PATCH 075/167] Fix infinite spinner (#2673) --- ct/sabnzbd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/sabnzbd.sh b/ct/sabnzbd.sh index 391056d2e..71455afbf 100644 --- a/ct/sabnzbd.sh +++ b/ct/sabnzbd.sh @@ -40,7 +40,7 @@ function update_script() { systemctl start sabnzbd.service msg_ok "Updated ${APP} to ${RELEASE}" else - msg_info "No update required. ${APP} is already at ${RELEASE}" + msg_ok "No update required. ${APP} is already at ${RELEASE}" fi exit } From ba842a1e49daf97c3a47706e2b389261d2b163b6 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:52:10 +0100 Subject: [PATCH 076/167] Update CHANGELOG.md (#2672) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c6bb55b2..067ddd367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts + - Fix: SABnzbd - Removed few artefacts in the code preventing the update [@tremor021](https://github.com/tremor021) ([#2670](https://github.com/community-scripts/ProxmoxVE/pull/2670)) + - #### 🐞 Bug Fixes - Kimai: add local.yaml & fix path permissions [@MickLesk](https://github.com/MickLesk) ([#2646](https://github.com/community-scripts/ProxmoxVE/pull/2646)) From 7f4c116b2c0cbadeb7b41992cdf6ac743d8d4f92 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 26 Feb 2025 20:08:01 +0100 Subject: [PATCH 077/167] Update zigbee2mqtt-install.sh --- install/zigbee2mqtt-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index faf08b577..ef7d32d90 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -50,7 +50,7 @@ mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt cd /opt/zigbee2mqtt/data mv configuration.example.yaml configuration.yaml cd /opt/zigbee2mqtt -$STD pnpm install --frozen-lockfile +$STD pnpm install --no-frozen-lockfile $STD pnpm build msg_ok "Installed Zigbee2MQTT" From 9c59bdaea124c2a64e0fadc63ab97178239adaf7 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 26 Feb 2025 23:23:03 +0100 Subject: [PATCH 078/167] Fix: Homarr - Manually correct db-migration wrong-folder (#2676) * Update homarr-install.sh * Update homarr.sh --- ct/homarr.sh | 10 ++++++++++ install/homarr-install.sh | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/ct/homarr.sh b/ct/homarr.sh index b24891889..6f88bd938 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -49,6 +49,11 @@ set +a export DB_DIALECT='sqlite' export AUTH_SECRET=$(openssl rand -base64 32) node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT +for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do + dirname=$(basename "$dir") + mkdir -p "/opt/homarr_db/migrations/$dirname" + cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true +done export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+') envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf nginx -g 'daemon off;' & @@ -97,6 +102,11 @@ set +a export DB_DIALECT='sqlite' export AUTH_SECRET=$(openssl rand -base64 32) node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT +for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do + dirname=$(basename "$dir") + mkdir -p "/opt/homarr_db/migrations/$dirname" + cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true +done export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+') envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf nginx -g 'daemon off;' & diff --git a/install/homarr-install.sh b/install/homarr-install.sh index d7f49bfac..2335133eb 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -92,6 +92,11 @@ set +a export DB_DIALECT='sqlite' export AUTH_SECRET=$(openssl rand -base64 32) node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT +for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do + dirname=$(basename "$dir") + mkdir -p "/opt/homarr_db/migrations/$dirname" + cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true +done export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+') envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf nginx -g 'daemon off;' & From 5f2163bff4cbfc4cf2d672c286463d74e16c3035 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 23:35:46 +0100 Subject: [PATCH 079/167] Update CHANGELOG.md (#2679) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 067ddd367..d91cc01fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Do not break established syntax in this file, as it is automatically updated by - #### 🐞 Bug Fixes + - Fix: Homarr - Manually correct db-migration wrong-folder [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2676](https://github.com/community-scripts/ProxmoxVE/pull/2676)) - Kimai: add local.yaml & fix path permissions [@MickLesk](https://github.com/MickLesk) ([#2646](https://github.com/community-scripts/ProxmoxVE/pull/2646)) - PiHole: Fix Unbound sed for DNS [@MickLesk](https://github.com/MickLesk) ([#2647](https://github.com/community-scripts/ProxmoxVE/pull/2647)) - Alpine IT-Tools fix typo "unexpected EOF while looking for matching `"' [@MickLesk](https://github.com/MickLesk) ([#2644](https://github.com/community-scripts/ProxmoxVE/pull/2644)) From 2d20686131a10308a323d06aeda072e67bf95410 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:12:22 +0100 Subject: [PATCH 080/167] SFTPGo Remove unneeded RELEASE variable (#2683) --- install/sftpgo-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh index 1322b42cf..ec5af81be 100644 --- a/install/sftpgo-install.sh +++ b/install/sftpgo-install.sh @@ -43,7 +43,6 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf $RELEASE $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 0aa13fbea74a6bc71ad792b1ce630ff805b7fe6d Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:23:00 +0100 Subject: [PATCH 081/167] New Script: Pelican Wings (#2677) * New Script: Pelican Wings * Remove $STD for stopping/starting service --- ct/pelican-wings.sh | 58 +++++++++++++++++++++++++++ install/pelican-wings-install.sh | 69 ++++++++++++++++++++++++++++++++ json/pelican-wings.json | 39 ++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 ct/pelican-wings.sh create mode 100644 install/pelican-wings-install.sh create mode 100644 json/pelican-wings.json diff --git a/ct/pelican-wings.sh b/ct/pelican-wings.sh new file mode 100644 index 000000000..ff871626a --- /dev/null +++ b/ct/pelican-wings.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/pelican-dev/wings + +APP="Pelican-Wings" +var_tags="Gaming" +var_cpu="2" +var_ram="4096" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /usr/local/bin/wings ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop wings + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + rm /usr/local/bin/wings + wget -q -O /usr/local/bin/wings "https://github.com/pelican-dev/wings/releases/download/v${RELEASE}/wings_linux_amd64" + chmod u+x /usr/local/bin/wings + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + systemctl start wings + msg_ok "Started Service" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" \ No newline at end of file diff --git a/install/pelican-wings-install.sh b/install/pelican-wings-install.sh new file mode 100644 index 000000000..1a1e938e3 --- /dev/null +++ b/install/pelican-wings-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc +msg_ok "Installed Dependencies" + +msg_info "Installing Docker" +DOCKER_CONFIG_PATH='/etc/docker/daemon.json' +mkdir -p $(dirname $DOCKER_CONFIG_PATH) +echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json +$STD sh <(curl -sSL https://get.docker.com) +systemctl enable -q --now docker +msg_ok "Installed Docker" + +msg_info "Installing Pelican Wings" +RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/wings/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q -O /usr/local/bin/wings "https://github.com/pelican-dev/wings/releases/download/v${RELEASE}/wings_linux_amd64" +chmod u+x /usr/local/bin/wings +mkdir -p /etc/pelican /var/run/wings +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Pelican Wings" + +msg_info "Creating Service" +cat </etc/systemd/system/wings.service +[Unit] +Description=Wings Daemon +After=docker.service +Requires=docker.service +PartOf=docker.service + +[Service] +User=root +WorkingDirectory=/etc/pelican +LimitNOFILE=4096 +PIDFile=/var/run/wings/daemon.pid +ExecStart=/usr/local/bin/wings +Restart=on-failure +StartLimitInterval=180 +StartLimitBurst=30 +RestartSec=5s + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now wings +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/pelican-wings.json b/json/pelican-wings.json new file mode 100644 index 000000000..893786b37 --- /dev/null +++ b/json/pelican-wings.json @@ -0,0 +1,39 @@ +{ + "name": "Pelican Wings", + "slug": "pelican-wings", + "categories": [ + 24 + ], + "date_created": "2025-02-26", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://pelican.dev/docs/wings/install", + "website": "https://pelican.dev/", + "logo": "https://pelican.dev/img/logo.png", + "description": "Pelican Wings is Pelican's server control plane, built for the rapidly changing gaming industry and designed to be highly performant and secure. Wings provides an HTTP API allowing you to interface directly with running server instances, fetch server logs, generate backups, and control all aspects of the server lifecycle.", + "install_methods": [ + { + "type": "default", + "script": "ct/pelican-wings.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "After installation, you need to use the Auto Deploy command generated by Pelican Panel and, after running the command, restart the Wings service with `systemctl restart wings.service`", + "type": "info" + } + ] +} \ No newline at end of file From 5b91a776f10ac14f87e210401b7e9f81c85b443c Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:24:11 +0100 Subject: [PATCH 082/167] New script: Pelican Panel (#2678) --- ct/pelican-panel.sh | 76 ++++++++++++++++++++++ install/pelican-panel-install.sh | 104 +++++++++++++++++++++++++++++++ json/pelican-panel.json | 43 +++++++++++++ 3 files changed, 223 insertions(+) create mode 100644 ct/pelican-panel.sh create mode 100644 install/pelican-panel-install.sh create mode 100644 json/pelican-panel.json diff --git a/ct/pelican-panel.sh b/ct/pelican-panel.sh new file mode 100644 index 000000000..bb7467511 --- /dev/null +++ b/ct/pelican-panel.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/pelican-dev/panel + +APP="Pelican-Panel" +var_tags="Gaming" +var_cpu="2" +var_ram="1024" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/pelican-panel ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + cd /opt/pelican-panel + $STD php artisan down + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + cp -r /opt/pelican-panel/.env /opt/ + rm -rf * .* + wget -q "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" + tar -xzf "panel.tar.gz" + mv /opt/.env /opt/pelican-panel/ + $STD composer install --no-dev --optimize-autoloader --no-interaction + $STD php artisan p:environment:setup + $STD php artisan view:clear + $STD php artisan config:clear + $STD php artisan filament:optimize + $STD php artisan migrate --seed --force + chown -R www-data:www-data /opt/pelican-panel + chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/ + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + $STD php artisan queue:restart + $STD php artisan up + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -rf "/opt/pelican-panel/panel.tar.gz" + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}/installer${CL}" diff --git a/install/pelican-panel-install.sh b/install/pelican-panel-install.sh new file mode 100644 index 000000000..a64aa9446 --- /dev/null +++ b/install/pelican-panel-install.sh @@ -0,0 +1,104 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + lsb-release \ + mariadb-server \ + mariadb-client \ + apache2 \ + composer +msg_ok "Installed Dependencies" + +msg_info "Adding PHP8.3 Repository" +$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb +$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb +$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' +$STD apt-get update +msg_ok "Added PHP8.3 Repository" + +msg_info "Installing PHP" +$STD apt-get remove -y php8.2* +$STD apt-get install -y \ + php8.3 \ + php8.3-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,sqlite3,fpm} \ + libapache2-mod-php8.3 +msg_info "Installed PHP" + +msg_info "Setting up MariaDB" +DB_NAME=panel +DB_USER=pelican +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "Pelican Panel-Credentials" + echo "Pelican Panel Database User: $DB_USER" + echo "Pelican Panel Database Password: $DB_PASS" + echo "Pelican Panel Database Name: $DB_NAME" +} >> ~/pelican-panel.creds +msg_ok "Set up MariaDB" + +msg_info "Installing Pelican Panel" +RELEASE=$(curl -s https://api.github.com/repos/pelican-dev/panel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +mkdir /opt/pelican-panel +cd /opt/pelican-panel +wget -q "https://github.com/pelican-dev/panel/releases/download/v${RELEASE}/panel.tar.gz" +tar -xzf "panel.tar.gz" +$STD composer install --no-dev --optimize-autoloader --no-interaction +$STD php artisan p:environment:setup +$STD php artisan p:environment:queue-service --no-interaction +echo "* * * * * php /opt/pelican-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data - +chown -R www-data:www-data /opt/pelican-panel +chmod -R 755 /opt/pelican-panel/storage /opt/pelican-panel/bootstrap/cache/ +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Pelican Panel" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/pelican.conf + + ServerName pelican + DocumentRoot /opt/pelican-panel/public + AllowEncodedSlashes On + php_value upload_max_filesize 100M + php_value post_max_size 100M + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/pelican_error.log + CustomLog /var/log/apache2/pelican_access.log combined + +EOF +$STD a2ensite pelican +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/pelican-panel/panel.tar.gz" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/pelican-panel.json b/json/pelican-panel.json new file mode 100644 index 000000000..6ba3d25b4 --- /dev/null +++ b/json/pelican-panel.json @@ -0,0 +1,43 @@ +{ + "name": "Pelican Panel", + "slug": "pelican-panel", + "categories": [ + 24 + ], + "date_created": "2025-02-26", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://pelican.dev/docs/panel/getting-started", + "website": "https://pelican.dev/", + "logo": "https://pelican.dev/img/logo.png", + "description": "Pelican Panel is a web-based control panel for managing game and application servers. It provides an intuitive interface to start, stop, configure, and monitor servers easily. It works alongside Pelican Wings, a lightweight daemon that handles server deployments and resource management.", + "install_methods": [ + { + "type": "default", + "script": "ct/pelican-panel.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Database credentials: `cat ~/pelican-panel.creds`", + "type": "info" + }, + { + "text": "Step 5 of the Panel installer can be skipped because it has already been set up by the script.", + "type": "info" + } + ] +} \ No newline at end of file From db5cc430c7b73907a58c7a5504d02dbf38da176e Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:25:30 +0100 Subject: [PATCH 083/167] Update date in json (#2685) Co-authored-by: GitHub Actions --- json/pelican-wings.json | 74 ++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/json/pelican-wings.json b/json/pelican-wings.json index 893786b37..b587ef304 100644 --- a/json/pelican-wings.json +++ b/json/pelican-wings.json @@ -1,39 +1,39 @@ { - "name": "Pelican Wings", - "slug": "pelican-wings", - "categories": [ - 24 - ], - "date_created": "2025-02-26", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": null, - "documentation": "https://pelican.dev/docs/wings/install", - "website": "https://pelican.dev/", - "logo": "https://pelican.dev/img/logo.png", - "description": "Pelican Wings is Pelican's server control plane, built for the rapidly changing gaming industry and designed to be highly performant and secure. Wings provides an HTTP API allowing you to interface directly with running server instances, fetch server logs, generate backups, and control all aspects of the server lifecycle.", - "install_methods": [ - { - "type": "default", - "script": "ct/pelican-wings.sh", - "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 8, - "os": "Debian", - "version": "12" - } + "name": "Pelican Wings", + "slug": "pelican-wings", + "categories": [ + 24 + ], + "date_created": "2025-02-27", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://pelican.dev/docs/wings/install", + "website": "https://pelican.dev/", + "logo": "https://pelican.dev/img/logo.png", + "description": "Pelican Wings is Pelican's server control plane, built for the rapidly changing gaming industry and designed to be highly performant and secure. Wings provides an HTTP API allowing you to interface directly with running server instances, fetch server logs, generate backups, and control all aspects of the server lifecycle.", + "install_methods": [ + { + "type": "default", + "script": "ct/pelican-wings.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "Debian", + "version": "12" } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "After installation, you need to use the Auto Deploy command generated by Pelican Panel and, after running the command, restart the Wings service with `systemctl restart wings.service`", - "type": "info" - } - ] -} \ No newline at end of file + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "After installation, you need to use the Auto Deploy command generated by Pelican Panel and, after running the command, restart the Wings service with `systemctl restart wings.service`", + "type": "info" + } + ] +} From 3e7458dfaafb639739f749fa88d9391758f4f760 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:26:08 +0100 Subject: [PATCH 084/167] Update .app files (#2686) Co-authored-by: GitHub Actions --- ct/headers/pelican-panel | 6 ++++++ ct/headers/pelican-wings | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 ct/headers/pelican-panel create mode 100644 ct/headers/pelican-wings diff --git a/ct/headers/pelican-panel b/ct/headers/pelican-panel new file mode 100644 index 000000000..e38095db6 --- /dev/null +++ b/ct/headers/pelican-panel @@ -0,0 +1,6 @@ + ____ ___ ____ __ + / __ \___ / (_)________ _____ / __ \____ _____ ___ / / + / /_/ / _ \/ / / ___/ __ `/ __ \______/ /_/ / __ `/ __ \/ _ \/ / + / ____/ __/ / / /__/ /_/ / / / /_____/ ____/ /_/ / / / / __/ / +/_/ \___/_/_/\___/\__,_/_/ /_/ /_/ \__,_/_/ /_/\___/_/ + diff --git a/ct/headers/pelican-wings b/ct/headers/pelican-wings new file mode 100644 index 000000000..888c4d388 --- /dev/null +++ b/ct/headers/pelican-wings @@ -0,0 +1,6 @@ + ____ ___ _ ___ + / __ \___ / (_)________ _____ | | / (_)___ ____ ______ + / /_/ / _ \/ / / ___/ __ `/ __ \_____| | /| / / / __ \/ __ `/ ___/ + / ____/ __/ / / /__/ /_/ / / / /_____/ |/ |/ / / / / / /_/ (__ ) +/_/ \___/_/_/\___/\__,_/_/ /_/ |__/|__/_/_/ /_/\__, /____/ + /____/ From 663962e8730dd0202208c8603873cb87cf86fabb Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:26:40 +0100 Subject: [PATCH 085/167] Update date in json (#2687) Co-authored-by: GitHub Actions --- json/pelican-panel.json | 80 ++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/json/pelican-panel.json b/json/pelican-panel.json index 6ba3d25b4..510626c14 100644 --- a/json/pelican-panel.json +++ b/json/pelican-panel.json @@ -1,43 +1,43 @@ { - "name": "Pelican Panel", - "slug": "pelican-panel", - "categories": [ - 24 - ], - "date_created": "2025-02-26", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 80, - "documentation": "https://pelican.dev/docs/panel/getting-started", - "website": "https://pelican.dev/", - "logo": "https://pelican.dev/img/logo.png", - "description": "Pelican Panel is a web-based control panel for managing game and application servers. It provides an intuitive interface to start, stop, configure, and monitor servers easily. It works alongside Pelican Wings, a lightweight daemon that handles server deployments and resource management.", - "install_methods": [ - { - "type": "default", - "script": "ct/pelican-panel.sh", - "resources": { - "cpu": 2, - "ram": 1024, - "hdd": 4, - "os": "Debian", - "version": "12" - } + "name": "Pelican Panel", + "slug": "pelican-panel", + "categories": [ + 24 + ], + "date_created": "2025-02-27", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://pelican.dev/docs/panel/getting-started", + "website": "https://pelican.dev/", + "logo": "https://pelican.dev/img/logo.png", + "description": "Pelican Panel is a web-based control panel for managing game and application servers. It provides an intuitive interface to start, stop, configure, and monitor servers easily. It works alongside Pelican Wings, a lightweight daemon that handles server deployments and resource management.", + "install_methods": [ + { + "type": "default", + "script": "ct/pelican-panel.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "12" } - ], - "default_credentials": { - "username": null, - "password": null + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Database credentials: `cat ~/pelican-panel.creds`", + "type": "info" }, - "notes": [ - { - "text": "Database credentials: `cat ~/pelican-panel.creds`", - "type": "info" - }, - { - "text": "Step 5 of the Panel installer can be skipped because it has already been set up by the script.", - "type": "info" - } - ] -} \ No newline at end of file + { + "text": "Step 5 of the Panel installer can be skipped because it has already been set up by the script.", + "type": "info" + } + ] +} From 62bd7d5eef512429d65b0dcb61cd9cc929efdba0 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 07:29:06 +0100 Subject: [PATCH 086/167] Update CHANGELOG.md (#2684) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d91cc01fa..419288128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,19 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-02-27 + +### 🆕 New Scripts + + - Pelican Wings [@bvdberg01](https://github.com/bvdberg01) ([#2677](https://github.com/community-scripts/ProxmoxVE/pull/2677)) +- Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) + +### 🚀 Updated Scripts + + - #### 🐞 Bug Fixes + + - SFTPGo Remove unneeded RELEASE variable [@MickLesk](https://github.com/MickLesk) ([#2683](https://github.com/community-scripts/ProxmoxVE/pull/2683)) + ## 2025-02-26 ### 🆕 New Scripts From 6bcbc0ae91e6f272d0b6d54f5038af96e5c112e3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Feb 2025 08:41:07 +0100 Subject: [PATCH 087/167] Update pihole-install.sh --- install/pihole-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 5e3743432..ee686cb95 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -141,7 +141,7 @@ server=8.8.8.8 server=8.8.4.4 EOF - sed -i -E 's|^(\s*upstreams =).*|\1 ["127.0.0.1#5335", "8.8.4.4"]|' /etc/pihole/pihole.toml + sed -i -E '/^\s*upstreams\s*=\s*\[/,/^\s*\]/c\ upstreams = [\n "127.0.0.1#5335",\n "8.8.4.4"\n ]' /etc/pihole/pihole.toml systemctl enable -q --now unbound systemctl restart pihole-FTL.service msg_ok "Installed Unbound" From 407801d9ffe46a0c7fb77c76e790490290277a28 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:07:24 +0200 Subject: [PATCH 088/167] Update install.func (#2690) --- misc/install.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/install.func b/misc/install.func index 656c97222..84f416a41 100644 --- a/misc/install.func +++ b/misc/install.func @@ -76,7 +76,7 @@ error_handler() { local command="$2" local error_message="${RD}[ERROR]${CL} in line ${RD}$line_number${CL}: exit code ${RD}$exit_code${CL}: while executing command ${YW}$command${CL}" echo -e "\n$error_message" - if [[ "$line_number" -eq 44 ]]; then + if [[ "$line_number" -eq 50 ]]; then echo -e "The silent function has suppressed the error, run the script with verbose mode enabled, which will provide more detailed output.\n" post_update_to_api "failed" "No error message, script ran in silent mode" else From b582b9f04df69666c3cbd0636a2cc397aaf6f3bc Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:08:25 +0200 Subject: [PATCH 089/167] [gh] New Workflow to close Script Request Discussions on PR merge (#2688) * New Workflow * New Workflow --- .github/workflows/close-discussion.yml | 122 +++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 .github/workflows/close-discussion.yml diff --git a/.github/workflows/close-discussion.yml b/.github/workflows/close-discussion.yml new file mode 100644 index 000000000..4b39fbf96 --- /dev/null +++ b/.github/workflows/close-discussion.yml @@ -0,0 +1,122 @@ +name: Close Discussion on PR Merge + +on: + pull_request: + types: [closed] + +jobs: + close-discussion: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + - name: Install Dependencies + run: npm install zx @octokit/graphql + + - name: Close Discussion + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_BODY: ${{ github.event.pull_request.body }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO_OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + run: | + npx zx << 'EOF' + import { graphql } from "@octokit/graphql"; + (async function() { + try { + const token = process.env.GITHUB_TOKEN; + const prBody = process.env.PR_BODY; + const prNumber = process.env.PR_NUMBER; + const owner = process.env.REPO_OWNER; + const repo = process.env.REPO_NAME; + + if (!token || !prBody || !prNumber || !owner || !repo) { + console.log("Missing required environment variables."); + process.exit(1); + } + + const match = prBody.match(/#(\d+)/); + if (!match) { + console.log("No discussion ID found in PR body."); + return; + } + const discussionNumber = match[1]; + + console.log(`Extracted Discussion Number: ${discussionNumber}`); + console.log(`PR Number: ${prNumber}`); + console.log(`Repository: ${owner}/${repo}`); + + const graphqlWithAuth = graphql.defaults({ + headers: { authorization: `Bearer ${token}` }, + }); + + const discussionQuery = ` + query($owner: String!, $repo: String!, $number: Int!) { + repository(owner: $owner, name: $repo) { + discussion(number: $number) { + id + } + } + } + `; + + const discussionResponse = await graphqlWithAuth(discussionQuery, { + owner, + repo, + number: parseInt(discussionNumber, 10), + }); + + const discussionQLId = discussionResponse.repository.discussion.id; + if (!discussionQLId) { + console.log("Failed to fetch discussion GraphQL ID."); + return; + } + + console.log(`GraphQL Discussion ID: ${discussionQLId}`); + + const commentMutation = ` + mutation($discussionId: ID!, $body: String!) { + addDiscussionComment(input: { discussionId: $discussionId, body: $body }) { + comment { id body } + } + } + `; + + const commentResponse = await graphqlWithAuth(commentMutation, { + discussionId: discussionQLId, + body: `Merged with PR #${prNumber}`, + }); + + const commentId = commentResponse.addDiscussionComment.comment.id; + if (!commentId) { + console.log("Failed to post the comment."); + return; + } + + console.log(`Comment Posted Successfully! Comment ID: ${commentId}`); + + const markAnswerMutation = ` + mutation($id: ID!) { + markDiscussionCommentAsAnswer(input: { id: $id }) { + discussion { id title } + } + } + `; + + await graphqlWithAuth(markAnswerMutation, { id: commentId }); + + console.log("Comment marked as answer successfully!"); + + } catch (error) { + console.error("Error:", error); + return; + } + })(); + EOF \ No newline at end of file From e1df6b0a6f3994e46334ed04e080791ba546725e Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:10:18 +0100 Subject: [PATCH 090/167] Update CHANGELOG.md (#2691) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 419288128..ac1e09a30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,16 @@ Do not break established syntax in this file, as it is automatically updated by - SFTPGo Remove unneeded RELEASE variable [@MickLesk](https://github.com/MickLesk) ([#2683](https://github.com/community-scripts/ProxmoxVE/pull/2683)) +### 🧰 Maintenance + + - #### 🐞 Bug Fixes + + - Update install.func: Change Line Number for Error message. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2690](https://github.com/community-scripts/ProxmoxVE/pull/2690)) + + - #### 📂 Github + + - [gh] New Workflow to close Script Request Discussions on PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2688](https://github.com/community-scripts/ProxmoxVE/pull/2688)) + ## 2025-02-26 ### 🆕 New Scripts From cd40beb1ebcc76b4fe59e249fdd395b098c84824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:11:22 +0100 Subject: [PATCH 091/167] New Script: ByteStash (#2680) * Add ByteStash script * Update bytestash-install.sh --- ct/bytestash.sh | 73 ++++++++++++++++++++++++++++++ install/bytestash-install.sh | 86 ++++++++++++++++++++++++++++++++++++ json/bytestash.json | 34 ++++++++++++++ 3 files changed, 193 insertions(+) create mode 100644 ct/bytestash.sh create mode 100644 install/bytestash-install.sh create mode 100644 json/bytestash.json diff --git a/ct/bytestash.sh b/ct/bytestash.sh new file mode 100644 index 000000000..52384e2c4 --- /dev/null +++ b/ct/bytestash.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/jordan-dalby/ByteStash + +APP="ByteStash" +var_tags="code" +var_disk="4" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/bytestash ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/jordan-dalby/ByteStash/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Services" + systemctl stop bytestash-backend + systemctl stop bytestash-frontend + msg_ok "Services Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + temp_file=$(mktemp) + wget -q "https://github.com/jordan-dalby/ByteStash/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + tar zxf $temp_file + rm -rf /opt/bytestash/server/node_modules + rm -rf /opt/bytestash/client/node_modules + cp -rf ByteStash-${RELEASE}/* /opt/bytestash + cd /opt/bytestash/server + $STD npm install + cd /opt/bytestash/client + $STD npm install + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting Services" + systemctl start bytestash-backend + systemctl start bytestash-frontend + msg_ok "Started Services" + + msg_info "Cleaning Up" + rm -f $temp_file + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh new file mode 100644 index 000000000..8d4d01b81 --- /dev/null +++ b/install/bytestash-install.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/jordan-dalby/ByteStash + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + sudo \ + curl \ + mc \ + gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing ByteStash" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/jordan-dalby/ByteStash/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/jordan-dalby/ByteStash/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +tar zxf $temp_file +mv ByteStash-${RELEASE} /opt/bytestash +cd /opt/bytestash/server +$STD npm install +cd /opt/bytestash/client +$STD npm install +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed ByteStash" + +msg_info "Creating Service" +cat </etc/systemd/system/bytestash-backend.service +[Unit] +Description=ByteStash Backend Service +After=network.target + +[Service] +WorkingDirectory=/opt/bytestash/server +ExecStart=/usr/bin/node src/app.js +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/bytestash-frontend.service +[Unit] +Description=ByteStash Frontend Service +After=network.target bytestash-backend.service + +[Service] +WorkingDirectory=/opt/bytestash/client +ExecStart=/usr/bin/npx vite --host +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now bytestash-backend +systemctl enable -q --now bytestash-frontend +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/bytestash.json b/json/bytestash.json new file mode 100644 index 000000000..d2fb545fe --- /dev/null +++ b/json/bytestash.json @@ -0,0 +1,34 @@ +{ + "name": "ByteStash", + "slug": "bytestash", + "categories": [ + 20 + ], + "date_created": "2024-12-20", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://github.com/jordan-dalby/ByteStash/wiki", + "website": "https://github.com/jordan-dalby/ByteStash", + "logo": "https://raw.githubusercontent.com/jordan-dalby/ByteStash/refs/heads/main/client/public/logo192.png", + "description": "ByteStash is a self-hosted web application designed to store, organise, and manage your code snippets efficiently. With support for creating, editing, and filtering snippets, ByteStash helps you keep track of your code in one secure place.", + "install_methods": [ + { + "type": "default", + "script": "ct/bytestash.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From 6a60704d8e8a3ebceaf0485454428610aae5adc8 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:17:34 +0100 Subject: [PATCH 092/167] Update date in json (#2693) Co-authored-by: GitHub Actions --- json/bytestash.json | 66 ++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/json/bytestash.json b/json/bytestash.json index d2fb545fe..a88f04914 100644 --- a/json/bytestash.json +++ b/json/bytestash.json @@ -1,34 +1,34 @@ { - "name": "ByteStash", - "slug": "bytestash", - "categories": [ - 20 - ], - "date_created": "2024-12-20", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 3000, - "documentation": "https://github.com/jordan-dalby/ByteStash/wiki", - "website": "https://github.com/jordan-dalby/ByteStash", - "logo": "https://raw.githubusercontent.com/jordan-dalby/ByteStash/refs/heads/main/client/public/logo192.png", - "description": "ByteStash is a self-hosted web application designed to store, organise, and manage your code snippets efficiently. With support for creating, editing, and filtering snippets, ByteStash helps you keep track of your code in one secure place.", - "install_methods": [ - { - "type": "default", - "script": "ct/bytestash.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 4, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} \ No newline at end of file + "name": "ByteStash", + "slug": "bytestash", + "categories": [ + 20 + ], + "date_created": "2025-02-27", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://github.com/jordan-dalby/ByteStash/wiki", + "website": "https://github.com/jordan-dalby/ByteStash", + "logo": "https://raw.githubusercontent.com/jordan-dalby/ByteStash/refs/heads/main/client/public/logo192.png", + "description": "ByteStash is a self-hosted web application designed to store, organise, and manage your code snippets efficiently. With support for creating, editing, and filtering snippets, ByteStash helps you keep track of your code in one secure place.", + "install_methods": [ + { + "type": "default", + "script": "ct/bytestash.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From bb0bc65e2712dd2183120b27da08ade85a214289 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:17:48 +0100 Subject: [PATCH 093/167] Update .app files (#2694) Co-authored-by: GitHub Actions --- ct/headers/bytestash | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/bytestash diff --git a/ct/headers/bytestash b/ct/headers/bytestash new file mode 100644 index 000000000..73089fe1c --- /dev/null +++ b/ct/headers/bytestash @@ -0,0 +1,6 @@ + ____ __ _____ __ __ + / __ )__ __/ /____ / ___// /_____ ______/ /_ + / __ / / / / __/ _ \\__ \/ __/ __ `/ ___/ __ \ + / /_/ / /_/ / /_/ __/__/ / /_/ /_/ (__ ) / / / +/_____/\__, /\__/\___/____/\__/\__,_/____/_/ /_/ + /____/ From ff49b8fea81cff200366dc55156d7d563c305393 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:18:53 +0100 Subject: [PATCH 094/167] Update CHANGELOG.md (#2692) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac1e09a30..23d3753bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts - - Pelican Wings [@bvdberg01](https://github.com/bvdberg01) ([#2677](https://github.com/community-scripts/ProxmoxVE/pull/2677)) + - New Script: ByteStash [@tremor021](https://github.com/tremor021) ([#2680](https://github.com/community-scripts/ProxmoxVE/pull/2680)) +- Pelican Wings [@bvdberg01](https://github.com/bvdberg01) ([#2677](https://github.com/community-scripts/ProxmoxVE/pull/2677)) - Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) ### 🚀 Updated Scripts From 87afc99489a8bd3c2c4fe169b503a760f52fad72 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:19:50 +0100 Subject: [PATCH 095/167] Update CHANGELOG.md (#2696) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23d3753bd..4addf3f7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts - - New Script: ByteStash [@tremor021](https://github.com/tremor021) ([#2680](https://github.com/community-scripts/ProxmoxVE/pull/2680)) + - ByteStash [@tremor021](https://github.com/tremor021) ([#2680](https://github.com/community-scripts/ProxmoxVE/pull/2680)) - Pelican Wings [@bvdberg01](https://github.com/bvdberg01) ([#2677](https://github.com/community-scripts/ProxmoxVE/pull/2677)) - Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) From be5e6cc8708e174fe44b4c267cc68c11ea45ec83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:28:11 +0100 Subject: [PATCH 096/167] Add HTTPS instructions to the website (#2695) --- json/wger.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/json/wger.json b/json/wger.json index fcc8abc7e..c3282dfa4 100644 --- a/json/wger.json +++ b/json/wger.json @@ -30,5 +30,10 @@ "username": "admin", "password": "adminadmin" }, - "notes": [] -} + "notes": [ + { + "text": "Enable proxy support by uncommenting this line in `/home/wger/src/settings.py` and pointing it to your URL: `# CSRF_TRUSTED_ORIGINS = ['http://127.0.0.1', 'https://my.domain.example.com']`, then restart the service `systemctl restart wger`.", + "type": "info" + } + ] +} \ No newline at end of file From c63037870150973b14f3a9dca8189b925b1fdf17 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:29:35 +0100 Subject: [PATCH 097/167] Update CHANGELOG.md (#2697) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4addf3f7a..84a979d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,12 @@ Do not break established syntax in this file, as it is automatically updated by - [gh] New Workflow to close Script Request Discussions on PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2688](https://github.com/community-scripts/ProxmoxVE/pull/2688)) +### 🌐 Website + + - #### 📝 Script Information + + - Fix: wger - Add HTTPS instructions to the website [@tremor021](https://github.com/tremor021) ([#2695](https://github.com/community-scripts/ProxmoxVE/pull/2695)) + ## 2025-02-26 ### 🆕 New Scripts From 504170881071d55a41ad7e023ba55670e95d491f Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:36:06 +0100 Subject: [PATCH 098/167] Update CHANGELOG.md (#2698) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84a979d0e..0e506ced4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +45,7 @@ Do not break established syntax in this file, as it is automatically updated by - #### 📝 Script Information - - Fix: wger - Add HTTPS instructions to the website [@tremor021](https://github.com/tremor021) ([#2695](https://github.com/community-scripts/ProxmoxVE/pull/2695)) + - wger - Add HTTPS instructions to the website [@tremor021](https://github.com/tremor021) ([#2695](https://github.com/community-scripts/ProxmoxVE/pull/2695)) ## 2025-02-26 From 474954afb677dbce2f0918534357430ca61420ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 12:07:18 +0100 Subject: [PATCH 099/167] Fix Node 22 compatibility (thanks t2lc) (#2705) --- install/bytestash-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh index 8d4d01b81..cd7cbab84 100644 --- a/install/bytestash-install.sh +++ b/install/bytestash-install.sh @@ -38,6 +38,7 @@ RELEASE=$(curl -s https://api.github.com/repos/jordan-dalby/ByteStash/releases/l wget -q "https://github.com/jordan-dalby/ByteStash/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file tar zxf $temp_file mv ByteStash-${RELEASE} /opt/bytestash +sed -i '6s/.*/if (!globalThis.crypto) { globalThis.crypto = crypto; }/' /opt/bytestash/server/src/oidc/oidcConfig.js cd /opt/bytestash/server $STD npm install cd /opt/bytestash/client From 0d4b4a1837901dd4c56690fbd09699793e784f5b Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:13:31 +0100 Subject: [PATCH 100/167] Typo in update scripts (#2707) * Fix typo * Change no update function msg --- .github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md | 2 +- ct/agentdvr.sh | 2 +- ct/apache-cassandra.sh | 2 +- ct/apache-couchdb.sh | 2 +- ct/apache-guacamole.sh | 2 +- ct/beszel.sh | 2 +- ct/channels.sh | 2 +- ct/fenrus.sh | 2 +- ct/glpi.sh | 2 +- ct/gokapi.sh | 2 +- ct/hivemq.sh | 2 +- ct/iventoy.sh | 2 +- ct/mediamtx.sh | 2 +- ct/prowlarr.sh | 2 +- ct/radarr.sh | 2 +- ct/redis.sh | 2 +- ct/traccar.sh | 3 +-- 17 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md index a85739b92..be6c6f848 100644 --- a/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md +++ b/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md @@ -247,7 +247,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no automatic update function for ${APP}." + msg_error "Currently we don't provide an update function for this ${APP}." exit } ``` diff --git a/ct/agentdvr.sh b/ct/agentdvr.sh index 2e7892af5..9dfdaa9d8 100644 --- a/ct/agentdvr.sh +++ b/ct/agentdvr.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/apache-cassandra.sh b/ct/apache-cassandra.sh index ccc17165a..0c3df5ac4 100644 --- a/ct/apache-cassandra.sh +++ b/ct/apache-cassandra.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/apache-couchdb.sh b/ct/apache-couchdb.sh index fdc6022d9..df768b03f 100644 --- a/ct/apache-couchdb.sh +++ b/ct/apache-couchdb.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/apache-guacamole.sh b/ct/apache-guacamole.sh index 8e5e2e796..5fed1c151 100644 --- a/ct/apache-guacamole.sh +++ b/ct/apache-guacamole.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "Ther is currently no automatic update function for ${APP}." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/beszel.sh b/ct/beszel.sh index c159800be..1ed2b1560 100644 --- a/ct/beszel.sh +++ b/ct/beszel.sh @@ -28,7 +28,7 @@ function update_script() { exit fi /opt/beszel/beszel update - msg_error "Ther is currently no automatic update function for ${APP}." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/channels.sh b/ct/channels.sh index 0c05ed7c5..58f0ac0c7 100644 --- a/ct/channels.sh +++ b/ct/channels.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/fenrus.sh b/ct/fenrus.sh index 6a357bf99..13c41990a 100644 --- a/ct/fenrus.sh +++ b/ct/fenrus.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit msg_info "Updating ${APP}" systemctl stop ${APP} diff --git a/ct/glpi.sh b/ct/glpi.sh index e16570d71..46eafb776 100644 --- a/ct/glpi.sh +++ b/ct/glpi.sh @@ -30,7 +30,7 @@ function update_script() { fi RELEASE=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_error "Ther is currently no automatic update function for ${APP}." + msg_error "Currently we don't provide an update function for this ${APP}." else msg_ok "No update required. ${APP} is already at v${RELEASE}." fi diff --git a/ct/gokapi.sh b/ct/gokapi.sh index 2975c984b..740160720 100644 --- a/ct/gokapi.sh +++ b/ct/gokapi.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/hivemq.sh b/ct/hivemq.sh index 28df685bb..4fed0463f 100644 --- a/ct/hivemq.sh +++ b/ct/hivemq.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/iventoy.sh b/ct/iventoy.sh index 53626b157..63cbe3ea6 100644 --- a/ct/iventoy.sh +++ b/ct/iventoy.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/mediamtx.sh b/ct/mediamtx.sh index 044c9f758..128581588 100644 --- a/ct/mediamtx.sh +++ b/ct/mediamtx.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/prowlarr.sh b/ct/prowlarr.sh index bbec37a3a..5dbbfc267 100644 --- a/ct/prowlarr.sh +++ b/ct/prowlarr.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/radarr.sh b/ct/radarr.sh index 2dd684941..43db75ed0 100644 --- a/ct/radarr.sh +++ b/ct/radarr.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/redis.sh b/ct/redis.sh index fe11ba83c..a4f562cb2 100644 --- a/ct/redis.sh +++ b/ct/redis.sh @@ -27,7 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." + msg_error "Currently we don't provide an update function for this ${APP}." exit } diff --git a/ct/traccar.sh b/ct/traccar.sh index fbf9e9b0d..bdeaeeb64 100644 --- a/ct/traccar.sh +++ b/ct/traccar.sh @@ -27,8 +27,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - msg_error "There is currently no update path available." - exit + msg_error "Currently we don't provide an update function for this ${APP}." exit } From 0871b9c84ca6622ad60e23946002f3ca15b44ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:13:56 +0100 Subject: [PATCH 101/167] Change key to hex32 (#2709) --- install/outline-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/outline-install.sh b/install/outline-install.sh index 52fde65cf..436f4aadf 100644 --- a/install/outline-install.sh +++ b/install/outline-install.sh @@ -46,7 +46,7 @@ $STD apt-get install -y postgresql-16 DB_NAME="outline" DB_USER="outline" DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" -SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)" +SECRET_KEY="$(openssl rand -hex 32)" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" @@ -103,4 +103,4 @@ msg_info "Cleaning up" rm -rf $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" +msg_ok "Cleaned" \ No newline at end of file From bd0c906c44e8c82ce88ac6e7117e040986489155 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:14:26 +0100 Subject: [PATCH 102/167] Zitadel-install.sh: Remove one version file and update to our standard (#2710) --- install/zitadel-install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/zitadel-install.sh b/install/zitadel-install.sh index 6ee097ca4..340ec3a42 100644 --- a/install/zitadel-install.sh +++ b/install/zitadel-install.sh @@ -46,7 +46,6 @@ msg_info "Installing Zitadel" RELEASE=$(curl -si https://github.com/zitadel/zitadel/releases/latest | grep location: | cut -d '/' -f 8 | tr -d '\r') wget -qc https://github.com/zitadel/zitadel/releases/download/$RELEASE/zitadel-linux-amd64.tar.gz -O - | tar -xz mv zitadel-linux-amd64/zitadel /usr/local/bin -echo "${RELEASE}" >"/opt/zitadel_version.txt" msg_ok "Installed Zitadel" msg_info "Setting up Zitadel Environments" @@ -126,7 +125,7 @@ zitadel start-from-init --masterkeyFile /opt/zitadel/.masterkey --config /opt/zi sleep 60 kill $(lsof -i | awk '/zitadel/ {print $2}' | head -n1) useradd zitadel -echo -e "$(zitadel -v | grep -oP 'v\d+\.\d+\.\d+')" > /opt/Zitadel_version.txt +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Zitadel initialized" msg_info "Set ExternalDomain to current IP and restart Zitadel" From fb515bc057801c84521caeef3c5f9572753ac2f7 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 13:16:57 +0100 Subject: [PATCH 103/167] Update CHANGELOG.md (#2708) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e506ced4..da89f17e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,14 +21,19 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts - - ByteStash [@tremor021](https://github.com/tremor021) ([#2680](https://github.com/community-scripts/ProxmoxVE/pull/2680)) + - Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) - Pelican Wings [@bvdberg01](https://github.com/bvdberg01) ([#2677](https://github.com/community-scripts/ProxmoxVE/pull/2677)) -- Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) +- ByteStash [@tremor021](https://github.com/tremor021) ([#2680](https://github.com/community-scripts/ProxmoxVE/pull/2680)) ### 🚀 Updated Scripts + - ByteStash: Fix Node 22 compatibility (thanks t2lc) [@tremor021](https://github.com/tremor021) ([#2705](https://github.com/community-scripts/ProxmoxVE/pull/2705)) + - #### 🐞 Bug Fixes + - Zitadel-install.sh: Remove one version file and update to our standard [@bvdberg01](https://github.com/bvdberg01) ([#2710](https://github.com/community-scripts/ProxmoxVE/pull/2710)) + - Outline: Change key to hex32 [@tremor021](https://github.com/tremor021) ([#2709](https://github.com/community-scripts/ProxmoxVE/pull/2709)) + - Typo in update scripts [@bvdberg01](https://github.com/bvdberg01) ([#2707](https://github.com/community-scripts/ProxmoxVE/pull/2707)) - SFTPGo Remove unneeded RELEASE variable [@MickLesk](https://github.com/MickLesk) ([#2683](https://github.com/community-scripts/ProxmoxVE/pull/2683)) ### 🧰 Maintenance From 3bf4155fecc231208c8e62d8298cc009c61410e8 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:53:10 +0200 Subject: [PATCH 104/167] Update Runner (#2711) --- .github/workflows/auto-update-app-headers.yml | 2 +- .github/workflows/autolabeler.yml | 2 +- .github/workflows/changelog-pr.yml | 2 +- .github/workflows/close-discussion.yml | 2 +- .github/workflows/delete-json-branch.yml | 2 +- .github/workflows/frontend-cicd.yml | 2 +- .github/workflows/github-release.yml | 2 +- .github/workflows/update-json-date.yml | 2 +- .github/workflows/validate-filenames.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 5e447ea54..b6c4f2b77 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -10,7 +10,7 @@ on: jobs: update-app-files: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: contents: write diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 013c40be5..54647eab6 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -7,7 +7,7 @@ on: jobs: autolabeler: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: pull-requests: write env: diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index dc5bcd3d3..036ef7a7c 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -7,7 +7,7 @@ on: jobs: update-changelog-pull-request: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set env: CONFIG_PATH: .github/changelog-pr-config.json BRANCH_NAME: github-action-update-changelog diff --git a/.github/workflows/close-discussion.yml b/.github/workflows/close-discussion.yml index 4b39fbf96..dd9a80b33 100644 --- a/.github/workflows/close-discussion.yml +++ b/.github/workflows/close-discussion.yml @@ -6,7 +6,7 @@ on: jobs: close-discussion: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set steps: - name: Checkout Repository diff --git a/.github/workflows/delete-json-branch.yml b/.github/workflows/delete-json-branch.yml index e4cdcf24f..b72868402 100644 --- a/.github/workflows/delete-json-branch.yml +++ b/.github/workflows/delete-json-branch.yml @@ -9,7 +9,7 @@ on: jobs: delete_branch: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set steps: - name: Checkout the code uses: actions/checkout@v3 diff --git a/.github/workflows/frontend-cicd.yml b/.github/workflows/frontend-cicd.yml index dd242f6ef..c4f1a6418 100644 --- a/.github/workflows/frontend-cicd.yml +++ b/.github/workflows/frontend-cicd.yml @@ -27,7 +27,7 @@ concurrency: jobs: build: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set defaults: run: working-directory: frontend # Set default working directory for all run steps diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index eba622ff9..ad95f730a 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -7,7 +7,7 @@ on: jobs: create-new-release: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: contents: write steps: diff --git a/.github/workflows/update-json-date.yml b/.github/workflows/update-json-date.yml index 7e9c24973..26957e50c 100644 --- a/.github/workflows/update-json-date.yml +++ b/.github/workflows/update-json-date.yml @@ -10,7 +10,7 @@ on: jobs: update-app-files: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: contents: write diff --git a/.github/workflows/validate-filenames.yml b/.github/workflows/validate-filenames.yml index ad821e943..dac806260 100644 --- a/.github/workflows/validate-filenames.yml +++ b/.github/workflows/validate-filenames.yml @@ -10,7 +10,7 @@ on: jobs: check-files: name: Check changed files - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: pull-requests: write From a5039cff5827b1a4e48a7dc44c8b7f8bde6a76e2 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:53:23 +0200 Subject: [PATCH 105/167] Improve Workflow (#2712) --- .github/workflows/script-test.yml | 95 +++++++++++++++++++------------ 1 file changed, 60 insertions(+), 35 deletions(-) diff --git a/.github/workflows/script-test.yml b/.github/workflows/script-test.yml index 3b86f3d89..f73ad27b7 100644 --- a/.github/workflows/script-test.yml +++ b/.github/workflows/script-test.yml @@ -62,46 +62,71 @@ jobs: id: run-install continue-on-error: true run: | - set +e - #run for each files in /ct - for FILE in ${{ env.ALL_FILES }}; do - STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') - echo "Running Test for: $STRIPPED_NAME" - if [[ $FILE =~ ^install/.*-install\.sh$ ]]; then - CT_SCRIPT="ct/$STRIPPED_NAME.sh" - echo $CT_SCRIPT - if [[ ! -f $CT_SCRIPT ]]; then - echo "No CT script found for $STRIPPED_NAME" - ERROR_MSG="No CT script found for $FILE" - RUN=false + set +e + #run for each files in /ct + for FILE in ${{ env.ALL_FILES }}; do + STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') + echo "Running Test for: $STRIPPED_NAME" + if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "$FILE"; then + echo "The script contains an interactive prompt. Skipping execution." + continue fi - echo "Found CT script for $STRIPPED_NAME" - chmod +x "$CT_SCRIPT" - RUNNING_FILE=$CT_SCRIPT - elif [[ $FILE =~ ^ct/.*\.sh$ ]]; then - INSTALL_SCRIPT="install/$STRIPPED_NAME-install.sh" - if [[ ! -f $INSTALL_SCRIPT ]]; then - echo "No install script found for $STRIPPED_NAME" - ERROR_MSG="No install script found for $FILE" - RUN=false - fi - echo "Found install script for $STRIPPED_NAME" - chmod +x "$INSTALL_SCRIPT" - RUNNING_FILE=$FILE - fi - if [[ $RUN != "false" ]]; then + if [[ $FILE =~ ^install/.*-install\.sh$ ]]; then + CT_SCRIPT="ct/$STRIPPED_NAME.sh" + if [[ ! -f $CT_SCRIPT ]]; then + echo "No CT script found for $STRIPPED_NAME" + ERROR_MSG="No CT script found for $FILE" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + continue + fi + if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "install/$STRIPPED_NAME-install.sh"; then + echo "The script contains an interactive prompt. Skipping execution." + continue + fi + echo "Found CT script for $STRIPPED_NAME" + chmod +x "$CT_SCRIPT" + RUNNING_FILE=$CT_SCRIPT + elif [[ $FILE =~ ^ct/.*\.sh$ ]]; then + INSTALL_SCRIPT="install/$STRIPPED_NAME-install.sh" + if [[ ! -f $INSTALL_SCRIPT ]]; then + echo "No install script found for $STRIPPED_NAME" + ERROR_MSG="No install script found for $FILE" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + continue + fi + echo "Found install script for $STRIPPED_NAME" + chmod +x "$INSTALL_SCRIPT" + RUNNING_FILE=$FILE + if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "ct/$STRIPPED_NAME.sh"; then + echo "The script contains an interactive prompt. Skipping execution." + continue + fi + fi + git remote add community-scripts https://github.com/community-scripts/ProxmoxVE.git + git fetch community-scripts + rm -f .github/workflows/scripts/app-test/pr-build.func || true + rm -f .github/workflows/scripts/app-test/pr-install.func || true + rm -f .github/workflows/scripts/app-test/pr-alpine-install.func || true + rm -f .github/workflows/scripts/app-test/pr-create-lxc.sh || true + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-build.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-install.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-alpine-install.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-create-lxc.sh chmod +x $RUNNING_FILE - sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/.github/workflows/scripts/app-test/pr-build.func)|g' "$RUNNING_FILE" + chmod +x .github/workflows/scripts/app-test/pr-create-lxc.sh + chmod +x .github/workflows/scripts/app-test/pr-install.func + chmod +x .github/workflows/scripts/app-test/pr-alpine-install.func + chmod +x .github/workflows/scripts/app-test/pr-build.func + sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" echo "Executing $RUNNING_FILE" ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) echo "Finished running $FILE" - fi - if [ -n "$ERROR_MSG" ]; then - echo "ERROR in $STRIPPED_NAME: $ERROR_MSG" - echo "$ERROR_MSG" > result_$STRIPPED_NAME.log - fi - done - set -e # Restore exit-on-error + if [ -n "$ERROR_MSG" ]; then + echo "ERROR in $STRIPPED_NAME: $ERROR_MSG" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + fi + done + set -e # Restore exit-on-error - name: Cleanup PVE Node run: | From c01abd559b77bb96a31001687abde15f530f7c4a Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 27 Feb 2025 16:56:56 +0200 Subject: [PATCH 106/167] Add basic pagination (#2715) --- frontend/src/app/data/page.tsx | 222 ++++++------------- frontend/src/components/ApplicationChart.tsx | 16 +- 2 files changed, 76 insertions(+), 162 deletions(-) diff --git a/frontend/src/app/data/page.tsx b/frontend/src/app/data/page.tsx index e78b4a675..b75246484 100644 --- a/frontend/src/app/data/page.tsx +++ b/frontend/src/app/data/page.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useEffect, useState } from "react"; +import React, { JSX, useEffect, useState } from "react"; import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; import ApplicationChart from "../../components/ApplicationChart"; @@ -21,28 +21,45 @@ interface DataModel { status: string; error: string; type: string; + [key: string]: any; } +interface SummaryData { + total_entries: number; + status_count: Record; + nsapp_count: Record; +} const DataFetcher: React.FC = () => { const [data, setData] = useState([]); + const [summary, setSummary] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); - const [searchQuery, setSearchQuery] = useState(''); - const [startDate, setStartDate] = useState(null); - const [endDate, setEndDate] = useState(null); - const [sortConfig, setSortConfig] = useState<{ key: keyof DataModel | null, direction: 'ascending' | 'descending' }>({ key: 'id', direction: 'descending' }); - const [itemsPerPage, setItemsPerPage] = useState(25); const [currentPage, setCurrentPage] = useState(1); - - const [showErrorRow, setShowErrorRow] = useState(null); - + const [itemsPerPage, setItemsPerPage] = useState(25); + const [sortConfig, setSortConfig] = useState<{ key: string; direction: 'ascending' | 'descending' } | null>(null); useEffect(() => { - const fetchData = async () => { + const fetchSummary = async () => { try { - const response = await fetch("https://api.htl-braunau.at/data/json"); - if (!response.ok) throw new Error("Failed to fetch data: ${response.statusText}"); + const response = await fetch("https://api.htl-braunau.at/data/summary"); + if (!response.ok) throw new Error(`Failed to fetch summary: ${response.statusText}`); + const result: SummaryData = await response.json(); + setSummary(result); + } catch (err) { + setError((err as Error).message); + } + }; + + fetchSummary(); + }, []); + + useEffect(() => { + const fetchPaginatedData = async () => { + setLoading(true); + try { + const response = await fetch(`https://api.htl-braunau.at/data/paginated?page=${currentPage}&limit=${itemsPerPage === 0 ? '' : itemsPerPage}`); + if (!response.ok) throw new Error(`Failed to fetch data: ${response.statusText}`); const result: DataModel[] = await response.json(); setData(result); } catch (err) { @@ -52,52 +69,34 @@ const DataFetcher: React.FC = () => { } }; - fetchData(); - }, []); - - - const filteredData = data.filter(item => { - const matchesSearchQuery = Object.values(item).some(value => - value.toString().toLowerCase().includes(searchQuery.toLowerCase()) - ); - const itemDate = new Date(item.created_at); - const matchesDateRange = (!startDate || itemDate >= startDate) && (!endDate || itemDate <= endDate); - return matchesSearchQuery && matchesDateRange; - }); + fetchPaginatedData(); + }, [currentPage, itemsPerPage]); const sortedData = React.useMemo(() => { - let sortableData = [...filteredData]; - if (sortConfig.key !== null) { - sortableData.sort((a, b) => { - if (sortConfig.key !== null && a[sortConfig.key] < b[sortConfig.key]) { - return sortConfig.direction === 'ascending' ? -1 : 1; - } - if (sortConfig.key !== null && a[sortConfig.key] > b[sortConfig.key]) { - return sortConfig.direction === 'ascending' ? 1 : -1; - } - return 0; - }); - } - return sortableData; - }, [filteredData, sortConfig]); + if (!sortConfig) return data; + const sorted = [...data].sort((a, b) => { + if (a[sortConfig.key] < b[sortConfig.key]) { + return sortConfig.direction === 'ascending' ? -1 : 1; + } + if (a[sortConfig.key] > b[sortConfig.key]) { + return sortConfig.direction === 'ascending' ? 1 : -1; + } + return 0; + }); + return sorted; + }, [data, sortConfig]); - const requestSort = (key: keyof DataModel | null) => { + if (loading) return

Loading...

; + if (error) return

Error: {error}

; + + const requestSort = (key: string) => { let direction: 'ascending' | 'descending' = 'ascending'; - if (sortConfig.key === key && sortConfig.direction === 'ascending') { - direction = 'descending'; - } else if (sortConfig.key === key && sortConfig.direction === 'descending') { - direction = 'ascending'; - } else { + if (sortConfig && sortConfig.key === key && sortConfig.direction === 'ascending') { direction = 'descending'; } setSortConfig({ key, direction }); }; - interface SortConfig { - key: keyof DataModel | null; - direction: 'ascending' | 'descending'; - } - const formatDate = (dateString: string): string => { const date = new Date(dateString); const year = date.getFullYear(); @@ -109,86 +108,15 @@ const DataFetcher: React.FC = () => { return `${day}.${month}.${year} ${hours}:${minutes} ${timezoneOffset} GMT`; }; - const handleItemsPerPageChange = (event: React.ChangeEvent) => { - setItemsPerPage(Number(event.target.value)); - setCurrentPage(1); - }; - - const paginatedData = sortedData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage); - - - if (loading) return

Loading...

; - if (error) return

Error: {error}

; - - var installingCounts: number = 0; - var failedCounts: number = 0; - var doneCounts: number = 0 - var unknownCounts: number = 0; - data.forEach((item) => { - if (item.status === "installing") { - installingCounts += 1; - } else if (item.status === "failed") { - failedCounts += 1; - } - else if (item.status === "done") { - doneCounts += 1; - } - else { - unknownCounts += 1; - } - }); - return (

Created LXCs

-
-
- setSearchQuery(e.target.value)} - className="p-2 border" - /> - -
-
- setStartDate(date)} - selectsStart - startDate={startDate} - endDate={endDate} - placeholderText="Start date" - className="p-2 border" - /> - -
- -
- setEndDate(date)} - selectsEnd - startDate={startDate} - endDate={endDate} - placeholderText="End date" - className="p-2 border" - /> - -
-
- + +

-

{filteredData.length} results found

-

Status Legend: 🔄 installing {installingCounts} | ✔️ completetd {doneCounts} | ❌ failed {failedCounts} | ❓ unknown {unknownCounts}

- -
+

{summary?.total_entries} results found

+

Status Legend: 🔄 installing {summary?.status_count["installing"] ?? 0} | ✔️ completed {summary?.status_count["done"] ?? 0} | ❌ failed {summary?.status_count["failed"] ?? 0} | ❓ unknown

+
@@ -209,7 +137,7 @@ const DataFetcher: React.FC = () => { - {paginatedData.map((item, index) => ( + {sortedData.map((item, index) => ( - + ))} @@ -259,26 +174,25 @@ const DataFetcher: React.FC = () => {
- + Page {currentPage} - +
); }; - - export default DataFetcher; diff --git a/frontend/src/components/ApplicationChart.tsx b/frontend/src/components/ApplicationChart.tsx index e62c10961..f70fa7098 100644 --- a/frontend/src/components/ApplicationChart.tsx +++ b/frontend/src/components/ApplicationChart.tsx @@ -25,12 +25,16 @@ import { Chart as ChartJS, ArcElement, Tooltip as ChartTooltip, Legend } from "c import ChartDataLabels from "chartjs-plugin-datalabels"; import { BarChart3, PieChart } from "lucide-react"; import React, { useState } from "react"; -import { Pie } from "react-chartjs-2"; +import { Pie, Bar } from "react-chartjs-2"; ChartJS.register(ArcElement, ChartTooltip, Legend, ChartDataLabels); +interface SummaryData { + nsapp_count: Record; +} + interface ApplicationChartProps { - data: { nsapp: string }[]; + data: SummaryData | null; } const ITEMS_PER_PAGE = 20; @@ -57,13 +61,9 @@ export default function ApplicationChart({ data }: ApplicationChartProps) { const [chartStartIndex, setChartStartIndex] = useState(0); const [tableLimit, setTableLimit] = useState(ITEMS_PER_PAGE); - // Calculate application counts - const appCounts = data.reduce((acc, item) => { - acc[item.nsapp] = (acc[item.nsapp] || 0) + 1; - return acc; - }, {} as Record); + if (!data) return null; - const sortedApps = Object.entries(appCounts) + const sortedApps = Object.entries(data.nsapp_count) .sort(([, a], [, b]) => b - a); const chartApps = sortedApps.slice( From 8c1cc56321f90ae0f55899134af78fcf73f52fdf Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 27 Feb 2025 17:03:29 +0200 Subject: [PATCH 107/167] Revert "Update Runner (#2711)" (#2717) This reverts commit 3bf4155fecc231208c8e62d8298cc009c61410e8. --- .github/workflows/auto-update-app-headers.yml | 2 +- .github/workflows/autolabeler.yml | 2 +- .github/workflows/changelog-pr.yml | 2 +- .github/workflows/close-discussion.yml | 2 +- .github/workflows/delete-json-branch.yml | 2 +- .github/workflows/frontend-cicd.yml | 2 +- .github/workflows/github-release.yml | 2 +- .github/workflows/update-json-date.yml | 2 +- .github/workflows/validate-filenames.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index b6c4f2b77..5e447ea54 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -10,7 +10,7 @@ on: jobs: update-app-files: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 54647eab6..013c40be5 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -7,7 +7,7 @@ on: jobs: autolabeler: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest permissions: pull-requests: write env: diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index 036ef7a7c..dc5bcd3d3 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -7,7 +7,7 @@ on: jobs: update-changelog-pull-request: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest env: CONFIG_PATH: .github/changelog-pr-config.json BRANCH_NAME: github-action-update-changelog diff --git a/.github/workflows/close-discussion.yml b/.github/workflows/close-discussion.yml index dd9a80b33..4b39fbf96 100644 --- a/.github/workflows/close-discussion.yml +++ b/.github/workflows/close-discussion.yml @@ -6,7 +6,7 @@ on: jobs: close-discussion: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest steps: - name: Checkout Repository diff --git a/.github/workflows/delete-json-branch.yml b/.github/workflows/delete-json-branch.yml index b72868402..e4cdcf24f 100644 --- a/.github/workflows/delete-json-branch.yml +++ b/.github/workflows/delete-json-branch.yml @@ -9,7 +9,7 @@ on: jobs: delete_branch: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest steps: - name: Checkout the code uses: actions/checkout@v3 diff --git a/.github/workflows/frontend-cicd.yml b/.github/workflows/frontend-cicd.yml index c4f1a6418..dd242f6ef 100644 --- a/.github/workflows/frontend-cicd.yml +++ b/.github/workflows/frontend-cicd.yml @@ -27,7 +27,7 @@ concurrency: jobs: build: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest defaults: run: working-directory: frontend # Set default working directory for all run steps diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index ad95f730a..eba622ff9 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -7,7 +7,7 @@ on: jobs: create-new-release: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest permissions: contents: write steps: diff --git a/.github/workflows/update-json-date.yml b/.github/workflows/update-json-date.yml index 26957e50c..7e9c24973 100644 --- a/.github/workflows/update-json-date.yml +++ b/.github/workflows/update-json-date.yml @@ -10,7 +10,7 @@ on: jobs: update-app-files: - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/validate-filenames.yml b/.github/workflows/validate-filenames.yml index dac806260..ad821e943 100644 --- a/.github/workflows/validate-filenames.yml +++ b/.github/workflows/validate-filenames.yml @@ -10,7 +10,7 @@ on: jobs: check-files: name: Check changed files - runs-on: runner-cluster-htl-set + runs-on: ubuntu-latest permissions: pull-requests: write From c730b5c00929e1d6cc0b9642b94d30bda94b738c Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 16:34:53 +0100 Subject: [PATCH 108/167] Update CHANGELOG.md (#2718) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da89f17e1..572c133c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,10 +44,16 @@ Do not break established syntax in this file, as it is automatically updated by - #### 📂 Github + - Improve Script-Test Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2712](https://github.com/community-scripts/ProxmoxVE/pull/2712)) + - Switch all actions to self-hosted Runners [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2711](https://github.com/community-scripts/ProxmoxVE/pull/2711)) - [gh] New Workflow to close Script Request Discussions on PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2688](https://github.com/community-scripts/ProxmoxVE/pull/2688)) ### 🌐 Website + - #### ✨ New Features + + - Add basic pagination to Data Viewer [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2715](https://github.com/community-scripts/ProxmoxVE/pull/2715)) + - #### 📝 Script Information - wger - Add HTTPS instructions to the website [@tremor021](https://github.com/tremor021) ([#2695](https://github.com/community-scripts/ProxmoxVE/pull/2695)) From 0ac0cc263ec8b728ce1ced5944c66044784218d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 16:40:07 +0100 Subject: [PATCH 109/167] Keycloak: Update installation script (#2714) * Update installation script * fixed tar command * fix tar again * fixes * Update keycloak-install.sh --- install/keycloak-install.sh | 55 ++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/install/keycloak-install.sh b/install/keycloak-install.sh index 4ed59b2c4..e0a1024ce 100644 --- a/install/keycloak-install.sh +++ b/install/keycloak-install.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT -# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/keycloak/keycloak -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -13,40 +13,51 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies (Patience)" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y ca-certificates-java -$STD apt-get install -y openjdk-17-jre-headless +msg_info "Installing Dependencies" +$STD apt-get install -y \ +curl \ +sudo \ +mc \ +gnupg msg_ok "Installed Dependencies" +msg_info "Installing OpenJDK" +wget -qO- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor >/etc/apt/trusted.gpg.d/adoptium.gpg +echo 'deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb bookworm main' >/etc/apt/sources.list.d/adoptium.list +$STD apt-get update +$STD apt-get install -y temurin-21-jre +msg_ok "Installed OpenJDK" + +msg_info "Installing Keycloak" +temp_file=$(mktemp) RELEASE=$(curl -s https://api.github.com/repos/keycloak/keycloak/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -msg_info "Installing Keycloak v$RELEASE" -cd /opt -wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz -$STD tar -xvf keycloak-$RELEASE.tar.gz -mv keycloak-$RELEASE keycloak +wget -q https://github.com/keycloak/keycloak/releases/download/$RELEASE/keycloak-$RELEASE.tar.gz -O $temp_file +tar xzf $temp_file +mv keycloak-$RELEASE /opt/keycloak msg_ok "Installed Keycloak" msg_info "Creating Service" -service_path="/etc/systemd/system/keycloak.service" -echo "[Unit] -Description=Keycloak -After=network-online.target +cat </etc/systemd/system/keycloak.service +[Unit] +Description=Keycloak Service +After=network.target + [Service] User=root WorkingDirectory=/opt/keycloak ExecStart=/opt/keycloak/bin/kc.sh start-dev + [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now keycloak.service +WantedBy=multi-user.target +EOF +systemctl enable -q --now keycloak msg_ok "Created Service" motd_ssh customize msg_info "Cleaning up" +rm -f $temp_file $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 51a336168637cc06436cf7a989a66ccf8168b589 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 27 Feb 2025 16:41:34 +0100 Subject: [PATCH 110/167] Update unbound-install.sh --- install/unbound-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/unbound-install.sh b/install/unbound-install.sh index 39cde037e..e993b6ded 100644 --- a/install/unbound-install.sh +++ b/install/unbound-install.sh @@ -61,7 +61,7 @@ EOF touch /var/log/unbound.log chown unbound:unbound /var/log/unbound.log - +sleep 5 systemctl restart unbound msg_ok "Installed Unbound" From 35f74cb3b60859f8e584982f9fcc31f43123b5a8 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 17:18:26 +0100 Subject: [PATCH 111/167] Update CHANGELOG.md (#2719) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 572c133c8..3cace72f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts - - ByteStash: Fix Node 22 compatibility (thanks t2lc) [@tremor021](https://github.com/tremor021) ([#2705](https://github.com/community-scripts/ProxmoxVE/pull/2705)) + - Keycloak: Update installation script [@tremor021](https://github.com/tremor021) ([#2714](https://github.com/community-scripts/ProxmoxVE/pull/2714)) +- ByteStash: Fix Node 22 compatibility (thanks t2lc) [@tremor021](https://github.com/tremor021) ([#2705](https://github.com/community-scripts/ProxmoxVE/pull/2705)) - #### 🐞 Bug Fixes @@ -44,9 +45,9 @@ Do not break established syntax in this file, as it is automatically updated by - #### 📂 Github + - New Workflow to close Script Request Discussions on PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2688](https://github.com/community-scripts/ProxmoxVE/pull/2688)) - Improve Script-Test Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2712](https://github.com/community-scripts/ProxmoxVE/pull/2712)) - Switch all actions to self-hosted Runners [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2711](https://github.com/community-scripts/ProxmoxVE/pull/2711)) - - [gh] New Workflow to close Script Request Discussions on PR merge [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2688](https://github.com/community-scripts/ProxmoxVE/pull/2688)) ### 🌐 Website From 4cad8681752dd685a64f97879f7c4e8af150e435 Mon Sep 17 00:00:00 2001 From: Scott Callaway Date: Thu, 27 Feb 2025 18:04:03 +0000 Subject: [PATCH 112/167] feat: use HTML button element for copying to clipboard (#2720) It's much more semantic to use the ` ); From 949dcd0b230996672d6d13f228d2ee5418ef9534 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:05:06 +0100 Subject: [PATCH 113/167] web-check (#2662) * add: web-check-install.sh * add: web-check.sh * Create web-check.json * Update web-check-install.sh * Update web-check-install.sh * Update web-check-install.sh * Update web-check.sh * Update web-check.json * Update web-check.sh * Update web-check-install.sh * Update web-check.json --- ct/web-check.sh | 41 +++++++++ install/web-check-install.sh | 159 +++++++++++++++++++++++++++++++++++ json/web-check.json | 34 ++++++++ 3 files changed, 234 insertions(+) create mode 100644 ct/web-check.sh create mode 100644 install/web-check-install.sh create mode 100644 json/web-check.json diff --git a/ct/web-check.sh b/ct/web-check.sh new file mode 100644 index 000000000..fe4428fd4 --- /dev/null +++ b/ct/web-check.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/Lissy93/web-check + +APP="web-check" +TAGS="network;analysis" +var_cpu="2" +var_ram="2048" +var_disk="12" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/web-check ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "Currently we don't provide an update function for this ${APP}." + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/web-check-install.sh b/install/web-check-install.sh new file mode 100644 index 000000000..e01e1399e --- /dev/null +++ b/install/web-check-install.sh @@ -0,0 +1,159 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/lissy93/web-check +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" + +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get -y install --no-install-recommends \ + curl \ + sudo \ + mc \ + git \ + gnupg \ + traceroute \ + make \ + g++ \ + traceroute \ + xvfb \ + dbus \ + xorg \ + xvfb \ + gtk2-engines-pixbuf \ + dbus-x11 \ + xfonts-base \ + xfonts-100dpi \ + xfonts-75dpi \ + xfonts-scalable \ + imagemagick \ + x11-apps +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Setup Python3" +$STD apt-get install -y python3 +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +msg_ok "Setup Python3" + +msg_info "Installing Chromium" +curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/trusted.gpg.d/google-archive.gpg +echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >/etc/apt/sources.list.d/google.list +$STD apt-get update +$STD apt-get -y install \ + chromium \ + libxss1 \ + lsb-release +msg_ok "Installed Chromium" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g yarn +msg_ok "Installed Node.js" + +msg_info "Setting up Chromium" +/usr/bin/chromium --no-sandbox --version > /etc/chromium-version +chmod 755 /usr/bin/chromium +msg_ok "Setup Chromium" + +msg_info "Installing Web-Check (Patience)" +temp_file=$(mktemp) +RELEASE="patch-1" +wget -q "https://github.com/CrazyWolf13/web-check/archive/refs/heads/${RELEASE}.tar.gz" -O $temp_file +tar xzf $temp_file +mv web-check-${RELEASE} /opt/web-check +cd /opt/web-check +cat < /opt/web-check/.env +CHROME_PATH=/usr/bin/chromium +PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium +HEADLESS=true +GOOGLE_CLOUD_API_KEY='' +REACT_APP_SHODAN_API_KEY='' +REACT_APP_WHO_API_KEY='' +SECURITY_TRAILS_API_KEY='' +CLOUDMERSIVE_API_KEY='' +TRANCO_USERNAME='' +TRANCO_API_KEY='' +URL_SCAN_API_KEY='' +BUILT_WITH_API_KEY='' +TORRENT_IP_API_KEY='' +PORT='3000' +DISABLE_GUI='false' +API_TIMEOUT_LIMIT='10000' +API_CORS_ORIGIN='*' +API_ENABLE_RATE_LIMIT='false' +REACT_APP_API_ENDPOINT='/api' +ENABLE_ANALYTICS='false' +EOF +$STD yarn install --frozen-lockfile --network-timeout 100000 +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Web-Check" + +msg_info "Building Web-Check" +$STD yarn build --production +msg_ok "Built Web-Check" + +msg_info "Creating Service" +cat < /opt/run_web-check.sh +#!/bin/bash +SCREEN_RESOLUTION="1280x1024x24" +if ! systemctl is-active --quiet dbus; then + echo "Warning: dbus service is not running. Some features may not work properly." +fi +[[ -z "${DISPLAY}" ]] && export DISPLAY=":99" +Xvfb "${DISPLAY}" -screen 0 "${SCREEN_RESOLUTION}" & +XVFB_PID=$! +sleep 2 +cd /opt/web-check +exec yarn start +EOF +chmod +x /opt/run_web-check.sh +cat < /etc/systemd/system/web-check.service +[Unit] +Description=Web Check Service +After=network.target + +[Service] +Type=simple +User=root +Group=root +WorkingDirectory=/opt/web-check +EnvironmentFile=/opt/web-check/.env +ExecStartPre=/bin/bash -c "service dbus start || true" +ExecStartPre=/bin/bash -c "if ! pgrep -f 'Xvfb.*:99' > /dev/null; then Xvfb :99 -screen 0 1280x1024x24 & fi" +ExecStart=/opt/run_web-check.sh +Restart=on-failure +Environment=DISPLAY=:99 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now web-check +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf $temp_file +rm -rf /var/lib/apt/lists/* /app/node_modules/.cache +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize diff --git a/json/web-check.json b/json/web-check.json new file mode 100644 index 000000000..f7c686051 --- /dev/null +++ b/json/web-check.json @@ -0,0 +1,34 @@ +{ + "name": "Web-Check", + "slug": "web-check", + "categories": [ + 4 + ], + "date_created": "2025-02-26", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 3000, + "documentation": "https://github.com/Lissy93/web-check/blob/master/.github/README.md", + "website": "https://github.com/lissy93/web-check", + "logo": "https://raw.githubusercontent.com/Lissy93/web-check/refs/heads/master/.github/web-check-logo.png", + "description": "Get an insight into the inner-workings of a given website: uncover potential attack vectors, analyse server architecture, view security configurations, and learn what technologies a site is using.", + "install_methods": [ + { + "type": "default", + "script": "ct/web-check.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 12, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From 5bfde871593f27944509f7d5016730b7a964390c Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:05:46 +0100 Subject: [PATCH 114/167] Update date in json (#2724) Co-authored-by: GitHub Actions --- json/web-check.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/web-check.json b/json/web-check.json index f7c686051..53cda3439 100644 --- a/json/web-check.json +++ b/json/web-check.json @@ -4,7 +4,7 @@ "categories": [ 4 ], - "date_created": "2025-02-26", + "date_created": "2025-02-27", "type": "ct", "updateable": false, "privileged": false, From ccd70a835fb29b97f876cf51287fdbe2d30c9ee0 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:06:08 +0100 Subject: [PATCH 115/167] Update .app files (#2725) Co-authored-by: GitHub Actions --- ct/headers/web-check | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/web-check diff --git a/ct/headers/web-check b/ct/headers/web-check new file mode 100644 index 000000000..371062cb9 --- /dev/null +++ b/ct/headers/web-check @@ -0,0 +1,6 @@ + __ __ __ + _ _____ / /_ _____/ /_ ___ _____/ /__ +| | /| / / _ \/ __ \______/ ___/ __ \/ _ \/ ___/ //_/ +| |/ |/ / __/ /_/ /_____/ /__/ / / / __/ /__/ ,< +|__/|__/\___/_.___/ \___/_/ /_/\___/\___/_/|_| + From 0e00057477a1340b9d31a264a4463c3662948089 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 19:06:45 +0100 Subject: [PATCH 116/167] Update CHANGELOG.md (#2723) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cace72f6..a8eeff47b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🆕 New Scripts - - Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) + - web-check [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2662](https://github.com/community-scripts/ProxmoxVE/pull/2662)) +- Pelican Panel [@bvdberg01](https://github.com/bvdberg01) ([#2678](https://github.com/community-scripts/ProxmoxVE/pull/2678)) - Pelican Wings [@bvdberg01](https://github.com/bvdberg01) ([#2677](https://github.com/community-scripts/ProxmoxVE/pull/2677)) - ByteStash [@tremor021](https://github.com/tremor021) ([#2680](https://github.com/community-scripts/ProxmoxVE/pull/2680)) @@ -53,6 +54,7 @@ Do not break established syntax in this file, as it is automatically updated by - #### ✨ New Features + - Use HTML button element for copying to clipboard [@scallaway](https://github.com/scallaway) ([#2720](https://github.com/community-scripts/ProxmoxVE/pull/2720)) - Add basic pagination to Data Viewer [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2715](https://github.com/community-scripts/ProxmoxVE/pull/2715)) - #### 📝 Script Information From 51bb4566e787f91b39dec7307002fc04ccceef01 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:27:46 +0100 Subject: [PATCH 117/167] EOF not detected (#2726) * Update web-check-install.sh * Update web-check-install.sh * Update web-check-install.sh * Update web-check-install.sh * Update web-check-install.sh * Update web-check-install.sh --- install/web-check-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/web-check-install.sh b/install/web-check-install.sh index e01e1399e..0333aa89a 100644 --- a/install/web-check-install.sh +++ b/install/web-check-install.sh @@ -14,6 +14,7 @@ network_check update_os msg_info "Installing Dependencies" +export DEBIAN_FRONTEND=noninteractive $STD apt-get -y install --no-install-recommends \ curl \ sudo \ @@ -77,7 +78,7 @@ wget -q "https://github.com/CrazyWolf13/web-check/archive/refs/heads/${RELEASE}. tar xzf $temp_file mv web-check-${RELEASE} /opt/web-check cd /opt/web-check -cat < /opt/web-check/.env +cat <<'EOF' > /opt/web-check/.env CHROME_PATH=/usr/bin/chromium PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium HEADLESS=true @@ -108,7 +109,7 @@ $STD yarn build --production msg_ok "Built Web-Check" msg_info "Creating Service" -cat < /opt/run_web-check.sh +cat <<'EOF' > /opt/run_web-check.sh #!/bin/bash SCREEN_RESOLUTION="1280x1024x24" if ! systemctl is-active --quiet dbus; then @@ -122,7 +123,7 @@ cd /opt/web-check exec yarn start EOF chmod +x /opt/run_web-check.sh -cat < /etc/systemd/system/web-check.service +cat <<'EOF' > /etc/systemd/system/web-check.service [Unit] Description=Web Check Service After=network.target From ab370762a48fdf626e10db558e61cbe30aa32d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:28:11 +0100 Subject: [PATCH 118/167] Removed sed, app supports Node v22 now (#2728) --- install/bytestash-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/bytestash-install.sh b/install/bytestash-install.sh index cd7cbab84..8d4d01b81 100644 --- a/install/bytestash-install.sh +++ b/install/bytestash-install.sh @@ -38,7 +38,6 @@ RELEASE=$(curl -s https://api.github.com/repos/jordan-dalby/ByteStash/releases/l wget -q "https://github.com/jordan-dalby/ByteStash/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file tar zxf $temp_file mv ByteStash-${RELEASE} /opt/bytestash -sed -i '6s/.*/if (!globalThis.crypto) { globalThis.crypto = crypto; }/' /opt/bytestash/server/src/oidc/oidcConfig.js cd /opt/bytestash/server $STD npm install cd /opt/bytestash/client From 0c0d1de317ec3553c08b2908163eb096ceddfe55 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:28:41 +0100 Subject: [PATCH 119/167] Update CHANGELOG.md (#2729) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8eeff47b..2d6046380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,11 +28,13 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts - - Keycloak: Update installation script [@tremor021](https://github.com/tremor021) ([#2714](https://github.com/community-scripts/ProxmoxVE/pull/2714)) + - ByteStash: Removed sed, app supports Node v22 now [@tremor021](https://github.com/tremor021) ([#2728](https://github.com/community-scripts/ProxmoxVE/pull/2728)) +- Keycloak: Update installation script [@tremor021](https://github.com/tremor021) ([#2714](https://github.com/community-scripts/ProxmoxVE/pull/2714)) - ByteStash: Fix Node 22 compatibility (thanks t2lc) [@tremor021](https://github.com/tremor021) ([#2705](https://github.com/community-scripts/ProxmoxVE/pull/2705)) - #### 🐞 Bug Fixes + - EOF not detected [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2726](https://github.com/community-scripts/ProxmoxVE/pull/2726)) - Zitadel-install.sh: Remove one version file and update to our standard [@bvdberg01](https://github.com/bvdberg01) ([#2710](https://github.com/community-scripts/ProxmoxVE/pull/2710)) - Outline: Change key to hex32 [@tremor021](https://github.com/tremor021) ([#2709](https://github.com/community-scripts/ProxmoxVE/pull/2709)) - Typo in update scripts [@bvdberg01](https://github.com/bvdberg01) ([#2707](https://github.com/community-scripts/ProxmoxVE/pull/2707)) From d781c75dfe1380e04ea876a0566fd967e0a6f14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 27 Feb 2025 23:07:10 +0100 Subject: [PATCH 120/167] Update website with accurate info (#2730) --- frontend/src/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 69f8fb101..b12bbac32 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -111,7 +111,7 @@ export default function Page() { of Proxmox Virtual Environment (VE).

- With 200+ scripts to help you manage your{" "} + With 300+ scripts to help you manage your{" "} Proxmox VE environment. Whether you're a seasoned user or a newcomer, we've got you covered.

From 10f4172349c531df71dfa9c2928f5810351ba2b5 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Fri, 28 Feb 2025 13:59:54 +0100 Subject: [PATCH 121/167] Shell Format Workflow (#2400) --- .github/workflows/script_format.yml | 243 ++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 .github/workflows/script_format.yml diff --git a/.github/workflows/script_format.yml b/.github/workflows/script_format.yml new file mode 100644 index 000000000..a86a512b4 --- /dev/null +++ b/.github/workflows/script_format.yml @@ -0,0 +1,243 @@ +name: Script Format Check +permissions: + pull-requests: write +on: + pull_request_target: + branches: + - main + paths: + - 'install/*.sh' + - 'ct/*.sh' + +jobs: + run-install-script: + runs-on: pvenode + steps: + - name: Checkout PR branch (supports forks) + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + fetch-depth: 0 + + - name: Add Git safe directory + run: | + git config --global --add safe.directory /__w/ProxmoxVE/ProxmoxVE + + - name: Set up GH_TOKEN + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "GH_TOKEN=${GH_TOKEN}" >> $GITHUB_ENV + + - name: Get Changed Files + run: | + CHANGED_FILES=$(gh pr diff ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --name-only) + CHANGED_FILES=$(echo "$CHANGED_FILES" | tr '\n' ' ') + echo "Changed files: $CHANGED_FILES" + echo "SCRIPT=$CHANGED_FILES" >> $GITHUB_ENV + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check scripts + id: run-install + continue-on-error: true + run: | + for FILE in ${{ env.SCRIPT }}; do + STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') + echo "Running Test for: $STRIPPED_NAME" + FILE_STRIPPED="${FILE##*/}" + LOG_FILE="result_$FILE_STRIPPED.log" + + if [[ $FILE =~ ^ct/.*\.sh$ ]]; then + + FIRST_LINE=$(sed -n '1p' "$FILE") + [[ "$FIRST_LINE" != "#!/usr/bin/env bash" ]] && echo "Line 1 was $FIRST_LINE | Should be: #!/usr/bin/env bash" >> "$LOG_FILE" + SECOND_LINE=$(sed -n '2p' "$FILE") + [[ "$SECOND_LINE" != "source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)" ]] && + echo "Line 2 was $SECOND_LINE | Should be: source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)" >> "$LOG_FILE" + THIRD_LINE=$(sed -n '3p' "$FILE") + if ! [[ "$THIRD_LINE" =~ ^#\ Copyright\ \(c\)\ [0-9]{4}-[0-9]{4}\ community-scripts\ ORG$ || "$THIRD_LINE" =~ ^Copyright\ \(c\)\ [0-9]{4}-[0-9]{4}\ tteck$ ]]; then + echo "Line 3 was $THIRD_LINE | Should be: # Copyright (c) 2021-2025 community-scripts ORG" >> "$LOG_FILE" + fi + + EXPECTED_AUTHOR="# Author:" + EXPECTED_LICENSE="# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE" + EXPECTED_SOURCE="# Source:" + EXPECTED_EMPTY="" + + for i in {4..7}; do + LINE=$(sed -n "${i}p" "$FILE") + + case $i in + 4) + [[ $LINE == $EXPECTED_AUTHOR* ]] || printf "Line %d was: '%s' | Should start with: '%s'\n" "$i" "$LINE" "$EXPECTED_AUTHOR" >> $LOG_FILE + ;; + 5) + [[ "$LINE" == "$EXPECTED_LICENSE" ]] || printf "Line %d was: '%s' | Should be: '%s'\n" "$i" "$LINE" "$EXPECTED_LICENSE" >> $LOG_FILE + ;; + 6) + [[ $LINE == $EXPECTED_SOURCE* ]] || printf "Line %d was: '%s' | Should start with: '%s'\n" "$i" "$LINE" "$EXPECTED_SOURCE" >> $LOG_FILE + ;; + 7) + [[ -z $LINE ]] || printf "Line %d was: '%s' | Should be empty\n" "$i" "$LINE" >> $LOG_FILE + ;; + esac + done + + + EXPECTED_PREFIXES=( + "APP=" + "var_tags=" + "var_cpu=" # Must be a number + "var_ram=" # Must be a number + "var_disk=" # Must be a number + "var_os=" # Must be debian, alpine, or ubuntu + "var_version=" + "var_unprivileged=" # Must be 0 or 1 + ) + + + for i in {8..15}; do + LINE=$(sed -n "${i}p" "$FILE") + INDEX=$((i - 8)) + + case $INDEX in + 2|3|4) # var_cpu, var_ram, var_disk (must be numbers) + if [[ "$LINE" =~ ^${EXPECTED_PREFIXES[$INDEX]}([0-9]+)$ ]]; then + continue # Valid + else + echo "Line $i was '$LINE' | Should be: '${EXPECTED_PREFIXES[$INDEX]}'" >> "$LOG_FILE" + fi + ;; + 5) # var_os (must be debian, alpine, or ubuntu) + if [[ "$LINE" =~ ^var_os=(debian|alpine|ubuntu)$ ]]; then + continue # Valid + else + echo "Line $i was '$LINE' | Should be: 'var_os=[debian|alpine|ubuntu]'" >> "$LOG_FILE" + fi + ;; + 7) # var_unprivileged (must be 0 or 1) + if [[ "$LINE" =~ ^var_unprivileged=[01]$ ]]; then + continue # Valid + else + echo "Line $i was '$LINE' | Should be: 'var_unprivileged=[0|1]'" >> "$LOG_FILE" + fi + ;; + *) # Other lines (must start with expected prefix) + if [[ "$LINE" == ${EXPECTED_PREFIXES[$INDEX]}* ]]; then + continue # Valid + else + echo "Line $i was '$LINE' | Should start with '${EXPECTED_PREFIXES[$INDEX]}'" >> "$LOG_FILE" + fi + ;; + esac + done + + for i in {16..20}; do + LINE=$(sed -n "${i}p" "$FILE") + EXPECTED=( + "header_info \"$APP\"" + "variables" + "color" + "catch_errors" + "function update_script() {" + ) + [[ "$LINE" != "${EXPECTED[$((i-16))]}" ]] && echo "Line $i was $LINE | Should be: ${EXPECTED[$((i-16))]}" >> "$LOG_FILE" + done + cat "$LOG_FILE" + elif [[ $FILE =~ ^install/.*-install\.sh$ ]]; then + + FIRST_LINE=$(sed -n '1p' "$FILE") + [[ "$FIRST_LINE" != "#!/usr/bin/env bash" ]] && echo "Line 1 was $FIRST_LINE | Should be: #!/usr/bin/env bash" >> "$LOG_FILE" + + SECOND_LINE=$(sed -n '2p' "$FILE") + [[ -n "$SECOND_LINE" ]] && echo "Line 2 should be empty" >> "$LOG_FILE" + + THIRD_LINE=$(sed -n '3p' "$FILE") + if ! [[ "$THIRD_LINE" =~ ^#\ Copyright\ \(c\)\ [0-9]{4}-[0-9]{4}\ community-scripts\ ORG$ || "$THIRD_LINE" =~ ^Copyright\ \(c\)\ [0-9]{4}-[0-9]{4}\ tteck$ ]]; then + echo "Line 3 was $THIRD_LINE | Should be: # Copyright (c) 2021-2025 community-scripts ORG" >> "$LOG_FILE" + fi + + EXPECTED_AUTHOR="# Author:" + EXPECTED_LICENSE="# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE" + EXPECTED_SOURCE="# Source:" + EXPECTED_EMPTY="" + + for i in {4..7}; do + LINE=$(sed -n "${i}p" "$FILE") + + case $i in + 4) + [[ $LINE == $EXPECTED_AUTHOR* ]] || printf "Line %d was: '%s' | Should start with: '%s'\n" "$i" "$LINE" "$EXPECTED_AUTHOR" >> $LOG_FILE + ;; + 5) + [[ "$LINE" == "$EXPECTED_LICENSE" ]] || printf "Line %d was: '%s' | Should be: '%s'\n" "$i" "$LINE" "$EXPECTED_LICENSE" >> $LOG_FILE + ;; + 6) + [[ $LINE == $EXPECTED_SOURCE* ]] || printf "Line %d was: '%s' | Should start with: '%s'\n" "$i" "$LINE" "$EXPECTED_SOURCE" >> $LOG_FILE + ;; + 7) + [[ -z $LINE ]] || printf "Line %d was: '%s' | Should be empty\n" "$i" "$LINE" >> $LOG_FILE + ;; + esac + done + + [[ "$(sed -n '8p' "$FILE")" != 'source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"' ]] && echo 'Line 8 should be: source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"' >> "$LOG_FILE" + + for i in {9..14}; do + LINE=$(sed -n "${i}p" "$FILE") + EXPECTED=( + "color" + "verb_ip6" + "catch_errors" + "setting_up_container" + "network_check" + "update_os" + ) + [[ "$LINE" != "${EXPECTED[$((i-9))]}" ]] && echo "Line $i was $LINE | Should be: ${EXPECTED[$((i-9))]}" >> "$LOG_FILE" + done + + [[ -n "$(sed -n '15p' "$FILE")" ]] && echo "Line 15 should be empty" >> "$LOG_FILE" + [[ "$(sed -n '16p' "$FILE")" != 'msg_info "Installing Dependencies"' ]] && echo 'Line 16 should be: msg_info "Installing Dependencies"' >> "$LOG_FILE" + + LAST_3_LINES=$(tail -n 3 "$FILE") + [[ "$LAST_3_LINES" != *"$STD apt-get -y autoremove"* ]] && echo 'Third to last line should be: $STD apt-get -y autoremove' >> "$LOG_FILE" + [[ "$LAST_3_LINES" != *"$STD apt-get -y autoclean"* ]] && echo 'Second to last line should be: $STD apt-get -y clean' >> "$LOG_FILE" + [[ "$LAST_3_LINES" != *'msg_ok "Cleaned"'* ]] && echo 'Last line should be: msg_ok "Cleaned"' >> "$LOG_FILE" + cat "$LOG_FILE" + fi + + done + + + - name: Post error comments + run: | + ERROR="false" + for FILE in ${{ env.SCRIPT }}; do + FILE_STRIPPED="${FILE##*/}" + LOG_FILE="result_$FILE_STRIPPED.log" + echo $LOG_FILE + if [[ ! -f $LOG_FILE ]]; then + continue + fi + ERROR_MSG=$(cat $LOG_FILE) + + if [ -n "$ERROR_MSG" ]; then + echo "Posting error message for $FILE" + echo ${ERROR_MSG} + gh pr comment ${{ github.event.pull_request.number }} \ + --repo ${{ github.repository }} \ + --body ":warning: The script _**$FILE**_ has the following formatting errors:
${ERROR_MSG}
" + + + ERROR="true" + fi + done + echo "ERROR=$ERROR" >> $GITHUB_ENV + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Fail if error + if: ${{ env.ERROR == 'true' }} + run: exit 1 From 5c5c628954d2a6f1cee4a982c7a2dd152b282da6 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 14:03:38 +0100 Subject: [PATCH 122/167] Update CHANGELOG.md (#2740) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6046380..f12aa8dbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,14 @@ All LXC instances created using this repository come pre-installed with Midnight Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-02-28 + +### 🧰 Maintenance + + - #### ✨ New Features + + - [gh] Shell Format Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2400](https://github.com/community-scripts/ProxmoxVE/pull/2400)) + ## 2025-02-27 ### 🆕 New Scripts From 05769fdff1830171e60a690421826b6d1a21918c Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Fri, 28 Feb 2025 14:56:58 +0100 Subject: [PATCH 123/167] Update Script Test Workflow (#2741) * Update Workflow * Update --- .github/workflows/script-test.yml | 34 +++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/script-test.yml b/.github/workflows/script-test.yml index f73ad27b7..5c8803907 100644 --- a/.github/workflows/script-test.yml +++ b/.github/workflows/script-test.yml @@ -140,34 +140,38 @@ jobs: fi done - - name: Post error comments run: | ERROR="false" - SEARCH_LINE=".github/workflows/scripts/app-test/pr-build.func: line 255" + SEARCH_LINE=".github/workflows/scripts/app-test/pr-build.func: line 255:" + + # Get all existing comments on the PR + EXISTING_COMMENTS=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json comments --jq '.comments[].body') + for FILE in ${{ env.ALL_FILES }}; do STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') if [[ ! -f result_$STRIPPED_NAME.log ]]; then continue fi ERROR_MSG=$(cat result_$STRIPPED_NAME.log) - + if [ -n "$ERROR_MSG" ]; then CLEANED_ERROR_MSG=$(echo "$ERROR_MSG" | sed "s|$SEARCH_LINE.*||") - echo "Posting error message for $FILE" - echo ${CLEANED_ERROR_MSG} - gh pr comment ${{ github.event.pull_request.number }} \ - --repo ${{ github.repository }} \ - --body ":warning: The script _**$FILE**_ failed with the following message:
${CLEANED_ERROR_MSG}
" - ERROR="true" + COMMENT_BODY=":warning: The script _**$FILE**_ failed with the following message:
${CLEANED_ERROR_MSG}
" + + # Check if the comment already exists + if echo "$EXISTING_COMMENTS" | grep -qF "$COMMENT_BODY"; then + echo "Skipping duplicate comment for $FILE" + else + echo "Posting error message for $FILE" + gh pr comment ${{ github.event.pull_request.number }} \ + --repo ${{ github.repository }} \ + --body "$COMMENT_BODY" + ERROR="true" + fi fi done + echo "ERROR=$ERROR" >> $GITHUB_ENV - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Fail if error - if: ${{ env.ERROR == 'true' }} - run: exit 1 From e8e298581c6521f231fba32612f697665e3146ea Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:00:02 +0100 Subject: [PATCH 124/167] Update CHANGELOG.md (#2743) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f12aa8dbd..819b9463b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,11 @@ Do not break established syntax in this file, as it is automatically updated by - #### ✨ New Features - - [gh] Shell Format Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2400](https://github.com/community-scripts/ProxmoxVE/pull/2400)) + - Shell Format Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2400](https://github.com/community-scripts/ProxmoxVE/pull/2400)) + + - #### 📂 Github + + - Update Script Test Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2741](https://github.com/community-scripts/ProxmoxVE/pull/2741)) ## 2025-02-27 From b24860c97b8156eeb65b0da2a9c3b28175de4040 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:15:29 +0100 Subject: [PATCH 125/167] Update all Action to new selfhosted Runner Cluster (#2739) * Update Runner * Update Workflows --- .../runner/docker/gh-runner-self.dockerfile | 68 +++++++++++++++++++ .github/workflows/auto-update-app-headers.yml | 2 +- .github/workflows/autolabeler.yml | 2 +- .github/workflows/changelog-pr.yml | 2 +- .github/workflows/close-discussion.yml | 2 +- .../workflows/create-docker-for-runner.yml | 37 ++++++++++ .github/workflows/delete-json-branch.yml | 2 +- .github/workflows/frontend-cicd.yml | 2 +- .github/workflows/github-release.yml | 2 +- .github/workflows/update-json-date.yml | 2 +- .github/workflows/validate-filenames.yml | 2 +- 11 files changed, 114 insertions(+), 9 deletions(-) create mode 100644 .github/runner/docker/gh-runner-self.dockerfile create mode 100644 .github/workflows/create-docker-for-runner.yml diff --git a/.github/runner/docker/gh-runner-self.dockerfile b/.github/runner/docker/gh-runner-self.dockerfile new file mode 100644 index 000000000..e5ae072ab --- /dev/null +++ b/.github/runner/docker/gh-runner-self.dockerfile @@ -0,0 +1,68 @@ +FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy as build + +ARG TARGETOS +ARG TARGETARCH +ARG DOCKER_VERSION=27.5.1 +ARG BUILDX_VERSION=0.20.1 +ARG RUNNER_ARCH="x64" + +RUN apt update -y && apt install sudo curl unzip -y + +WORKDIR /actions-runner + +RUN RUNNER_VERSION=$(curl -s https://api.github.com/repos/actions/runner/releases/latest | grep "tag_name" | head -n 1 | awk '{print substr($2, 3, length($2)-4)}') \ + && curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${RUNNER_ARCH}-${RUNNER_VERSION}.tar.gz \ + && tar xzf ./runner.tar.gz \ + && rm runner.tar.gz + +RUN RUNNER_CONTAINER_HOOKS_VERSION=$(curl -s https://api.github.com/repos/actions/runner-container-hooks/releases/latest | grep "tag_name" | head -n 1 | awk '{print substr($2, 3, length($2)-4)}') \ + && curl -f -L -o runner-container-hooks.zip https://github.com/actions/runner-container-hooks/releases/download/v${RUNNER_CONTAINER_HOOKS_VERSION}/actions-runner-hooks-k8s-${RUNNER_CONTAINER_HOOKS_VERSION}.zip \ + && unzip ./runner-container-hooks.zip -d ./k8s \ + && rm runner-container-hooks.zip + +RUN export RUNNER_ARCH=${TARGETARCH} \ + && if [ "$RUNNER_ARCH" = "amd64" ]; then export DOCKER_ARCH=x86_64 ; fi \ + && if [ "$RUNNER_ARCH" = "arm64" ]; then export DOCKER_ARCH=aarch64 ; fi \ + && curl -fLo docker.tgz https://download.docker.com/${TARGETOS}/static/stable/${DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz \ + && tar zxvf docker.tgz \ + && rm -rf docker.tgz \ + && mkdir -p /usr/local/lib/docker/cli-plugins \ + && curl -fLo /usr/local/lib/docker/cli-plugins/docker-buildx \ + "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH}" \ + && chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx + +FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy + +ENV DEBIAN_FRONTEND=noninteractive +ENV RUNNER_MANUALLY_TRAP_SIG=1 +ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1 +ENV ImageOS=ubuntu22 + +RUN apt update -y \ + && apt install -y --no-install-recommends sudo lsb-release gpg-agent software-properties-common curl jq unzip \ + && rm -rf /var/lib/apt/lists/* + +RUN add-apt-repository ppa:git-core/ppa \ + && apt update -y \ + && apt install -y git \ + && rm -rf /var/lib/apt/lists/* + +RUN adduser --disabled-password --gecos "" --uid 1001 runner \ + && groupadd docker --gid 123 \ + && usermod -aG sudo runner \ + && usermod -aG docker runner \ + && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \ + && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers + +# Install own dependencies in final image +RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ + && apt-get install -y nodejs \ + && apt-get install -y gh jq git + +WORKDIR /home/runner + +COPY --chown=runner:docker --from=build /actions-runner . +COPY --from=build /usr/local/lib/docker/cli-plugins/docker-buildx /usr/local/lib/docker/cli-plugins/docker-buildx +RUN install -o root -g root -m 755 docker/* /usr/bin/ && rm -rf docker + +USER runner diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 5e447ea54..b6c4f2b77 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -10,7 +10,7 @@ on: jobs: update-app-files: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: contents: write diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 013c40be5..54647eab6 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -7,7 +7,7 @@ on: jobs: autolabeler: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: pull-requests: write env: diff --git a/.github/workflows/changelog-pr.yml b/.github/workflows/changelog-pr.yml index dc5bcd3d3..036ef7a7c 100644 --- a/.github/workflows/changelog-pr.yml +++ b/.github/workflows/changelog-pr.yml @@ -7,7 +7,7 @@ on: jobs: update-changelog-pull-request: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set env: CONFIG_PATH: .github/changelog-pr-config.json BRANCH_NAME: github-action-update-changelog diff --git a/.github/workflows/close-discussion.yml b/.github/workflows/close-discussion.yml index 4b39fbf96..dd9a80b33 100644 --- a/.github/workflows/close-discussion.yml +++ b/.github/workflows/close-discussion.yml @@ -6,7 +6,7 @@ on: jobs: close-discussion: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set steps: - name: Checkout Repository diff --git a/.github/workflows/create-docker-for-runner.yml b/.github/workflows/create-docker-for-runner.yml new file mode 100644 index 000000000..c9fef0a5c --- /dev/null +++ b/.github/workflows/create-docker-for-runner.yml @@ -0,0 +1,37 @@ +name: Build and Publish Docker Image + +on: + push: + branches: + - main + paths: + - '.github/runner/docker/**' + schedule: + - cron: '0 0 * * *' + +jobs: + build: + runs-on: ubuntu-latest #To ensure it always builds we use the github runner with all the right tooling + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docker image + run: | + repo_name=${{ github.repository }} # Get repository name + repo_name_lower=$(echo $repo_name | tr '[:upper:]' '[:lower:]') # Convert to lowercase + docker build -t ghcr.io/$repo_name_lower/gh-runner-self:latest -f .github/runner/docker/gh-runner-self.dockerfile . + + - name: Push Docker image to GHCR + run: | + repo_name=${{ github.repository }} # Get repository name + repo_name_lower=$(echo $repo_name | tr '[:upper:]' '[:lower:]') # Convert to lowercase + docker push ghcr.io/$repo_name_lower/gh-runner-self:latest diff --git a/.github/workflows/delete-json-branch.yml b/.github/workflows/delete-json-branch.yml index e4cdcf24f..b72868402 100644 --- a/.github/workflows/delete-json-branch.yml +++ b/.github/workflows/delete-json-branch.yml @@ -9,7 +9,7 @@ on: jobs: delete_branch: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set steps: - name: Checkout the code uses: actions/checkout@v3 diff --git a/.github/workflows/frontend-cicd.yml b/.github/workflows/frontend-cicd.yml index dd242f6ef..c4f1a6418 100644 --- a/.github/workflows/frontend-cicd.yml +++ b/.github/workflows/frontend-cicd.yml @@ -27,7 +27,7 @@ concurrency: jobs: build: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set defaults: run: working-directory: frontend # Set default working directory for all run steps diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index eba622ff9..ad95f730a 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -7,7 +7,7 @@ on: jobs: create-new-release: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: contents: write steps: diff --git a/.github/workflows/update-json-date.yml b/.github/workflows/update-json-date.yml index 7e9c24973..26957e50c 100644 --- a/.github/workflows/update-json-date.yml +++ b/.github/workflows/update-json-date.yml @@ -10,7 +10,7 @@ on: jobs: update-app-files: - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: contents: write diff --git a/.github/workflows/validate-filenames.yml b/.github/workflows/validate-filenames.yml index ad821e943..dac806260 100644 --- a/.github/workflows/validate-filenames.yml +++ b/.github/workflows/validate-filenames.yml @@ -10,7 +10,7 @@ on: jobs: check-files: name: Check changed files - runs-on: ubuntu-latest + runs-on: runner-cluster-htl-set permissions: pull-requests: write From d82c9a24a747bc8902c293c918c83833a58ac7d5 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:17:48 +0100 Subject: [PATCH 126/167] Update CHANGELOG.md (#2745) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 819b9463b..ddf03f0c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Do not break established syntax in this file, as it is automatically updated by - #### 📂 Github + - Update all Action to new selfhosted Runner Cluster [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2739](https://github.com/community-scripts/ProxmoxVE/pull/2739)) - Update Script Test Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2741](https://github.com/community-scripts/ProxmoxVE/pull/2741)) ## 2025-02-27 From 843c4f8c1eaf9c3397daad570b957200267cb3f9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:26:12 +0100 Subject: [PATCH 127/167] [gh]: Fix Release Creation if Changelog.md to long (#2752) --- .github/workflows/github-release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index ad95f730a..c49f17f32 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -20,6 +20,10 @@ jobs: YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) YESTERDAY_CHANGELOG_NOTES=$(awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md) - if [ -n "$YESTERDAY_CHANGELOG_NOTES" ]; then + if [ ${#YESTERDAY_CHANGELOG_NOTES} -gt 10000 ]; then + echo "Changelog is too large, saving to file..." + echo "$YESTERDAY_CHANGELOG_NOTES" > changelog_tmp.md + gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md --latest + elif [ -n "$YESTERDAY_CHANGELOG_NOTES" ]; then gh release create "$YESTERDAY" -t "$YESTERDAY" -n "$YESTERDAY_CHANGELOG_NOTES" --latest fi From 62cdb5c0c2160e6221680b18855584b6cc818dd1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:27:57 +0100 Subject: [PATCH 128/167] add manuall execution of release wf --- .github/workflows/github-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index c49f17f32..ca4d60e5a 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -4,6 +4,7 @@ on: schedule: # Runs "At 00:01 every night" (UTC) - cron: '1 0 * * *' + workflow_dispatch: jobs: create-new-release: From 8af885a0f3375a4e1a1e60a967c70c513947b462 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:29:07 +0100 Subject: [PATCH 129/167] Update github-release.yml --- .github/workflows/github-release.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index ca4d60e5a..5e74d7f60 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -4,7 +4,7 @@ on: schedule: # Runs "At 00:01 every night" (UTC) - cron: '1 0 * * *' - workflow_dispatch: + workflow_dispatch: # Allows manual execution jobs: create-new-release: @@ -14,17 +14,26 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + - name: Parse CHANGELOG.md for yesterday's entries and create a new release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - YESTERDAY_CHANGELOG_NOTES=$(awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md) - - if [ ${#YESTERDAY_CHANGELOG_NOTES} -gt 10000 ]; then - echo "Changelog is too large, saving to file..." - echo "$YESTERDAY_CHANGELOG_NOTES" > changelog_tmp.md - gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md --latest - elif [ -n "$YESTERDAY_CHANGELOG_NOTES" ]; then - gh release create "$YESTERDAY" -t "$YESTERDAY" -n "$YESTERDAY_CHANGELOG_NOTES" --latest + awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md > changelog_tmp.md + + if [ ! -s changelog_tmp.md ]; then + echo "No changes found for $YESTERDAY, skipping release." + exit 0 fi + + CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) + + if [ "$CHANGELOG_SIZE" -gt 10000 ]; then + echo "ERROR: Changelog is too large to process automatically! Manual review required." + echo "To manually trigger the release, use the 'workflow_dispatch' event." + exit 1 + fi + + # Creating the GitHub release (without --latest) + gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md From c738615bf248d847e911b5021949e07ba5cf7574 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:30:57 +0100 Subject: [PATCH 130/167] Update github-release.yml --- .github/workflows/github-release.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 5e74d7f60..8af4df591 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -2,9 +2,13 @@ name: Create new release on: schedule: - # Runs "At 00:01 every night" (UTC) - - cron: '1 0 * * *' - workflow_dispatch: # Allows manual execution + - cron: '1 0 * * *' # Runs nightly + workflow_dispatch: + inputs: + force_release: + description: "Bypass changelog size limit" + required: false + default: "false" jobs: create-new-release: @@ -18,6 +22,7 @@ jobs: - name: Parse CHANGELOG.md for yesterday's entries and create a new release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FORCE_RELEASE: ${{ github.event.inputs.force_release }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md > changelog_tmp.md @@ -28,12 +33,13 @@ jobs: fi CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) + echo "Changelog size: $CHANGELOG_SIZE bytes" - if [ "$CHANGELOG_SIZE" -gt 10000 ]; then - echo "ERROR: Changelog is too large to process automatically! Manual review required." - echo "To manually trigger the release, use the 'workflow_dispatch' event." + if [ "$CHANGELOG_SIZE" -gt 10000 ] && [ "$FORCE_RELEASE" != "true" ]; then + echo "ERROR: Changelog is too large! Manual review required." + echo "To manually trigger the release, use 'workflow_dispatch' with 'force_release: true'." exit 1 fi - # Creating the GitHub release (without --latest) + echo "Creating GitHub release for $YESTERDAY..." gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md From f1cdfecaaf5ff378d4e48842544e1e79ea22baa4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:32:33 +0100 Subject: [PATCH 131/167] Update github-release.yml --- .github/workflows/github-release.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 8af4df591..eac78db4f 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -4,11 +4,6 @@ on: schedule: - cron: '1 0 * * *' # Runs nightly workflow_dispatch: - inputs: - force_release: - description: "Bypass changelog size limit" - required: false - default: "false" jobs: create-new-release: @@ -22,7 +17,6 @@ jobs: - name: Parse CHANGELOG.md for yesterday's entries and create a new release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - FORCE_RELEASE: ${{ github.event.inputs.force_release }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md > changelog_tmp.md @@ -35,10 +29,11 @@ jobs: CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) echo "Changelog size: $CHANGELOG_SIZE bytes" - if [ "$CHANGELOG_SIZE" -gt 10000 ] && [ "$FORCE_RELEASE" != "true" ]; then - echo "ERROR: Changelog is too large! Manual review required." - echo "To manually trigger the release, use 'workflow_dispatch' with 'force_release: true'." - exit 1 + # Crop to last 10,000 bytes if too large + if [ "$CHANGELOG_SIZE" -gt 10000 ]; then + echo "WARNING: Changelog too large, cropping to last 10,000 bytes..." + tail -c 10000 changelog_tmp.md > changelog_cropped.md + mv changelog_cropped.md changelog_tmp.md fi echo "Creating GitHub release for $YESTERDAY..." From 00794c41e6cc1abd6e78c81ab4721c90ce308311 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:34:55 +0100 Subject: [PATCH 132/167] Update github-release.yml --- .github/workflows/github-release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index eac78db4f..ae6adcebe 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -19,7 +19,13 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md > changelog_tmp.md + + # Extract entries for only yesterday + awk -v date="## $YESTERDAY" ' + $0 ~ date {found=1; next} + found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {found=0} + found {print} + ' CHANGELOG.md > changelog_tmp.md if [ ! -s changelog_tmp.md ]; then echo "No changes found for $YESTERDAY, skipping release." @@ -29,7 +35,6 @@ jobs: CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) echo "Changelog size: $CHANGELOG_SIZE bytes" - # Crop to last 10,000 bytes if too large if [ "$CHANGELOG_SIZE" -gt 10000 ]; then echo "WARNING: Changelog too large, cropping to last 10,000 bytes..." tail -c 10000 changelog_tmp.md > changelog_cropped.md From 4c266aeb42649942ad63ad27fafb4b8540f62feb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 10:36:34 +0100 Subject: [PATCH 133/167] Update github-release.yml --- .github/workflows/github-release.yml | 36 ++++++++-------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index ae6adcebe..c49f17f32 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -2,8 +2,8 @@ name: Create new release on: schedule: - - cron: '1 0 * * *' # Runs nightly - workflow_dispatch: + # Runs "At 00:01 every night" (UTC) + - cron: '1 0 * * *' jobs: create-new-release: @@ -13,33 +13,17 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Parse CHANGELOG.md for yesterday's entries and create a new release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - - # Extract entries for only yesterday - awk -v date="## $YESTERDAY" ' - $0 ~ date {found=1; next} - found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {found=0} - found {print} - ' CHANGELOG.md > changelog_tmp.md - - if [ ! -s changelog_tmp.md ]; then - echo "No changes found for $YESTERDAY, skipping release." - exit 0 + YESTERDAY_CHANGELOG_NOTES=$(awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md) + + if [ ${#YESTERDAY_CHANGELOG_NOTES} -gt 10000 ]; then + echo "Changelog is too large, saving to file..." + echo "$YESTERDAY_CHANGELOG_NOTES" > changelog_tmp.md + gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md --latest + elif [ -n "$YESTERDAY_CHANGELOG_NOTES" ]; then + gh release create "$YESTERDAY" -t "$YESTERDAY" -n "$YESTERDAY_CHANGELOG_NOTES" --latest fi - - CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) - echo "Changelog size: $CHANGELOG_SIZE bytes" - - if [ "$CHANGELOG_SIZE" -gt 10000 ]; then - echo "WARNING: Changelog too large, cropping to last 10,000 bytes..." - tail -c 10000 changelog_tmp.md > changelog_cropped.md - mv changelog_cropped.md changelog_tmp.md - fi - - echo "Creating GitHub release for $YESTERDAY..." - gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md From 5f30084c6fb9464f7fb8b0297c601d374af5da5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Sat, 1 Mar 2025 12:54:55 +0100 Subject: [PATCH 134/167] Vikunja: Fixed update process (#2756) --- ct/vikunja.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/vikunja.sh b/ct/vikunja.sh index b6ac4bf01..a5075b62e 100644 --- a/ct/vikunja.sh +++ b/ct/vikunja.sh @@ -37,7 +37,8 @@ function update_script() { cd /opt rm -rf /opt/vikunja/vikunja wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" - $STD DEBIAN_FRONTEND=noninteractive dpkg -i vikunja-$RELEASE-amd64.deb + export DEBIAN_FRONTEND=noninteractive + $STD dpkg -i vikunja-$RELEASE-amd64.deb echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated ${APP}" From 410161855620257c07e0d51ca5868308ffeef9e3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:10:23 +0100 Subject: [PATCH 135/167] Update Release --- .github/workflows/github-release.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index c49f17f32..42158ad2b 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -2,8 +2,8 @@ name: Create new release on: schedule: - # Runs "At 00:01 every night" (UTC) - - cron: '1 0 * * *' + - cron: '1 0 * * *' # Runs nightly + workflow_dispatch: jobs: create-new-release: @@ -13,17 +13,24 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + - name: Parse CHANGELOG.md for yesterday's entries and create a new release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - YESTERDAY_CHANGELOG_NOTES=$(awk '/^## '"$YESTERDAY"'/ {f=1; next} f && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {f=0} f && !/^## / {print}' CHANGELOG.md) - - if [ ${#YESTERDAY_CHANGELOG_NOTES} -gt 10000 ]; then - echo "Changelog is too large, saving to file..." - echo "$YESTERDAY_CHANGELOG_NOTES" > changelog_tmp.md - gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md --latest - elif [ -n "$YESTERDAY_CHANGELOG_NOTES" ]; then - gh release create "$YESTERDAY" -t "$YESTERDAY" -n "$YESTERDAY_CHANGELOG_NOTES" --latest + + # Extract exactly the section for YESTERDAY + awk -v date="## $YESTERDAY" ' + $0 ~ date {found=1; print; next} + found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} + found {print} + ' CHANGELOG.md > changelog_tmp.md + + if [ ! -s changelog_tmp.md ]; then + echo "No changes found for $YESTERDAY, skipping release." + exit 0 fi + + echo "Creating GitHub release for $YESTERDAY..." + gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md \ No newline at end of file From f25f13e78932b6dd49050fae860af5c4fc8bec04 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:14:42 +0100 Subject: [PATCH 136/167] fix Release --- .github/workflows/github-release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 42158ad2b..c9607651b 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -20,7 +20,7 @@ jobs: run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - # Extract exactly the section for YESTERDAY + # Extract only the section for yesterday awk -v date="## $YESTERDAY" ' $0 ~ date {found=1; print; next} found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} @@ -32,5 +32,16 @@ jobs: exit 0 fi + CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) + echo "Changelog size: $CHANGELOG_SIZE bytes" + + # Crop to first 20,000 characters if too large + MAX_SIZE=20000 + if [ "$CHANGELOG_SIZE" -gt "$MAX_SIZE" ]; then + echo "WARNING: Changelog too large, cropping to first $MAX_SIZE characters..." + head -c "$MAX_SIZE" changelog_tmp.md > changelog_cropped.md + mv changelog_cropped.md changelog_tmp.md + fi + echo "Creating GitHub release for $YESTERDAY..." gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md \ No newline at end of file From 6d0fe3e2eeb161db1cab51a45e3f28541747b3ce Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:16:58 +0100 Subject: [PATCH 137/167] fix date --- .github/workflows/github-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index c9607651b..83468e0d4 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -20,7 +20,7 @@ jobs: run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - # Extract only the section for yesterday + # Extract the changelog section for yesterday, stopping at the next date awk -v date="## $YESTERDAY" ' $0 ~ date {found=1; print; next} found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} From e29652c8dd1610bf465a7be29cb0022fe5e7a19b Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:18:49 +0100 Subject: [PATCH 138/167] add: double restart to fix homarr migration (#2757) --- ct/homarr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/homarr.sh b/ct/homarr.sh index 6f88bd938..845db5b44 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -148,6 +148,7 @@ EOF msg_info "Starting Services" systemctl start homarr + systemctl restart homarr msg_ok "Started Services" msg_ok "Updated Successfully" else From 623e1896aad757a9d49611b024ededc55be90e5f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:19:03 +0100 Subject: [PATCH 139/167] Remove Note on Changelog (#2758) --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddf03f0c1..d4145cf3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. -> [!IMPORTANT] -Do not break established syntax in this file, as it is automatically updated by a Github Workflow - ## 2025-02-28 From 48b14f73470665809ec7af8fe71360879e02e009 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:20:05 +0100 Subject: [PATCH 140/167] fix release --- .github/workflows/github-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 83468e0d4..701be2a60 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -20,13 +20,16 @@ jobs: run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - # Extract the changelog section for yesterday, stopping at the next date + # Extract exactly the section for YESTERDAY, stopping at the next date awk -v date="## $YESTERDAY" ' $0 ~ date {found=1; print; next} found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} found {print} ' CHANGELOG.md > changelog_tmp.md + # Verify that we extracted only one day's data + head -n 10 changelog_tmp.md # Debugging: Print first 10 lines + if [ ! -s changelog_tmp.md ]; then echo "No changes found for $YESTERDAY, skipping release." exit 0 From 4583158cf5c3d206cb383df02bce9b6c275082a2 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:21:02 +0100 Subject: [PATCH 141/167] Update CHANGELOG.md (#2753) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4145cf3a..82d1ce024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,21 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2025-03-01 + +### 🚀 Updated Scripts + + - #### 🐞 Bug Fixes + + - homarr: double restart to fix homarr migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2757](https://github.com/community-scripts/ProxmoxVE/pull/2757)) + +### 🧰 Maintenance + + - #### 🐞 Bug Fixes + + - Remove Note on Changelog [@MickLesk](https://github.com/MickLesk) ([#2758](https://github.com/community-scripts/ProxmoxVE/pull/2758)) + - Fix Release Creation if Changelog.md to long [@MickLesk](https://github.com/MickLesk) ([#2752](https://github.com/community-scripts/ProxmoxVE/pull/2752)) + ## 2025-02-28 ### 🧰 Maintenance From 6aa20572021b4b39ec1b12b5aafa88f5c93ef07c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:23:44 +0100 Subject: [PATCH 142/167] fix --- .github/workflows/github-release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 701be2a60..5acf2ff82 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -20,15 +20,16 @@ jobs: run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - # Extract exactly the section for YESTERDAY, stopping at the next date + # Extract the changelog section for YESTERDAY, stopping at the next date awk -v date="## $YESTERDAY" ' $0 ~ date {found=1; print; next} found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} found {print} - ' CHANGELOG.md > changelog_tmp.md + ' CHANGELOG.md | sed '/^## [0-9]/d' > changelog_tmp.md - # Verify that we extracted only one day's data - head -n 10 changelog_tmp.md # Debugging: Print first 10 lines + echo "=== Extracted Changelog ===" + cat changelog_tmp.md + echo "===========================" if [ ! -s changelog_tmp.md ]; then echo "No changes found for $YESTERDAY, skipping release." From 01e8f413ea9c7843bfc12a10e1ad27f29e32f667 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:28:57 +0100 Subject: [PATCH 143/167] fix Release wf --- .github/workflows/github-release.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 5acf2ff82..55d2ea7e7 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -20,12 +20,16 @@ jobs: run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) - # Extract the changelog section for YESTERDAY, stopping at the next date + # Crop the changelog first (keep first 20,000 characters) + MAX_SIZE=20000 + head -c "$MAX_SIZE" CHANGELOG.md > changelog_cropped.md + + # Extract exactly the section for YESTERDAY, stopping at the next date awk -v date="## $YESTERDAY" ' - $0 ~ date {found=1; print; next} - found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} - found {print} - ' CHANGELOG.md | sed '/^## [0-9]/d' > changelog_tmp.md + $0 ~ date {found=1} + found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ && $0 != date {exit} + found + ' changelog_cropped.md > changelog_tmp.md echo "=== Extracted Changelog ===" cat changelog_tmp.md @@ -36,16 +40,5 @@ jobs: exit 0 fi - CHANGELOG_SIZE=$(wc -c < changelog_tmp.md) - echo "Changelog size: $CHANGELOG_SIZE bytes" - - # Crop to first 20,000 characters if too large - MAX_SIZE=20000 - if [ "$CHANGELOG_SIZE" -gt "$MAX_SIZE" ]; then - echo "WARNING: Changelog too large, cropping to first $MAX_SIZE characters..." - head -c "$MAX_SIZE" changelog_tmp.md > changelog_cropped.md - mv changelog_cropped.md changelog_tmp.md - fi - echo "Creating GitHub release for $YESTERDAY..." gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md \ No newline at end of file From 9ef77cfd3f614d7a52d1c722cbdf8486c88d87f6 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Sat, 1 Mar 2025 13:53:49 +0100 Subject: [PATCH 144/167] Update firefly-install.sh (#2759) --- install/firefly-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/firefly-install.sh b/install/firefly-install.sh index 17b5623de..853c31680 100644 --- a/install/firefly-install.sh +++ b/install/firefly-install.sh @@ -84,6 +84,7 @@ cat </etc/apache2/sites-available/firefly.conf EOF +chown www-data:www-data /opt/firefly/storage/oauth-*.key $STD a2enmod php8.4 $STD a2enmod rewrite $STD a2ensite firefly.conf From 134741f681d7bf02b68cf4aef8f7fd3750b73c25 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 15:20:10 +0100 Subject: [PATCH 145/167] Update CHANGELOG.md (#2761) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d1ce024..d8ed476fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All LXC instances created using this repository come pre-installed with Midnight - #### 🐞 Bug Fixes + - Firefly III: FIx Ownership for OAuth Key [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2759](https://github.com/community-scripts/ProxmoxVE/pull/2759)) - homarr: double restart to fix homarr migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2757](https://github.com/community-scripts/ProxmoxVE/pull/2757)) ### 🧰 Maintenance From 53b30e5f151e249582fc30734c9487bd6537970c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 20:20:41 +0100 Subject: [PATCH 146/167] Update github-release.yml --- .github/workflows/github-release.yml | 39 ++++++++++++++++++---------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 55d2ea7e7..605cefe62 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -1,33 +1,45 @@ -name: Create new release +name: Create Daily Release on: schedule: - - cron: '1 0 * * *' # Runs nightly + - cron: '1 0 * * *' # Runs daily at 00:01 UTC workflow_dispatch: jobs: - create-new-release: + create-daily-release: runs-on: runner-cluster-htl-set permissions: contents: write steps: - - name: Checkout code + - name: Checkout repository uses: actions/checkout@v4 - - name: Parse CHANGELOG.md for yesterday's entries and create a new release + - name: Extract first 5000 characters from CHANGELOG.md + run: head -c 5000 CHANGELOG.md > changelog_cropped.md + + - name: Debugging - Show extracted changelog + run: | + echo "=== CHANGELOG EXCERPT ===" + cat changelog_cropped.md + echo "=========================" + + - name: Parse CHANGELOG.md and create release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | YESTERDAY=$(date -u --date="yesterday" +%Y-%m-%d) + echo "Checking for changes on: $YESTERDAY" - # Crop the changelog first (keep first 20,000 characters) - MAX_SIZE=20000 - head -c "$MAX_SIZE" CHANGELOG.md > changelog_cropped.md + # Ensure yesterday's date exists in the changelog + if ! grep -q "## $YESTERDAY" changelog_cropped.md; then + echo "No entry found for $YESTERDAY, skipping release." + exit 0 + fi - # Extract exactly the section for YESTERDAY, stopping at the next date + # Extract section for yesterday's date awk -v date="## $YESTERDAY" ' - $0 ~ date {found=1} - found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ && $0 != date {exit} + $0 ~ date {found=1; next} + found && /^## [0-9]{4}-[0-9]{2}-[0-9]{2}/ {exit} found ' changelog_cropped.md > changelog_tmp.md @@ -35,10 +47,11 @@ jobs: cat changelog_tmp.md echo "===========================" + # Skip if no content was found if [ ! -s changelog_tmp.md ]; then echo "No changes found for $YESTERDAY, skipping release." exit 0 fi - echo "Creating GitHub release for $YESTERDAY..." - gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md \ No newline at end of file + # Create GitHub release + gh release create "$YESTERDAY" -t "$YESTERDAY" -F changelog_tmp.md From 6a940716f037cd6602006635c12e36ed92b23fa6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 20:39:06 +0100 Subject: [PATCH 147/167] Breaking: Remove Update Function for Actual Budget until it fixed (#2768) --- ct/actualbudget.sh | 85 ++-------------------------------------------- 1 file changed, 2 insertions(+), 83 deletions(-) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 85ca87333..910c2ce5a 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -28,89 +28,8 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit 1 fi - - RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | \ - grep "tag_name" | awk -F '"' '{print substr($4, 2)}') - - if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then - msg_info "Stopping ${APP}" - systemctl stop actualbudget - msg_ok "${APP} Stopped" - - msg_info "Updating ${APP} to ${RELEASE}" - cd /tmp - wget -q "https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz" - - mv /opt/actualbudget /opt/actualbudget_bak - $STD tar -xzf "v${RELEASE}.tar.gz" - mv *ctual-server-* /opt/actualbudget - - mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config} - for dir in server-files .migrate user-files migrations; do - if [[ -d /opt/actualbudget_bak/$dir ]]; then - mv /opt/actualbudget_bak/$dir/* /opt/actualbudget-data/$dir/ || true - fi - done - if [[ -f /opt/actualbudget-data/migrate/.migrations ]]; then - sed -i 's/null/1732656575219/g' /opt/actualbudget-data/migrate/.migrations - sed -i 's/null/1732656575220/g' /opt/actualbudget-data/migrate/.migrations - fi - if [[ -f /opt/actualbudget/server-files/account.sqlite ]] && [[ ! -f /opt/actualbudget-data/server-files/account.sqlite ]]; then - mv /opt/actualbudget/server-files/account.sqlite /opt/actualbudget-data/server-files/account.sqlite - fi - - if [[ -f /opt/actualbudget_bak/.env ]]; then - mv /opt/actualbudget_bak/.env /opt/actualbudget-data/.env - else - cat < /opt/actualbudget-data/.env -ACTUAL_UPLOAD_DIR=/opt/actualbudget-data/upload -ACTUAL_DATA_DIR=/opt/actualbudget-data -ACTUAL_SERVER_FILES_DIR=/opt/actualbudget-data/server-files -ACTUAL_USER_FILES=/opt/actualbudget-data/user-files -PORT=5006 -ACTUAL_TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.1/32,::1/128,fc00::/7" -ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key -ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt -EOF - fi - cd /opt/actualbudget - $STD yarn install - echo "${RELEASE}" > /opt/actualbudget_version.txt - msg_ok "Updated ${APP}" - - msg_info "Starting ${APP}" - cat < /etc/systemd/system/actualbudget.service -[Unit] -Description=Actual Budget Service -After=network.target - -[Service] -Type=simple -User=root -Group=root -WorkingDirectory=/opt/actualbudget -EnvironmentFile=/opt/actualbudget-data/.env -ExecStart=/usr/bin/yarn start -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target -EOF - - systemctl daemon-reload - systemctl start actualbudget - msg_ok "Started ${APP}" - - msg_info "Cleaning Up" - rm -rf /opt/actualbudget_bak - rm -rf "/tmp/v${RELEASE}.tar.gz" - msg_ok "Cleaned" - msg_ok "Updated Successfully" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - fi - exit 0 + msg_error "Due to major changes in the Actual Budget repository, we are currently unable to provide updates. Please check back later." + exit } start From 307b49fee6f5878105355c68ece04639da12f483 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 1 Mar 2025 20:54:30 +0100 Subject: [PATCH 148/167] ActualBudget: New Installation Script with new Repo (#2770) --- install/actualbudget-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/actualbudget-install.sh b/install/actualbudget-install.sh index 732b00db0..2c56f2351 100644 --- a/install/actualbudget-install.sh +++ b/install/actualbudget-install.sh @@ -38,9 +38,9 @@ msg_ok "Installed Node.js" msg_info "Installing Actual Budget" cd /opt RELEASE=$(curl -s https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -wget -q https://github.com/actualbudget/actual-server/archive/refs/tags/v${RELEASE}.tar.gz +wget -q https://github.com/actualbudget/actual/archive/refs/tags/v${RELEASE}.tar.gz tar -xzf v${RELEASE}.tar.gz -mv *ctual-server-* /opt/actualbudget +mv actual-${RELEASE} /opt/actualbudget mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migrations,config} chown -R root:root /opt/actualbudget-data @@ -57,7 +57,7 @@ ACTUAL_HTTPS_KEY=/opt/actualbudget/selfhost.key ACTUAL_HTTPS_CERT=/opt/actualbudget/selfhost.crt EOF cd /opt/actualbudget -$STD yarn install +$STD yarn workspaces focus @actual-app/sync-server --production $STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout selfhost.key -out selfhost.crt < Date: Sat, 1 Mar 2025 20:59:32 +0100 Subject: [PATCH 149/167] Update CHANGELOG.md (#2769) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8ed476fe..4fad90ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,14 @@ All LXC instances created using this repository come pre-installed with Midnight - Firefly III: FIx Ownership for OAuth Key [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#2759](https://github.com/community-scripts/ProxmoxVE/pull/2759)) - homarr: double restart to fix homarr migration [@CrazyWolf13](https://github.com/CrazyWolf13) ([#2757](https://github.com/community-scripts/ProxmoxVE/pull/2757)) + - #### ✨ New Features + + - ActualBudget: New Installation Script with new Repo [@MickLesk](https://github.com/MickLesk) ([#2770](https://github.com/community-scripts/ProxmoxVE/pull/2770)) + + - #### 💥 Breaking Changes + + - Breaking: Remove Update Function for Actual Budget until it fixed [@MickLesk](https://github.com/MickLesk) ([#2768](https://github.com/community-scripts/ProxmoxVE/pull/2768)) + ### 🧰 Maintenance - #### 🐞 Bug Fixes From ba990514c45b7c35d0182016e7a4a06417fc1c9b Mon Sep 17 00:00:00 2001 From: flatlinebb <4769578+flatlinebb@users.noreply.github.com> Date: Sun, 2 Mar 2025 02:33:57 -0800 Subject: [PATCH 150/167] Fix gpg Repo for nzbget (#2774) * Update nzbget-install.sh Added [arch=all] to the nzbget repo line to fix apt update errors. * Update install/nzbget-install.sh Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> --------- Co-authored-by: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> --- install/nzbget-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/nzbget-install.sh b/install/nzbget-install.sh index ee63eab04..c6a7098ad 100644 --- a/install/nzbget-install.sh +++ b/install/nzbget-install.sh @@ -31,7 +31,7 @@ msg_ok "Installed Dependencies" msg_info "Installing NZBGet" mkdir -p /etc/apt/keyrings curl -fsSL https://nzbgetcom.github.io/nzbgetcom.asc | gpg --dearmor -o /etc/apt/keyrings/nzbgetcom.gpg -echo "deb [signed-by=/etc/apt/keyrings/nzbgetcom.gpg] https://nzbgetcom.github.io/deb stable main" >/etc/apt/sources.list.d/nzbgetcom.list +echo "deb [arch=all signed-by=/etc/apt/keyrings/nzbgetcom.gpg] https://nzbgetcom.github.io/deb stable main" >/etc/apt/sources.list.d/nzbgetcom.list $STD apt-get update $STD apt-get install -y nzbget msg_ok "Installed NZBGet" From 71d8da316a020e1ccf0b2b6c30d3faf646eb8b93 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Sun, 2 Mar 2025 12:26:52 +0100 Subject: [PATCH 151/167] Update CHANGELOG.md (#2776) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fad90ede..e84dc40b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2025-03-02 + +### 🚀 Updated Scripts + + - #### 🐞 Bug Fixes + + - Fix gpg Repo for nzbget [@flatlinebb](https://github.com/flatlinebb) ([#2774](https://github.com/community-scripts/ProxmoxVE/pull/2774)) + ## 2025-03-01 ### 🚀 Updated Scripts From 6e3367c4e736fd9994dbcec13b03a9dadbc3426e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 08:19:07 +0100 Subject: [PATCH 152/167] Linkwarden: Fix & Update Monolith-Installation (#2787) * Linkwarden: Fix & Update Monolith-Installation * Update linkwarden.sh * remove monolith note --- ct/linkwarden.sh | 9 +++++++++ install/linkwarden-install.sh | 11 ++++++++--- json/linkwarden.json | 9 ++------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index a224cd633..0f05a88f7 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -32,6 +32,15 @@ function update_script() { systemctl stop linkwarden msg_ok "Stopped ${APP}" + msg_info "Updating Rust" + $STD apt-get install -y build-essential + $STD curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env + echo 'export PATH=/usr/local/cargo/bin:$PATH' >> /etc/profile + source /etc/profile + $STD cargo install monolith + msg_ok "Updated Rust" + msg_info "Updating ${APP} to ${RELEASE}" cd /opt mv /opt/linkwarden/.env /opt/.env diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 10438de67..0bf2b64e3 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -20,7 +20,9 @@ $STD apt-get install -y \ sudo \ mc \ make \ + git \ postgresql \ + build-essential \ cargo \ gnupg msg_ok "Installed Dependencies" @@ -37,10 +39,13 @@ $STD apt-get install -y nodejs $STD npm install -g yarn msg_ok "Installed Node.js/Yarn" -msg_info "Installing Monolith" +msg_info "Installing Rust" +$STD curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +source $HOME/.cargo/env +echo 'export PATH=/usr/local/cargo/bin:$PATH' >> /etc/profile +source /etc/profile $STD cargo install monolith -export PATH=~/.cargo/bin:$PATH -msg_ok "Installed Monolith" +msg_ok "Installed Rust" msg_info "Setting up PostgreSQL DB" DB_NAME=linkwardendb diff --git a/json/linkwarden.json b/json/linkwarden.json index 974afebfe..74ad1ed6e 100644 --- a/json/linkwarden.json +++ b/json/linkwarden.json @@ -30,10 +30,5 @@ "username": null, "password": null }, - "notes": [ - { - "text": "Linkwarden > 2.8.2 needs Monolith, More info: `https://github.com/community-scripts/ProxmoxVE/discussions/305`", - "type": "info" - } - ] -} \ No newline at end of file + "notes": [] +} From 705ad208d7d4fee79f01375870b1f757686476a6 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 08:23:10 +0100 Subject: [PATCH 153/167] Update CHANGELOG.md (#2788) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e84dc40b7..5827df185 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2025-03-03 + +### 🚀 Updated Scripts + + - #### 🐞 Bug Fixes + + - Linkwarden: Fix & Update Monolith-Installation [@MickLesk](https://github.com/MickLesk) ([#2787](https://github.com/community-scripts/ProxmoxVE/pull/2787)) + ## 2025-03-02 ### 🚀 Updated Scripts From 9570c9199a3e7b84606d7600a918c39678b77731 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:50:21 +0100 Subject: [PATCH 154/167] Feature: Website - show default OS (#2790) * Feature: Website - show default OS * add os fallback * Update ScriptItem.tsx * Update Buttons.tsx * Update Buttons.tsx * fix duplicate type check * fix import deps * add refreshccw --- .../app/scripts/_components/ScriptItem.tsx | 7 +++ .../_components/ScriptItems/Buttons.tsx | 43 ++++++++++++++----- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/frontend/src/app/scripts/_components/ScriptItem.tsx b/frontend/src/app/scripts/_components/ScriptItem.tsx index fb9e64e0b..973514a09 100644 --- a/frontend/src/app/scripts/_components/ScriptItem.tsx +++ b/frontend/src/app/scripts/_components/ScriptItem.tsx @@ -28,6 +28,10 @@ function ScriptItem({ setSelectedScript(null); }; + const defaultInstallMethod = item.install_methods?.[0]; + const os = defaultInstallMethod?.resources?.os || "Proxmox Node"; + const version = defaultInstallMethod?.resources?.version || ""; + return (
@@ -60,6 +64,9 @@ function ScriptItem({

Date added: {extractDate(item.date_created)}

+

+ Default OS: {os} {version} +

diff --git a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx index cb46e437b..8900a562d 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx @@ -1,14 +1,22 @@ import { Button } from "@/components/ui/button"; import { basePath } from "@/config/siteConfig"; import { Script } from "@/lib/types"; -import { BookOpenText, Code, Globe } from "lucide-react"; +import { BookOpenText, Code, Globe, RefreshCcw } from "lucide-react"; import Link from "next/link"; -const generateSourceUrl = (slug: string, type: string) => { +const generateInstallSourceUrl = (slug: string) => { const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; - return type === "ct" - ? `${baseUrl}/install/${slug}-install.sh` - : `${baseUrl}/${type}/${slug}.sh`; + return `${baseUrl}/install/${slug}-install.sh`; +}; + +const generateSourceUrl = (slug: string) => { + const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + return `${baseUrl}/misc/${slug}.sh`; +}; + +const generateUpdateUrl = (slug: string) => { + const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + return `${baseUrl}/update/${slug}-update.sh`; }; interface ButtonLinkProps { @@ -29,20 +37,35 @@ const ButtonLink = ({ href, icon, text }: ButtonLinkProps) => ( ); export default function Buttons({ item }: { item: Script }) { + const isCtOrDefault = ["ct"].includes(item.type); + const installSourceUrl = isCtOrDefault ? generateInstallSourceUrl(item.slug) : null; + const updateSourceUrl = isCtOrDefault ? generateUpdateUrl(item.slug) : null; + const sourceUrl = !isCtOrDefault ? generateSourceUrl(item.slug) : null; + const buttons = [ item.website && { href: item.website, - icon: , + icon: , text: "Website", }, item.documentation && { href: item.documentation, - icon: , + icon: , text: "Documentation", }, - { - href: generateSourceUrl(item.slug, item.type), - icon: , + installSourceUrl && { + href: installSourceUrl, + icon: , + text: "Install-Source", + }, + updateSourceUrl && { + href: updateSourceUrl, + icon: , + text: "Update-Source", + }, + sourceUrl && { + href: sourceUrl, + icon: , text: "Source Code", }, ].filter(Boolean) as ButtonLinkProps[]; From d000c35ff59852e03f5c62f46c15f344676bf43c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:54:01 +0100 Subject: [PATCH 155/167] Update Buttons.tsx --- frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx index 8900a562d..439e56423 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx @@ -16,7 +16,7 @@ const generateSourceUrl = (slug: string) => { const generateUpdateUrl = (slug: string) => { const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; - return `${baseUrl}/update/${slug}-update.sh`; + return `${baseUrl}/ct/${slug}.sh`; }; interface ButtonLinkProps { From 4baae014ab751f57008e57f338819169a4df9b6c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:55:30 +0100 Subject: [PATCH 156/167] Update Buttons.tsx --- frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx index 439e56423..803186847 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx @@ -9,8 +9,9 @@ const generateInstallSourceUrl = (slug: string) => { return `${baseUrl}/install/${slug}-install.sh`; }; -const generateSourceUrl = (slug: string) => { +const generateSourceUrl = (slug: string, type: string) => { const baseUrl = `https://raw.githubusercontent.com/community-scripts/${basePath}/main`; + return type === "vm" ? `${baseUrl}/vm/${slug}.sh` : `${baseUrl}/misc/${slug}.sh`; return `${baseUrl}/misc/${slug}.sh`; }; From 6ab8815b3b0229e236acc6621d703577796cbb7d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 09:58:06 +0100 Subject: [PATCH 157/167] Feature: MinIO use now static port 9001 (#2786) * Feature: MinIO use now static port 9001 * Update minio.json --- install/minio-install.sh | 4 ++-- json/minio.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/minio-install.sh b/install/minio-install.sh index 6dd7b947c..f06b1b3b8 100644 --- a/install/minio-install.sh +++ b/install/minio-install.sh @@ -57,7 +57,7 @@ After=network-online.target User=minio-user Group=minio-user EnvironmentFile=-/etc/default/minio -ExecStart=/usr/local/bin/minio server /data +ExecStart=/usr/local/bin/minio server --console-address ":9001" /data Restart=always RestartSec=5 LimitNOFILE=65536 @@ -74,4 +74,4 @@ customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" diff --git a/json/minio.json b/json/minio.json index 5d307bb32..dc8075a9c 100644 --- a/json/minio.json +++ b/json/minio.json @@ -8,7 +8,7 @@ "type": "ct", "updateable": true, "privileged": false, - "interface_port": 9000, + "interface_port": 9001, "documentation": "https://min.io/docs/minio/linux/index.html", "website": "https://min.io/", "logo": "https://raw.githubusercontent.com/minio/minio/refs/heads/master/.github/logo.svg", From 9302e2e27d376f40bf30cf8c391751ccde4a400b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:43:09 +0100 Subject: [PATCH 158/167] Update Buttons.tsx --- frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx index 803186847..e3c1a0c2c 100644 --- a/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx +++ b/frontend/src/app/scripts/_components/ScriptItems/Buttons.tsx @@ -41,7 +41,7 @@ export default function Buttons({ item }: { item: Script }) { const isCtOrDefault = ["ct"].includes(item.type); const installSourceUrl = isCtOrDefault ? generateInstallSourceUrl(item.slug) : null; const updateSourceUrl = isCtOrDefault ? generateUpdateUrl(item.slug) : null; - const sourceUrl = !isCtOrDefault ? generateSourceUrl(item.slug) : null; + const sourceUrl = !isCtOrDefault ? generateSourceUrl(item.slug, item.type) : null; const buttons = [ item.website && { From 9bf30de4cb75d3c539ed66dfa8658706f9990dde Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:55:12 +0100 Subject: [PATCH 159/167] Feature Template Path for Mountings (#2785) --- ct/create_lxc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 86065ca8f..c715358cb 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -221,7 +221,8 @@ mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($TEMPLA exit 207 } TEMPLATE="${TEMPLATES[-1]}" -TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" +TEMPLATE_PATH="$(pvesm path $TEMPLATE_STORAGE:vztmpl/$TEMPLATE)" +# Without NAS/Mount: TEMPLATE_PATH="/var/lib/vz/template/cache/$TEMPLATE" # Check if template exists, if corrupt remove and redownload if ! pveam list "$TEMPLATE_STORAGE" | grep -q "$TEMPLATE" || ! zstdcat "$TEMPLATE_PATH" | tar -tf - >/dev/null 2>&1; then msg_warn "Template $TEMPLATE not found in storage or seems to be corrupted. Redownloading." From bedb908682d7616610561abf49d9f98d1c91ddc2 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:25:03 +0100 Subject: [PATCH 160/167] Update CHANGELOG.md (#2791) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5827df185..bdea35d39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,17 @@ All LXC instances created using this repository come pre-installed with Midnight - Linkwarden: Fix & Update Monolith-Installation [@MickLesk](https://github.com/MickLesk) ([#2787](https://github.com/community-scripts/ProxmoxVE/pull/2787)) + - #### ✨ New Features + + - Feature Template Path for Mountings [@MickLesk](https://github.com/MickLesk) ([#2785](https://github.com/community-scripts/ProxmoxVE/pull/2785)) + - Feature: MinIO use now static port 9001 [@MickLesk](https://github.com/MickLesk) ([#2786](https://github.com/community-scripts/ProxmoxVE/pull/2786)) + +### 🌐 Website + + - #### ✨ New Features + + - Feature: Website - show default OS [@MickLesk](https://github.com/MickLesk) ([#2790](https://github.com/community-scripts/ProxmoxVE/pull/2790)) + ## 2025-03-02 ### 🚀 Updated Scripts From af302d62f380441fc3bff8580b98aaa7cb6df6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:44:16 +0100 Subject: [PATCH 161/167] Add Habitica script (#2779) --- ct/habitica.sh | 74 ++++++++++++++++++++++++ install/habitica-install.sh | 110 ++++++++++++++++++++++++++++++++++++ json/habitica.json | 43 ++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 ct/habitica.sh create mode 100644 install/habitica-install.sh create mode 100644 json/habitica.json diff --git a/ct/habitica.sh b/ct/habitica.sh new file mode 100644 index 000000000..a85a973ef --- /dev/null +++ b/ct/habitica.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/HabitRPG/habitica + +APP="Habitica" +var_tags="gaming" +var_cpu="2" +var_ram="4096" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d "/opt/habitica" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/HabitRPG/habitica/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop habitica-mongodb + systemctl stop habitica + systemctl stop habitica-client + msg_ok "Stopped $APP" + + msg_info "Updating $APP to ${RELEASE}" + temp_file=$(mktemp) + wget -q "https://github.com/HabitRPG/habitica/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + tar zxf $temp_file + cp -rf habitica-${RELEASE}/* /opt/habitica + cd /opt/habitica + $STD npm i + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Starting $APP" + systemctl start habitica-mongodb + systemctl start habitica + systemctl start habitica-client + msg_ok "Started $APP" + + msg_info "Cleaning Up" + rm -f $temp_file + rm -rf ~/habitica-${RELEASE} + msg_ok "Cleanup Completed" + + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + 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 "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" diff --git a/install/habitica-install.sh b/install/habitica-install.sh new file mode 100644 index 000000000..9aaf92939 --- /dev/null +++ b/install/habitica-install.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/HabitRPG/habitica + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + libkrb5-dev \ + gnupg \ + build-essential \ + git +wget -q http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb +$STD dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Setup Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Setup Node.js" + +msg_info "Setup ${APPLICATION}" +temp_file=$(mktemp) +RELEASE=$(curl -s https://api.github.com/repos/HabitRPG/habitica/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/HabitRPG/habitica/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +tar zxf $temp_file +mv habitica-${RELEASE}/ /opt/habitica +cd /opt/habitica +$STD npm i +cp config.json.example config.json +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Setup ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/habitica-mongodb.service +[Unit] +Description=Habitica MongoDB Service +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/habitica +ExecStart=/usr/bin/npm run mongo:dev +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/habitica.service +[Unit] +Description=Habitica Service +After=habitica-mongodb.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/habitica +ExecStart=/usr/bin/npm start +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/habitica-client.service +[Unit] +Description=Habitica Client Service +After=habitica.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/habitica +ExecStart=/usr/bin/npm run client:dev +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now habitica-mongodb +systemctl enable -q --now habitica +systemctl enable -q --now habitica-client +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f $temp_file +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/habitica.json b/json/habitica.json new file mode 100644 index 000000000..9997bb3e1 --- /dev/null +++ b/json/habitica.json @@ -0,0 +1,43 @@ +{ + "name": "Habitica", + "slug": "habitica", + "categories": [ + 24 + ], + "date_created": "2025-03-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://github.com/HabitRPG/habitica/wiki", + "website": "https://habitica.com/", + "logo": "https://github.com/HabitRPG/habitica/raw/refs/heads/develop/website/client/src/assets/svg/logo.svg", + "description": "Habitica is an open-source habit-building program that treats your life like a role-playing game. Level up as you succeed, lose HP as you fail, and earn Gold to buy weapons and armor!", + "install_methods": [ + { + "type": "default", + "script": "ct/habitica.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "It takes a minute or two after installation for web UI to start, please be patient.", + "type": "info" + }, + { + "text": "Config file is at `/opt/habitica/config.json`", + "type": "info" + } + ] +} \ No newline at end of file From 402420e159c62977d639bae5ac76d0cfae50f035 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:45:27 +0100 Subject: [PATCH 162/167] Update date in json (#2792) Co-authored-by: GitHub Actions --- json/habitica.json | 82 +++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/json/habitica.json b/json/habitica.json index 9997bb3e1..0b8b0521c 100644 --- a/json/habitica.json +++ b/json/habitica.json @@ -1,43 +1,43 @@ { - "name": "Habitica", - "slug": "habitica", - "categories": [ - 24 - ], - "date_created": "2025-03-02", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8080, - "documentation": "https://github.com/HabitRPG/habitica/wiki", - "website": "https://habitica.com/", - "logo": "https://github.com/HabitRPG/habitica/raw/refs/heads/develop/website/client/src/assets/svg/logo.svg", - "description": "Habitica is an open-source habit-building program that treats your life like a role-playing game. Level up as you succeed, lose HP as you fail, and earn Gold to buy weapons and armor!", - "install_methods": [ - { - "type": "default", - "script": "ct/habitica.sh", - "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 8, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null + "name": "Habitica", + "slug": "habitica", + "categories": [ + 24 + ], + "date_created": "2025-03-03", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://github.com/HabitRPG/habitica/wiki", + "website": "https://habitica.com/", + "logo": "https://github.com/HabitRPG/habitica/raw/refs/heads/develop/website/client/src/assets/svg/logo.svg", + "description": "Habitica is an open-source habit-building program that treats your life like a role-playing game. Level up as you succeed, lose HP as you fail, and earn Gold to buy weapons and armor!", + "install_methods": [ + { + "type": "default", + "script": "ct/habitica.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "It takes a minute or two after installation for web UI to start, please be patient.", + "type": "info" }, - "notes": [ - { - "text": "It takes a minute or two after installation for web UI to start, please be patient.", - "type": "info" - }, - { - "text": "Config file is at `/opt/habitica/config.json`", - "type": "info" - } - ] -} \ No newline at end of file + { + "text": "Config file is at `/opt/habitica/config.json`", + "type": "info" + } + ] +} From 6c5ef63375be057b2056d73c466619205e10731d Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:45:43 +0100 Subject: [PATCH 163/167] Update .app files (#2794) Co-authored-by: GitHub Actions --- ct/headers/habitica | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/habitica diff --git a/ct/headers/habitica b/ct/headers/habitica new file mode 100644 index 000000000..144591bb5 --- /dev/null +++ b/ct/headers/habitica @@ -0,0 +1,6 @@ + __ __ __ _ __ _ + / / / /___ _/ /_ (_) /_(_)________ _ + / /_/ / __ `/ __ \/ / __/ / ___/ __ `/ + / __ / /_/ / /_/ / / /_/ / /__/ /_/ / +/_/ /_/\__,_/_.___/_/\__/_/\___/\__,_/ + From d0edd224ca760104ff2cf93c893137eee6cc9b6f Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:58:33 +0100 Subject: [PATCH 164/167] Update CHANGELOG.md (#2793) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdea35d39..bc77dabf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ All LXC instances created using this repository come pre-installed with Midnight ## 2025-03-03 +### 🆕 New Scripts + + - Habitica [@tremor021](https://github.com/tremor021) ([#2779](https://github.com/community-scripts/ProxmoxVE/pull/2779)) + ### 🚀 Updated Scripts - #### 🐞 Bug Fixes From 7c5efad1ca54c884d75d5e3763c095d02b8c6aa8 Mon Sep 17 00:00:00 2001 From: Gert-jan Date: Mon, 3 Mar 2025 18:22:51 +0100 Subject: [PATCH 165/167] Update zigbee2mqtt.json - make sure link is clickable (#2802) --- json/zigbee2mqtt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/zigbee2mqtt.json b/json/zigbee2mqtt.json index 18bc8baa5..292b3e1cd 100644 --- a/json/zigbee2mqtt.json +++ b/json/zigbee2mqtt.json @@ -43,7 +43,7 @@ }, "notes": [ { - "text": "You can find the post-install guide here: https://github.com/community-scripts/ProxmoxVE/discussions/410", + "text": "You can find the post-install guide here: `https://github.com/community-scripts/ProxmoxVE/discussions/410`", "type": "info" } ] From f80bc3c09a0b16cc4f169a14c8efa10927cb1951 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Mar 2025 20:07:33 +0100 Subject: [PATCH 166/167] Zigbee2Mqtt Use fixed pnpm Version 10.4.1 (#2805) --- ct/zigbee2mqtt.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 508d513d7..eaa5f8346 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -33,6 +33,10 @@ function update_script() { systemctl stop zigbee2mqtt msg_ok "Stopped Service" + msg_info "Updating pnpm" + $STD npm install -g pnpm@10.4.1 + msg_ok "Updated pnpm" + msg_info "Creating Backup" rm -rf /opt/${APP}_backup*.tar.gz mkdir -p /opt/z2m_backup From 712ff6f5cc83981bed9e2f679761b3f62d2349b4 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 21:56:28 +0100 Subject: [PATCH 167/167] Update CHANGELOG.md (#2804) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc77dabf5..0a1ba15ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,12 +24,13 @@ All LXC instances created using this repository come pre-installed with Midnight - #### 🐞 Bug Fixes + - Zigbee2Mqtt Use fixed pnpm Version 10.4.1 [@MickLesk](https://github.com/MickLesk) ([#2805](https://github.com/community-scripts/ProxmoxVE/pull/2805)) - Linkwarden: Fix & Update Monolith-Installation [@MickLesk](https://github.com/MickLesk) ([#2787](https://github.com/community-scripts/ProxmoxVE/pull/2787)) - #### ✨ New Features - - Feature Template Path for Mountings [@MickLesk](https://github.com/MickLesk) ([#2785](https://github.com/community-scripts/ProxmoxVE/pull/2785)) - Feature: MinIO use now static port 9001 [@MickLesk](https://github.com/MickLesk) ([#2786](https://github.com/community-scripts/ProxmoxVE/pull/2786)) + - Feature Template Path for Mountings [@MickLesk](https://github.com/MickLesk) ([#2785](https://github.com/community-scripts/ProxmoxVE/pull/2785)) ### 🌐 Website @@ -37,6 +38,10 @@ All LXC instances created using this repository come pre-installed with Midnight - Feature: Website - show default OS [@MickLesk](https://github.com/MickLesk) ([#2790](https://github.com/community-scripts/ProxmoxVE/pull/2790)) + - #### 📝 Script Information + + - Update zigbee2mqtt.json - make sure link is clickable [@gurtjun](https://github.com/gurtjun) ([#2802](https://github.com/community-scripts/ProxmoxVE/pull/2802)) + ## 2025-03-02 ### 🚀 Updated Scripts
{item.status === "done" ? ( @@ -237,20 +165,7 @@ const DataFetcher: React.FC = () => { {item.ram_size} {item.method} {item.pve_version} - {item.error && item.error !== "none" ? ( - showErrorRow === index ? ( - <> - {item.error} - - - ) : ( - - ) - ) : ( - "none" - )} - {item.error} {formatDate(item.created_at)}