Runs all periodic cleanup scripts on MacOS X in order (daily, weekly, monthly). Also fixes locate database problem where its owner and permissions get changed so that the next run of the weekly script fails trying to rebuild it.
#!/bin/bash
# Shortcut script for periodic cleanup scripts
# Also fixes locate database permissions
# Written by Niels Heidenreich, 2006-01-19
sudo /etc/daily
ldb="/private/var/db/locate.database"
if [ -f $ldb ]
then
sudo chown root:wheel $ldb
sudo chmod 644 $ldb
fi
sudo /etc/weekly
sudo /etc/monthly