#!/bin/bash clear echo " ############ MULTI-MAINTENANCE ############ This script will: run all periodic scripts; force update of prebinding libraries; and repair permissions. -SystemsBoy 05/14/2005- ########################################### " echo " What sort of maintenance would you like to perform today? [P] Periodic Maintenance [U] Update Prebinding [R] Repair Permissions [A] All ___________" read maint if [ $maint = P -o $maint = p ] then echo " ####### RUNNING PERIODIC MAINTENANCE ####### " echo " Running daily maintenance..." sudo /usr/sbin/periodic daily echo " Running weekly maintenance..." sudo /usr/sbin/periodic weekly echo " Running monthly maintenance..." sudo /usr/sbin/periodic monthly echo " Periodic maintenance complete! Have a great day! " fi if [ $maint = U -o $maint = u ] then echo " ###### UPDATING PREBINDING INFORMATION ###### " echo " Running update prebinding... This may take a few minutes..." sudo /usr/bin/update_prebinding -root / -force echo " All done then! Prebinding has been updated. For best results, please restart your system. Bye! " fi if [ $maint = R -o $maint = r ] then echo " ####### REPAIRING SYSTEM PERMISSIONS ####### " echo " Repairing system permissions... Please wait... " sudo /usr/sbin/diskutil repairPermissions / echo " Permissions have been successfully repaired. You may want to reboot at this time. Have a great day! " fi if [ $maint = A -o $maint = a ] then echo " ############# RUNNING ALL MAINTENANCE ROUTINES ############# " echo " ####### RUNNING PERIODIC MAINTENANCE ####### " echo " Running daily maintenance..." sudo /usr/sbin/periodic daily echo " Running weekly maintenance..." sudo /usr/sbin/periodic weekly echo " Running monthly maintenance..." sudo /usr/sbin/periodic monthly echo " Periodic maintenance complete! " echo " ####### REPAIRING SYSTEM PERMISSIONS ####### " echo " Repairing system permissions... Please wait... " sudo /usr/sbin/diskutil repairPermissions / echo " Permissions have been successfully repaired. " echo " ###### UPDATING PREBINDING INFORMATION ###### " echo " Running update prebinding... This may take a few minutes..." sudo /usr/bin/update_prebinding -root / -force echo " Prebinding has been updated! " echo " ALL MAINTENANCE SCRIPTS HAVE COMPLETED. PLEASE REBOOT THE SYSTEM. That is all... " fi exit 0