The other day I was doing some testing which required me to restart my webserver repeatedly. John Gruber has written about his AppleScript to make this even quicker than the usual way.
Daring Fireball: ‘Restart Apache’ AppleScript:
Apple’s built-in way to restart Apache is the use the Personal Web Sharing section of the Sharing panel in System Preferences. … because I’m really lazy, I made an AppleScript that does this.
do shell script "apachectl graceful" with administrator privileges
Then Shane Becker added a keyboard shortcut: i’m even lazier than that at tofu == love:
i followed all of john’s instructions, but then decided that moving my mouse all the way up there and then selecting it out of the many options in the script menu … ugh. i just couldn’t be bothered.
I use the invaluable Keyboard Maestro for keyboard shortcuts (and it has a wee floating palette), so I didn’t follow Shane’s instructions for setting a custom kestroke. Now, though, I’m all prepared for my next bout of Restarting Apache.




Add your Comment