mirror of
https://github.com/rvalitov/zabbix-php-fpm.git
synced 2023-11-05 03:30:27 +01:00
[add] check if cache file is writeable
This commit is contained in:
parent
0af188ec6d
commit
1d4f9a8544
@ -322,6 +322,11 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ -f ${CACHE_FILE} ]] && [[ ! -w ${CACHE_FILE} ]]; then
|
||||||
|
${S_ECHO} "Error: write permission is not granted to user $ACTIVE_USER for cache file $CACHE_FILE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
PrintDebug "Saving new cache file $CACHE_FILE..."
|
PrintDebug "Saving new cache file $CACHE_FILE..."
|
||||||
${S_PRINTF} "%s\n" "${NEW_CACHE[@]}" > ${CACHE_FILE}
|
${S_PRINTF} "%s\n" "${NEW_CACHE[@]}" > ${CACHE_FILE}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user