Fixing error messages caused by plugin template
authorBrian Flowers <git-admn@bsflowers.net>
Sun, 18 Sep 2016 23:02:01 +0000 (19:02 -0400)
committerBrian Flowers <git-admn@bsflowers.net>
Sun, 18 Sep 2016 23:02:01 +0000 (19:02 -0400)
bdsm.sh

diff --git a/bdsm.sh b/bdsm.sh
index 223cd6a..f177dc7 100755 (executable)
--- a/bdsm.sh
+++ b/bdsm.sh
@@ -315,7 +315,11 @@ configure()
     header "Configuring $host"
     #availServices=$(ls /home/bdsm/bdsm.d | cut -d'.' -f1 | sort -u)
     availServices=()
-    ls /home/bdsm/bdsm.d | cut -d'.' -f1 | sort -u | while read service; do
+    find /home/bdsm/bdsm.d -executable -type f | \
+      sed 's|/home/bdsm/bdsm.d/||g' | \
+      cut -d'.' -f1 | \
+      sort -u | \
+      while read service; do
         svc=`echo $service | sed 's/(.*)$//g'`
         if [ -f /home/bdsm/bdsm.d/$svc.$type ]; then
           serviceFile="$svc.$type"