Adapt the logrotate for Debian 9 and 10
Signed-off-by: Alban Vidal <alban.vidal@zordhak.fr>
This commit is contained in:
parent
2f440ebbda
commit
1eca671f2c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# BSD 3-Clause License
|
# BSD 3-Clause License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018, Alban Vidal <alban.vidal@zordhak.fr>
|
# Copyright (c) 2018-2019, Alban Vidal <alban.vidal@zordhak.fr>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -154,16 +154,20 @@ ln -sf $GIT_DIR/root/.profile.d/01_stats_connexion.conf /root/.profile.d/
|
|||||||
# vimrc
|
# vimrc
|
||||||
ln -sf $GIT_DIR/root/.vimrc /root/
|
ln -sf $GIT_DIR/root/.vimrc /root/
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
## Tune logrotate
|
## Tune logrotate
|
||||||
# Fix logrotate bug
|
|
||||||
cat << EOF > /etc/cron.daily/logrotate
|
# Force rotate if is launched by cron
|
||||||
#!/bin/sh
|
# change : /usr/sbin/logrotate /etc/logrotate.conf
|
||||||
test -x /usr/sbin/logrotate || exit 0
|
# by : /usr/sbin/logrotate -f /etc/logrotate.conf
|
||||||
/usr/sbin/logrotate -f /etc/logrotate.conf
|
sed -i 's#\(/usr/sbin/logrotate\).*\(/etc/logrotate.conf\)#\1 -f \2#' /etc/cron.daily/logrotate
|
||||||
EOF
|
|
||||||
# Disable delaycompress
|
# Disable delaycompress
|
||||||
sed -i 's/.*delaycompress/#&/' /etc/logrotate.d/*
|
sed -i 's/.*delaycompress/#&/' /etc/logrotate.d/*
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
# Disable IPv6
|
# Disable IPv6
|
||||||
if $DISABLE_IPv6 ; then
|
if $DISABLE_IPv6 ; then
|
||||||
cat << EOF > /etc/sysctl.d/98-disable-ipv6.conf
|
cat << EOF > /etc/sysctl.d/98-disable-ipv6.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user