Browse Source

Rework while

pull/820/merge
UltimateByte 9 years ago
parent
commit
7da4415b8e
  1. 16
      lgsm/functions/check_permissions.sh

16
lgsm/functions/check_permissions.sh

@ -22,13 +22,19 @@ fi
fn_check_permissions(){
if [ -n "${functionsdir}" ]; then
find "${functionsdir}" -name "*.sh" | while read -r filename; do perm="$(stat -c %a "${filename}")"; shortperm="${perm:0:1}";
while read -r filename
do
perm="$(stat -c %a "${filename}")"
shortperm="${perm:0:1}"
if [ "${shortperm}" != "7" ]; then
fn_print_warn_nl "Warning, permission issues found in ${functionsdir}"
echo " * Easy fix : chmod -R 755 ${functionsdir}"
echo " * To enable monitor run ./${selfname} start"
permissionfailure="1"
fi
done
done <<< "$(find "${functionsdir}" -name "*.sh")"
if [ "${permissionfailure}" == "1" ]; then
fn_print_warn_nl "Warning, permission issues found in ${functionsdir}"
echo " * Easy fix : chmod -R 755 ${functionsdir}"
fi
fi
}

Loading…
Cancel
Save