Showing 1 changed files with 7 additions and 2 deletions
+7 -2
monitoring
... ...
@@ -19,13 +19,18 @@ function _load () {
19 19
     local l_ok=
20 20
     local count_loaded=
21 21
     local msg=
22
+    local directories=(
23
+        "$HOME/.config/$basename"
24
+        "${0}.d"
25
+        "/usr/local/share/${basename}"
26
+    )
22 27
     for conf in $*; do
23 28
         count_loaded=0
24 29
         if grep -q "^@$conf$" $supervision_disabled; then
25 30
             disabled[${#disabled[@]}]=$conf
26 31
         else
27
-            for dir in $HOME/.config/$basename ${0}.d /usr/local/share/${basename}; do
28
-                test -r "$dir/$conf" && source "$dir/$conf" && let count_loaded++
32
+            for dir in ${directories[@]}; do
33
+                test -r "$dir/$conf" && source "$dir/$conf" $dir && let count_loaded++
29 34
             done
30 35
             test $count_loaded -gt 0 && loaded[${#loaded[@]}]=$conf
31 36
         fi