From cbd7fd0f215b501871d44c9cb568afa3ae0c2bc7 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Wed, 5 Feb 2025 15:57:44 +0100 Subject: [PATCH] service start and update function --- ct/authelia.sh | 10 +++++----- install/authelia-install.sh | 7 ++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ct/authelia.sh b/ct/authelia.sh index 7ca56b8565a..882ca35096b 100644 --- a/ct/authelia.sh +++ b/ct/authelia.sh @@ -4,7 +4,7 @@ source <(curl -s https://raw.githubusercontent.com/thost96/ProxmoxVE-scripts/aut # 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/integration/deployment/bare-metal/" +# Source: https://www.authelia.com/ # App Default Values @@ -32,7 +32,7 @@ function update_script() { 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}" != "$(cat )" ]]; then + if [[ "${RELEASE}" != "$(/usr/bin/authelia -v | awk '{print substr($3, 2, length($2)) }' )" ]]; then msg_info "Updating $APP to ${RELEASE}" $STD apt-get update &>/dev/null $STD apt-get -y upgrade &>/dev/null @@ -44,9 +44,9 @@ function update_script() { $STD apt-get -y autoclean msg_ok "Cleanup Completed" msg_ok "Updated $APP to ${RELEASE}" - #else - # msg_ok "No update required. ${APP} is already at ${RELEASE}" - #fi + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit } diff --git a/install/authelia-install.sh b/install/authelia-install.sh index e62a3e319aa..8fb80464529 100644 --- a/install/authelia-install.sh +++ b/install/authelia-install.sh @@ -4,7 +4,7 @@ # 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/integration/deployment/bare-metal/" +# Source: https://www.authelia.com/ # Import Functions und Setup @@ -76,10 +76,7 @@ notifier: filesystem: filename: /etc/authelia/emails.txt EOF - -#msg_info "Validating Authelia Config" -#$STD authelia config validate -c /etc/authelia/configuration.yml - +$STD systemctl start authelia msg_ok "Authelia Setup completed" motd_ssh