@@ -22,30 +22,30 @@ color
2222catch_errors
2323
2424function update_script() {
25- header_info
26- check_container_storage
27- check_container_resources
28- if [[ ! -d " /etc/authelia/" ]]; then
29- msg_error " No ${APP} Installation Found!"
30- exit
31- fi
32- RELEASE=$( curl -fsSL https://api.github.com/repos/authelia/authelia/releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
33- if [[ " ${RELEASE} " != " $( /usr/bin/authelia -v | awk ' {print substr($3, 2, length($2)) }' ) " ]]; then
34- msg_info " Updating $APP to ${RELEASE} "
35- $STD apt-get update
36- $STD apt-get -y upgrade
37- curl -fsSL " https://github.com/authelia/authelia/releases/download/${RELEASE} /authelia_${RELEASE} _amd64.deb" -o $( basename " https://github.com/authelia/authelia/releases/download/${RELEASE} /authelia_${RELEASE} _amd64.deb" )
38- $STD dpkg -i " authelia_${RELEASE} _amd64.deb"
39- msg_info " Cleaning Up"
40- rm -f " authelia_${RELEASE} _amd64.deb"
41- $STD apt-get -y autoremove
42- $STD apt-get -y autoclean
43- msg_ok " Cleanup Completed"
44- msg_ok " Updated $APP to ${RELEASE} "
45- else
46- msg_ok " No update required. ${APP} is already at ${RELEASE} "
47- fi
25+ header_info
26+ check_container_storage
27+ check_container_resources
28+ if [[ ! -d " /etc/authelia/" ]]; then
29+ msg_error " No ${APP} Installation Found!"
4830 exit
31+ fi
32+ RELEASE=$( curl -fsSL https://api.github.com/repos/authelia/authelia/releases/latest | grep " tag_name" | awk ' {print substr($2, 2, length($2)-3) }' )
33+ if [[ " ${RELEASE} " != " $( /usr/bin/authelia -v | awk ' {print substr($3, 2, length($2)) }' ) " ]]; then
34+ $STD apt-get update
35+ $STD apt-get -y upgrade
36+
37+ fetch_and_deploy_gh_release " authelia" " authelia/authelia" " binary"
38+
39+ msg_info " Cleaning Up"
40+ $STD apt-get -y autoremove
41+ $STD apt-get -y autoclean
42+ msg_ok " Cleanup Completed"
43+
44+ msg_ok " Updated $APP to ${RELEASE} "
45+ else
46+ msg_ok " No update required. ${APP} is already at ${RELEASE} "
47+ fi
48+ exit
4949}
5050
5151start
0 commit comments