Skip to content

Commit 44e0f73

Browse files
committed
fix(software): correct stderr redirection placement in docker commands
Moves 2>/dev/null to immediately follow docker commands for proper error suppression. Also fixes watchtower module conditions. For docker container ls: $(docker container ls ... 2>/dev/null) || echo "" For docker image ls with pipes: $(docker image ls ... 2>/dev/null | grep ... | awk ...) || echo "" This ensures stderr is suppressed from docker commands themselves, not from downstream pipe commands or the command substitution expression. Affected 116 docker command instances across 47 modules.
1 parent 250f726 commit 44e0f73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+96
-96
lines changed

tools/json/config.system.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@
593593
],
594594
"status": "Stable",
595595
"author": "@armbian",
596-
"condition": "! module_watchtower status && pkg_installed docker-ce"
596+
"condition": "! module_watchtower status"
597597
},
598598
{
599599
"id": "WTC002",
@@ -603,7 +603,7 @@
603603
],
604604
"status": "Stable",
605605
"author": "@armbian",
606-
"condition": "module_watchtower status && pkg_installed docker-ce"
606+
"condition": "module_watchtower status"
607607
},
608608
{
609609
"id": "UNAT01",

tools/modules/software/module_actualbudget.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ function module_actualbudget () {
2525
module_docker install
2626
fi
2727
fi
28-
local container=$(docker container ls -a --filter "name=my_actual_budget" --format '{{.ID}}') 2>/dev/null || echo ""
29-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'actual' | awk '{print $2}') 2>/dev/null || echo ""
28+
local container=$(docker container ls -a --filter "name=my_actual_budget" --format '{{.ID}}' 2>/dev/null) || echo ""
29+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'actual' | awk '{print $2}') || echo ""
3030

3131
local commands
3232
IFS=' ' read -r -a commands <<< "${module_options["module_actualbudget,example"]}"

tools/modules/software/module_adguardhome.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function module_adguardhome () {
2323
module_docker install
2424
fi
2525
fi
26-
local container=$(docker container ls -a --filter "name=adguardhome" --format '{{.ID}}') 2>/dev/null || echo ""
27-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'adguard' | awk '{print $2}') 2>/dev/null || echo ""
26+
local container=$(docker container ls -a --filter "name=adguardhome" --format '{{.ID}}' 2>/dev/null) || echo ""
27+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'adguard' | awk '{print $2}') || echo ""
2828

2929
local commands
3030
IFS=' ' read -r -a commands <<< "${module_options["module_adguardhome,example"]}"

tools/modules/software/module_armbianrouter.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function module_armbianrouter () {
2929
fi
3030
fi
3131

32-
local container=$(docker container ls -a --format '{{.ID}} {{.Names}}' | mawk '$2 ~ /^armbianrouter/ {print $1}') 2>/dev/null || echo ""
33-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'armbian-router' | awk '{print $2}') 2>/dev/null || echo ""
32+
local container=$(docker container ls -a --format '{{.ID}} {{.Names}}' | mawk '$2 ~ /^armbianrouter/ {print $1}' 2>/dev/null) || echo ""
33+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'armbian-router' | awk '{print $2}') || echo ""
3434

3535
local commands
3636
IFS=' ' read -r -a commands <<< "${module_options["module_armbianrouter,example"]}"

tools/modules/software/module_bazarr.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function module_bazarr () {
2424
fi
2525
fi
2626

27-
local container=$(docker container ls -a --filter "name=bazarr" --format '{{.ID}}') 2>/dev/null || echo ""
28-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'bazarr' | awk '{print $2}') 2>/dev/null || echo ""
27+
local container=$(docker container ls -a --filter "name=bazarr" --format '{{.ID}}' 2>/dev/null) || echo ""
28+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'bazarr' | awk '{print $2}') || echo ""
2929

3030
local commands
3131
IFS=' ' read -r -a commands <<< "${module_options["module_bazarr,example"]}"

tools/modules/software/module_deluge.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function module_deluge () {
2424
fi
2525
fi
2626

27-
local container=$(docker container ls -a --filter "name=deluge" --format '{{.ID}}') 2>/dev/null || echo ""
28-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'deluge' | awk '{print $2}') 2>/dev/null || echo ""
27+
local container=$(docker container ls -a --filter "name=deluge" --format '{{.ID}}' 2>/dev/null) || echo ""
28+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'deluge' | awk '{print $2}') || echo ""
2929

3030
local commands
3131
IFS=' ' read -r -a commands <<< "${module_options["module_deluge,example"]}"

tools/modules/software/module_domoticz.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function module_domoticz () {
2424
fi
2525
fi
2626

27-
local container=$(docker container ls -a --filter "name=domoticz" --format '{{.ID}}') 2>/dev/null || echo ""
28-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'domoticz' | awk '{print $2}') 2>/dev/null || echo ""
27+
local container=$(docker container ls -a --filter "name=domoticz" --format '{{.ID}}' 2>/dev/null) || echo ""
28+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'domoticz' | awk '{print $2}') || echo ""
2929

3030
local commands
3131
IFS=' ' read -r -a commands <<< "${module_options["module_domoticz,example"]}"

tools/modules/software/module_duplicati.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function module_duplicati () {
2424
fi
2525
fi
2626

27-
local container=$(docker container ls -a --filter "name=duplicati" --format '{{.ID}}') 2>/dev/null || echo ""
28-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'duplicati' | awk '{print $2}') 2>/dev/null || echo ""
27+
local container=$(docker container ls -a --filter "name=duplicati" --format '{{.ID}}' 2>/dev/null) || echo ""
28+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'duplicati' | awk '{print $2}') || echo ""
2929

3030
local commands
3131
IFS=' ' read -r -a commands <<< "${module_options["module_duplicati,example"]}"

tools/modules/software/module_embyserver.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function module_embyserver () {
2424
fi
2525
fi
2626

27-
local container=$(docker container ls -a --filter "name=emby" --format '{{.ID}}') 2>/dev/null || echo ""
28-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'emby' | awk '{print $2}') 2>/dev/null || echo ""
27+
local container=$(docker container ls -a --filter "name=emby" --format '{{.ID}}' 2>/dev/null) || echo ""
28+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'emby' | awk '{print $2}') || echo ""
2929

3030
local commands
3131
IFS=' ' read -r -a commands <<< "${module_options["module_embyserver,example"]}"

tools/modules/software/module_evcc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ function module_evcc () {
2424
fi
2525
fi
2626

27-
local container=$(docker container ls -a --filter "name=evcc" --format '{{.ID}}') 2>/dev/null || echo ""
28-
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' | grep 'evcc' | awk '{print $2}') 2>/dev/null || echo ""
27+
local container=$(docker container ls -a --filter "name=evcc" --format '{{.ID}}' 2>/dev/null) || echo ""
28+
local image=$(docker image ls -a --format '{{.Repository}} {{.ID}}' 2>/dev/null | grep 'evcc' | awk '{print $2}') || echo ""
2929

3030
local commands
3131
IFS=' ' read -r -a commands <<< "${module_options["module_evcc,example"]}"

0 commit comments

Comments
 (0)