shellfmt/.editorconfig: enable trim whitespaces, run shellfmt, no actual code changes (#4849)

- shellfmt: bump to 3.6.0 (run with `bash lib/tools/shellfmt.sh`)
- .editorconfig: rationalize, remove duplicated logic
This commit is contained in:
Ricardo Pardini
2023-02-23 05:24:41 -03:00
committed by GitHub
parent c2004faf9c
commit 2f7423d0e4
18 changed files with 45 additions and 75 deletions

View File

@@ -1,8 +1,8 @@
# Management of apt-cacher-ng aka acng
function acng_configure_and_restart_acng() {
if ! armbian_is_host_running_systemd; then return 0; fi # do nothing if host is not running systemd
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to. NO_something=yes is very confusing, but kept for historical reasons
if ! armbian_is_host_running_systemd; then return 0; fi # do nothing if host is not running systemd
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to. NO_something=yes is very confusing, but kept for historical reasons
display_alert "Preparing acng configuration" "apt-cacher-ng" "info"
@@ -54,7 +54,7 @@ function acng_configure_and_restart_acng() {
}
function acng_check_status_or_restart() {
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to
[[ "${MANAGE_ACNG}" != "yes" ]] && return 0 # don't if told not to
if ! systemctl -q is-active apt-cacher-ng.service; then
display_alert "ACNG systemd service is not active" "restarting apt-cacher-ng" "warn"