armbian-next: apt-cacher-ng is now optional and activated via MANAGE_ACNG=yes; drop NO_APT_CACHER

- acng is constant source of headaches
- we don't need it anymore, since we have local caching now
- You can also have acng running on a different machine/container and set `APT_PROXY_ADDR=xxx:3142` if you're running a build farm
This commit is contained in:
Ricardo Pardini
2023-01-11 15:08:16 +01:00
parent d4d3c1346c
commit 93c8ce99af
5 changed files with 29 additions and 17 deletions

View File

@@ -2,8 +2,7 @@
function acng_configure_and_restart_acng() {
if ! armbian_is_host_running_systemd; then return 0; fi # do nothing if host is not running systemd
[[ $NO_APT_CACHER == yes ]] && return 0 # don't if told not to. NO_something=yes is very confusing, but kept for historical reasons
[[ "${APT_PROXY_ADDR:-localhost:3142}" != "localhost:3142" ]] && return 0 # also not if acng not local to builder machine
[[ "${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"
@@ -55,8 +54,7 @@ function acng_configure_and_restart_acng() {
}
function acng_check_status_or_restart() {
[[ $NO_APT_CACHER == yes ]] && return 0 # don't if told not to
[[ "${APT_PROXY_ADDR:-localhost:3142}" != "localhost:3142" ]] && return 0 # also not if acng not local to builder machine
[[ "${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"