diff --git a/auto_config.sh b/auto_config.sh index 02c611e..05acab9 100755 --- a/auto_config.sh +++ b/auto_config.sh @@ -2,7 +2,7 @@ # BSD 3-Clause License # -# Copyright (c) 2018, Alban Vidal +# Copyright (c) 2018-2019, Alban Vidal # All rights reserved. # # 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 ln -sf $GIT_DIR/root/.vimrc /root/ +################################################################################ + ## Tune logrotate -# Fix logrotate bug -cat << EOF > /etc/cron.daily/logrotate -#!/bin/sh -test -x /usr/sbin/logrotate || exit 0 -/usr/sbin/logrotate -f /etc/logrotate.conf -EOF + +# Force rotate if is launched by cron +# change : /usr/sbin/logrotate /etc/logrotate.conf +# by : /usr/sbin/logrotate -f /etc/logrotate.conf +sed -i 's#\(/usr/sbin/logrotate\).*\(/etc/logrotate.conf\)#\1 -f \2#' /etc/cron.daily/logrotate + # Disable delaycompress sed -i 's/.*delaycompress/#&/' /etc/logrotate.d/* +################################################################################ + # Disable IPv6 if $DISABLE_IPv6 ; then cat << EOF > /etc/sysctl.d/98-disable-ipv6.conf