i’m even lazier than that

gruber has a post about how to restart your apache webserver on a mac using an applescript instead of the terminal or the sharing sys pref. and in classic geek form, he goes to lengths to make it easier for him to do later. laziness as the driver for technical development. classic.

So because I’m really lazy, I made an AppleScript that does this. It’s just one single line:

do shell script "apachectl graceful" with administrator privileges

i’ll see your laziness and raise you a keyboard shortcut.

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.

so i did this. go to the apple menu. choose ‘System Preferences’. from there choose ‘Keyboard and Mouse’. click on the ‘Keyboard Shortcuts’ tab. near the bottom left corner, click the plus button. in the sheet that pops down enter these for the options:

add shortcut

  • Applications : All Applications
  • Menu Title : Restart Apache
  • Keyboard Shortcut : ⌘⌥⇧R
  • hint. that last one is ‘command option shift r’
  • then press the ‘add’ button

keyboard and mouse pref pane

and there you have it. one shortcut to rule them all. you know, for all the times that i have to restart apache.

script menu

waitasecond, i restart apache like once every blue moon. and i just spent a couple hours on this. this might have been an awesomely inefficient use of time.

tags : [ applescript ( ), apache ( ), lazyweb ( ), keyboard shortcut ( ), daring fireball ( ) ]

Currently playing in iTunes: I Try (Feat. Mary J. Blige) by Talib Kweli

Originally published at: http://sbb.me/b3dd1

6 thoughts on “i’m even lazier than that

  1. what are all those nifty menu extras you have in that last screen shot…let’s see, there’s 1-airport, 2-script_menu, and 3-(check_mark), 4-(envelope), 5-(ghost), 6-(music_note), 7-(unknown_symbol)…i think i got 2 outta 7, not so good! heh. any help?

  2. from the right:
    1 airport
    2 script menu
    3 check off [http://www.carpeaqua.com/software/checkoff/]
    4 gmail notifier, this was v1 so now it looks a little different [http://mail.google.com/mail/help/notifier/]
    5 spirited away [http://theresistancearmy.com/blog/2004/10/24/spirited-away-updated/]
    6 audio scrobbler plugin for itunes [http://www.last.fm/downloads.php]
    7 quicksilver [http://quicksilver.blacktree.com/]

    now, i’m down to
    airport, quicksilver and battery. less IS more.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s