blob: e0e08941b2038714a19c4a32eca6337b758c02de [file] [log] [blame]
#!/bin/bash
#
# logrotate - holder
#
# Copyright 2019 Luigi Santivetti <luigi.santivetti@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
_LOGROTATE_DKRC_SERVICE_="logrotate"
_LOGROTATE_DKRC_IMAGE_="${host_name}-img-${_LOGROTATE_DKRC_SERVICE_}"
_LOGROTATE_DKRC_CONTAINER_="${host_name}-con-${_LOGROTATE_DKRC_SERVICE_}"
_LOGROTATE_DKRC_CONTEXT_="${mod_docker_d}"
_LOGROTATE_DKRC_DOCKERFILE_="Dockerfile"
_LOGROTATE_TRUNCATE_="copytruncate"
_LOGROTATE_COMPRESS_="nocompress"
_LOGROTATE_ROTATE_="0"
_LOGROTATE_SIZE_="5M"
_LOGROTATE_CRON_="hourly"
_LOGROTATE_CROND_LEVEL_="7"
_LOGROTATE_LOG_D_="${mod_rootfs_d}/var/log"
_LOGROTATE_LOG_CON_D_="/logs"
_LOGROTATE_CONF_F_="$logrotate_conf_f"
_LOGROTATE_LOGROTATE_CONF_T_UID_="0"
_LOGROTATE_LOGROTATE_CONF_T_GID_="0"
_LOGROTATE_CONF_CON_F_="/etc/logrotate.conf"
_LOGROTATE_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/*/*.txt"
_LOGROTATE_APACHE_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/apache2/*.log"
_LOGROTATE_APACHE_FILE_PATTERN_+=" ${_LOGROTATE_LOG_CON_D_}/apache2/*.txt"
_LOGROTATE_APACHE_USER_="www-data"
_LOGROTATE_APACHE_UID_="33"
_LOGROTATE_APACHE_GID_="33"
_LOGROTATE_MYSQL_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/mysql/*.txt"
_LOGROTATE_MYSQL_USER_="mysql"
_LOGROTATE_MYSQL_UID_="999"
_LOGROTATE_MYSQL_GID_="999"
_LOGROTATE_OPENSSH_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/openssh/*.txt"
_LOGROTATE_OPENSSH_USER_="githuser"
_LOGROTATE_OPENSSH_UID_="1001"
_LOGROTATE_OPENSSH_GID_="1001"