Browse Source

Update check_permissions.sh

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

6
lgsm/functions/check_permissions.sh

@ -22,7 +22,7 @@ fi
fn_check_permissions(){ fn_check_permissions(){
if [ -n "${functionsdir}" ]; then if [ -n "${functionsdir}" ]; then
find "${functionsdir}" -name "*.sh" | while read -r filename; do perm="$(stat -c %a "${filename}")"; shortperm="$(echo "${perm:0:1}")"; find "${functionsdir}" -name "*.sh" | while read -r filename; do perm="$(stat -c %a "${filename}")"; shortperm="${perm:0:1}";
if [ "${shortperm}" != "7" ]; then if [ "${shortperm}" != "7" ]; then
fn_print_warn_nl "Warning, permission issues found in ${functionsdir}" fn_print_warn_nl "Warning, permission issues found in ${functionsdir}"
echo " * Easy fix : chmod -R 755 ${functionsdir}" echo " * Easy fix : chmod -R 755 ${functionsdir}"
@ -31,7 +31,7 @@ if [ -n "${functionsdir}" ]; then
fi fi
} }
fn_check_permissions_summary(){ fn_check_permissions_conclusion(){
if [ "${permissionerror}" == "1" ]; then if [ "${permissionerror}" == "1" ]; then
exit 1 exit 1
fi fi
@ -39,4 +39,4 @@ fi
fn_check_ownership fn_check_ownership
fn_check_permissions fn_check_permissions
fn_check_permissions_summary fn_check_permissions_conclusion

Loading…
Cancel
Save