![]() ![]() Set AppleScript's text item delimiters to "" Set theExpression to processName as string Set AppleScript's text item delimiters to "\\|" Set mysqlRunning to my ProcessRunning("mysqld") Set apacheRunning to my ProcessRunning("httpd") ![]() # Check if the Apache or MySQL servers are already running This code uses a user-defined function to ensure that MAMP’s Apache and MySQL servers are only started if no other instances of Apache or MySQL are currently running: While this AppleScript will suffice I’ve included some other functionality in the final version. Save this AppleScript as an AppleScript application and add it to the user’s Login Items and MAMP’s Apache and MySQL servers will be up and running when user login is complete.Īccess Control panel for the 'MAMP' keychain item Substituting the plain text PASSWORD and USERNAME from the original AppleScript for their respective variables: thePassword and theUserName, we can use the following AppleScript:ĭo shell script "/Applications/MAMP/bin/startApache.sh
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |