From 7b374d1ee17e1f4368bfe2997c56aa217747d876 Mon Sep 17 00:00:00 2001 From: ByteSnipers GmbH <55362478+ByteSnipers@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:20:41 +0100 Subject: [PATCH] Fix a bug with complian command added support for aa-complian. --- lnxrouter | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lnxrouter b/lnxrouter index d723556..6665aa4 100755 --- a/lnxrouter +++ b/lnxrouter @@ -2087,8 +2087,8 @@ run_wifi_ap_processes() { echo echo "Starting hostapd" - if which complain > /dev/null 2>&1; then - complain hostapd + if COMPLAIN_CMD=$(command -v complain || command -v aa-complain); then + $COMPLAIN_CMD hostapd fi # hostapd '-P' works only when use '-B' (run in background) @@ -2108,10 +2108,10 @@ start_dnsmasq() { echo echo "Starting dnsmasq" - if which complain > /dev/null 2>&1; then + if COMPLAIN_CMD=$(command -v complain || command -v aa-complain); then # openSUSE's apparmor does not allow dnsmasq to read files. # remove restriction. - complain dnsmasq + $COMPLAIN_CMD dnsmasq fi # Using '-d'(no daemon) dnsmasq will not turn into 'nobody'