"MàJ script install.sh"

This commit is contained in:
2017-07-22 06:36:57 +02:00
parent 19440500ed
commit 90bf430e7e
3 changed files with 40 additions and 1 deletions

View File

@@ -122,3 +122,35 @@ if [ ! ${MSGS_NUM} -eq 0 ]; then
fi
continue_on_ok
fi
# Gestion des droits et permissions
echo -en "\033[93m * Application des droits sur les répertoires:\033[0m "
chown -R ${ADMIN_USER}:${ADMIN_GROUP} ${NC_EXPL_ROOT}
RET_VAL=$?
if [ ! ${RET_VAL} -eq 0 ]; then
exit_on_error "Erreur lors l'application des droits"
fi
continue_on_ok
echo -e "\033[93m * Application des permissions sur les répertoires:\033[0m "
for DIR in cpt bin conf dat lib man mod msg
do
echo -en " * ${NC_EXPL_ROOT}/${DIR} "
chmod -R 550 ${NC_EXPL_ROOT}/${DIR}
RET_VAL=$?
if [ ! ${RET_VAL} -eq 0 ]; then
exit_on_error "Erreur lors l'application des droits sur ${NC_EXPL_ROOT}/${DIR}"
fi
continue_on_ok
done
for DIR in cpt hist log tmp
do
echo -en " * ${NC_EXPL_ROOT}/${DIR} "
chmod -R 770 ${NC_EXPL_ROOT}/${DIR}
RET_VAL=$?
if [ ! ${RET_VAL} -eq 0 ]; then
exit_on_error "Erreur lors l'application des droits sur ${NC_EXPL_ROOT}/${DIR}"
fi
continue_on_ok
done