service start and update function

This commit is contained in:
Thorsten 2025-02-05 15:57:44 +01:00 committed by GitHub
parent 6ade0a2b4b
commit cbd7fd0f21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 10 deletions

View File

@ -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
}

View File

@ -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