blob: e0e08941b2038714a19c4a32eca6337b758c02de [file] [log] [blame]
Luigi Santivettib77f7022020-11-08 01:04:55 +00001#!/bin/bash
2#
3# logrotate - holder
4#
5# Copyright 2019 Luigi Santivetti <luigi.santivetti@gmail.com>
6
7# Permission is hereby granted, free of charge, to any person obtaining a
8# copy of this software and associated documentation files (the "Software"),
9# to deal in the Software without restriction, including without limitation
10# the rights to use, copy, modify, merge, publish, distribute, sublicense,
11# and/or sell copies of the Software, and to permit persons to whom the
12# Software is furnished to do so, subject to the following conditions:
13
14# The above copyright notice and this permission notice (including the next
15# paragraph) shall be included in all copies or substantial portions of the
16# Software.
17
18# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21# ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
25_LOGROTATE_DKRC_SERVICE_="logrotate"
26_LOGROTATE_DKRC_IMAGE_="${host_name}-img-${_LOGROTATE_DKRC_SERVICE_}"
27_LOGROTATE_DKRC_CONTAINER_="${host_name}-con-${_LOGROTATE_DKRC_SERVICE_}"
28_LOGROTATE_DKRC_CONTEXT_="${mod_docker_d}"
29_LOGROTATE_DKRC_DOCKERFILE_="Dockerfile"
30_LOGROTATE_TRUNCATE_="copytruncate"
31_LOGROTATE_COMPRESS_="nocompress"
32_LOGROTATE_ROTATE_="0"
33_LOGROTATE_SIZE_="5M"
34_LOGROTATE_CRON_="hourly"
35_LOGROTATE_CROND_LEVEL_="7"
36_LOGROTATE_LOG_D_="${mod_rootfs_d}/var/log"
37_LOGROTATE_LOG_CON_D_="/logs"
38_LOGROTATE_CONF_F_="$logrotate_conf_f"
39_LOGROTATE_LOGROTATE_CONF_T_UID_="0"
40_LOGROTATE_LOGROTATE_CONF_T_GID_="0"
41_LOGROTATE_CONF_CON_F_="/etc/logrotate.conf"
42_LOGROTATE_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/*/*.txt"
43_LOGROTATE_APACHE_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/apache2/*.log"
44_LOGROTATE_APACHE_FILE_PATTERN_+=" ${_LOGROTATE_LOG_CON_D_}/apache2/*.txt"
45_LOGROTATE_APACHE_USER_="www-data"
46_LOGROTATE_APACHE_UID_="33"
47_LOGROTATE_APACHE_GID_="33"
48_LOGROTATE_MYSQL_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/mysql/*.txt"
49_LOGROTATE_MYSQL_USER_="mysql"
50_LOGROTATE_MYSQL_UID_="999"
51_LOGROTATE_MYSQL_GID_="999"
52_LOGROTATE_OPENSSH_FILE_PATTERN_="${_LOGROTATE_LOG_CON_D_}/openssh/*.txt"
53_LOGROTATE_OPENSSH_USER_="githuser"
54_LOGROTATE_OPENSSH_UID_="1001"
55_LOGROTATE_OPENSSH_GID_="1001"