![]() ![]() Toggle the switch on your power source to test (close all open files first, of course!). Energy Saver option 'Restart automatically after a power failure' must be checked. Set the application to run on startup (in 10.2, this is in the Preference Pane 'Login Items'). ![]() Open Script Editor, and type the following line in, changing the placeholder value yourpassword to your administrator password: do shell script ¬ "/usr/sbin/apachectl start" password ¬ "yourpassword" with administrator privilegesSave 'Start Apache' as file format Application in a convenient location. I wanted to create an application to run as a StartUpItem that starts the Apache server via an apachectl start command. Being a UNIX newbie (fear of complex UNIX hints), and already having some experience with AppleScript's ability to execute shell scripts through the do shell script command, I thought I'd try creating an AppleScript solution. I've seen a couple of fairly complex hints that were written to overcome the bug in OS X 10.2 that fails to restart the Apache webserver after a power failure. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |