apache: improve permissions in save_apache_status script

This commit is contained in:
Jérémy Lecour 2019-12-13 09:50:04 +01:00 committed by Jérémy Lecour
parent 8b6c1341f9
commit e557a3eaae
2 changed files with 8 additions and 3 deletions

View file

@ -36,6 +36,7 @@ The **patch** part changes incrementally at each release.
* webapps/evoadmin-web Overload templates if needed
### Changed
* apache: improve permissions in save_apache_status script
* elasticsearch: listen on local interface only by default
* evocheck: upstream version 19.11.2
* evocheck: cron jobs execute in verbose

View file

@ -7,11 +7,15 @@ URL="http://127.0.0.1/server-status"
TS=`date +%Y%m%d%H%M%S`
FILE="${DIR}/${TS}.html"
mkdir -p "${DIR}"
wget -q -O "${FILE}" "${URL}"
if [ ! -d "${DIR}" ]; then
mkdir -p "${DIR}"
chown root:adm "${DIR}"
chmod 750 "${DIR}"
fi
wget -q -U "save_apache_status" -O "${FILE}" "${URL}"
chmod 640 "${FILE}"
chown root:adm "${FILE}"
find "${DIR}" -type f -mtime +1 -delete