Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : OSX Automator script to start AMPPS



Threaded Mode | Print  

 OSX Automator script to start AMPPS (2 Replies, Read 3515 times)
cronocr
Group: Member
Post Group: Newbie
Posts: 2
Status:
I looked for a solution as nice as the WAMP server in Mac and finally found AMPPS, but had to solve a few issues: how to start it automatically when OS X starts, avoiding the password prompt when starting a service, fixing the user reset that occurs when OS X crashes (happens in Yosemite), and then hiding the script output and icon. I'm sharing my solution here in case someone finds it useful or in case I need it in the future:

1. In Mac OSX open Automator.2. Create a new script.3. Add a Run Shell Script.4. Choose Shell: /bin/bash5. Paste the following command that repairs the username in Apache config:

perl -pi -w -e 's{User "root"}{User "YOUR_USERNAME"}g' /Applications/AMPPS/apache/conf/httpd.conf

6. Paste the following command that executes AMPPS with admin permissions, ignores the output and closes the script:
echo YOUR_PASSWORD | sudo -S /Applications/AMPPS/Ampps.app/Contents/MacOS/Ampps >/dev/null 2>&1&

7. Save script.8. Add to System Preferences > Users & Groups > Login Items.
IP: --   

OSX Automator script to start AMPPS
jingato
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hi, I was trying to find a way to avoid the password prompt everytime I start and stop the service as well, but I don't want it to startup when my machine boots. I also don't want to have to use an separate script each time. I would like to still click on the buttons in the Ampps app. Is it possible to do that with this?

Thanks!
IP: --   

OSX Automator script to start AMPPS
cronocr
Group: Member
Post Group: Newbie
Posts: 2
Status:
Quote From : jingato December 23, 2015, 7:30 am
Hi, I was trying to find a way to avoid the password prompt everytime I start and stop the service as well, but I don't want it to startup when my machine boots. I also don't want to have to use an separate script each time. I would like to still click on the buttons in the Ampps app. Is it possible to do that with this?

Thanks!


Do the steps above but don't add to Login Items (step 8), then run the automator script manually like any other app when you need AMPPS.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 28, 2024, 11:35 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.028