install_roundcube.sh: change cronjob for cleaning up db.

This commit is contained in:
2026-07-11 02:00:24 +02:00
parent 2d288c6705
commit bb8cd0c2cc
+2 -2
View File
@@ -1046,11 +1046,11 @@ fi
# - # -
echononl "\tInstall a cronjob for cleaning up database" echononl "\tInstall a cronjob for cleaning up database"
crontab -l > /tmp/tmp_crontab crontab -l > /tmp/tmp_crontab
if ! grep -q -E "${WEBSITE_BASEDIR}/htdocs/bin/cleandb.sh" /tmp/tmp_crontab 2> /dev/null ; then if ! grep -q -E "/root/bin/admin-stuff/roundcube-cleandb.sh" /tmp/tmp_crontab 2> /dev/null ; then
echo "" >> /tmp/tmp_crontab echo "" >> /tmp/tmp_crontab
echo "# - Keep roundcube database slick and clean" >> /tmp/tmp_crontab echo "# - Keep roundcube database slick and clean" >> /tmp/tmp_crontab
echo "# -" >> /tmp/tmp_crontab echo "# -" >> /tmp/tmp_crontab
echo "37 3 * * * su - www-data -c \"${WEBSITE_BASEDIR}/htdocs/bin/cleandb.sh > /dev/null\" -s /bin/bash" >> /tmp/tmp_crontab echo "37 3 * * * /root/bin/admin-stuff/roundcube-cleandb.sh -w ${WEBSITE_BASEDIR}" >> /tmp/tmp_crontab
crontab /tmp/tmp_crontab > $log_file 2>&1 crontab /tmp/tmp_crontab > $log_file 2>&1
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
echo_ok echo_ok