Created
September 9, 2009 23:33
-
-
Save rgo/184174 to your computer and use it in GitHub Desktop.
Services moved from rc.M to cron.daily/house-cleaning (Improve boot time)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/cron.daily/house-cleaning | |
# RGO - not commented in rc.M | |
# Update all the shared library links: | |
#if [ -x /sbin/ldconfig ]; then | |
# echo "Updating shared library links: /sbin/ldconfig &" | |
# /sbin/ldconfig & | |
#fi | |
# Update the X font indexes: | |
if [ -x /usr/bin/fc-cache ]; then | |
echo "Updating X font indexes: /usr/bin/fc-cache -f &" | |
/usr/bin/fc-cache -f & | |
fi | |
# Update any existing icon cache files: | |
if find /usr/share/icons 2> /dev/null | grep -q icon-theme.cache ; then | |
for theme_dir in /usr/share/icons/* ; do | |
if [ -r ${theme_dir}/icon-theme.cache ]; then | |
echo "Updating icon-theme.cache in ${theme_dir}..." | |
/usr/bin/gtk-update-icon-cache -t -f ${theme_dir} 1> /dev/null 2> /dev/null & | |
fi | |
done | |
# This would be a large file and probably shouldn't be there. | |
if [ -r /usr/share/icons/icon-theme.cache ]; then | |
echo "Deleting icon-theme.cache in /usr/share/icons..." | |
#/usr/bin/gtk-update-icon-cache -t -f /usr/share/icons 1> /dev/null 2> /dev/null & | |
rm -f /usr/share/icons/icon-theme.cache | |
fi | |
fi | |
# Update mime database: | |
if [ -x /usr/bin/update-mime-database -a -d /usr/share/mime ]; then | |
echo "Updating MIME database: /usr/bin/update-mime-database /usr/share/mime &" | |
/usr/bin/update-mime-database /usr/share/mime 1> /dev/null 2> /dev/null & | |
fi | |
# These GTK+/pango files need to be kept up to date for | |
# proper input method, pixbuf loaders, and font support. | |
if [ -x /usr/bin/update-gtk-immodules ]; then | |
/usr/bin/update-gtk-immodules --verbose | |
fi | |
if [ -x /usr/bin/update-gdk-pixbuf-loaders ]; then | |
/usr/bin/update-gdk-pixbuf-loaders --verbose | |
fi | |
if [ -x /usr/bin/update-pango-querymodules ]; then | |
/usr/bin/update-pango-querymodules --verbose | |
fi | |
# Run update-desktop-database: | |
if [ -x /usr/bin/update-desktop-database ]; then | |
/usr/bin/update-desktop-database /usr/share/applications 1> /dev/null 2> /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment