A proper way to modify /etc/logrotate.d/roundcube-core
This commit is contained in:
parent
8889d36ffe
commit
90ebbf5d06
|
@ -564,6 +564,7 @@ roundcube/class/m_roundcube.php -text
|
||||||
roundcube/roundcube-install -text
|
roundcube/roundcube-install -text
|
||||||
roundcube/roundcube_alternc_logo.png -text
|
roundcube/roundcube_alternc_logo.png -text
|
||||||
roundcube/templates/apache2/roundcube.conf -text
|
roundcube/templates/apache2/roundcube.conf -text
|
||||||
|
roundcube/templates/logrotate.d/roundcube-core -text
|
||||||
roundcube/templates/roundcube/main.inc.php -text
|
roundcube/templates/roundcube/main.inc.php -text
|
||||||
roundcube/templates/roundcube/plugins/managesieve/config.inc.php -text
|
roundcube/templates/roundcube/plugins/managesieve/config.inc.php -text
|
||||||
roundcube/templates/roundcube/plugins/password/config.inc.php -text
|
roundcube/templates/roundcube/plugins/password/config.inc.php -text
|
||||||
|
|
|
@ -40,6 +40,7 @@ then
|
||||||
# Configuration template location
|
# Configuration template location
|
||||||
TEMPLATE_DIR="/etc/alternc/templates"
|
TEMPLATE_DIR="/etc/alternc/templates"
|
||||||
CONFIG_FILES="etc/roundcube/main.inc.php etc/roundcube/plugins/password/config.inc.php"
|
CONFIG_FILES="etc/roundcube/main.inc.php etc/roundcube/plugins/password/config.inc.php"
|
||||||
|
LOGROTATE_FILES="etc/logrotate.d/roundcube-core"
|
||||||
|
|
||||||
cat > $SED_SCRIPT <<EOF
|
cat > $SED_SCRIPT <<EOF
|
||||||
s\\%%ALTERNC_LOC%%\\$ALTERNC_LOC\\;
|
s\\%%ALTERNC_LOC%%\\$ALTERNC_LOC\\;
|
||||||
|
@ -74,10 +75,29 @@ EOF
|
||||||
) >> /$file
|
) >> /$file
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f $SED_SCRIPT
|
rm -f $SED_SCRIPT
|
||||||
|
|
||||||
echo " Done"
|
echo " Done"
|
||||||
|
|
||||||
|
for file in $LOGROTATE_FILES; do
|
||||||
|
TEMPLATE="$TEMPLATE_DIR/${file##etc/}"
|
||||||
|
echo -n " $file"
|
||||||
|
if [ -f "$TEMPLATE" ]; then
|
||||||
|
(
|
||||||
|
echo '#######################################################'
|
||||||
|
echo '# /!\ DO NOT EDIT THIS FILE /!\ #'
|
||||||
|
echo '# Edit the one in /etc/alternc/templates/logrotate.d/ #'
|
||||||
|
echo '# and launch alternc.install again. #'
|
||||||
|
echo '#######################################################'
|
||||||
|
echo ''
|
||||||
|
) > /$file
|
||||||
|
cat $TEMPLATE >> /$file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo " Done"
|
||||||
|
|
||||||
. /usr/lib/alternc/functions.sh
|
. /usr/lib/alternc/functions.sh
|
||||||
|
|
||||||
echo "giving write access to roundcube to the email password ..."
|
echo "giving write access to roundcube to the email password ..."
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
/var/log/roundcube/password /var/log/roundcube/errors /var/log/roundcube/sendmail /var/log/roundcube/userlogins {
|
||||||
|
create 0640 alternc-roundcube root
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
rotate 52
|
||||||
|
weekly
|
||||||
|
}
|
Loading…
Reference in New Issue