This forum is no longer active. Please post your questions to our new community site

Forums MAMPStack

AppleScript to start/stop MAMPStack

Subscribe to AppleScript to start/stop MAMPStack 10 post(s), 5 voice(s)

 
Avatar Joshua Preston 1 post

Hey guys,

For my own reference, and my reliance upon AppleScripts for doing various things, I’ve created a couple of scripts to start and stop the MAMPStack.

/>do shell script "/Applications/Mampstack/ctlscript.sh start" 
[/code]
/>do shell script "/Applications/Mampstack/ctlscript.sh stop" 
[/code]

Sure, they’re simple, but I hate going to a shell just to start or stop the service…

Regards,

Joshua Preston.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi Joshua,

Thanks for your feedback, certainly a great idea to simplify the servers management. We will work to the user can start/stop servers easily.

Cheers

 
Avatar Frank Osgood 3 post(s)

Help,

I downloaded Drupal 6.9 OSX X86 to my MacBook with Leopard and had no trouble installing it and using it to build a draft website by following the excellent users guide from Packet Publications. However when I shut down and restart the next day, I can’t access the web page I created the previous day and have to reinstall Drupal from Bitnami and start all over again.

I tried using Joshua’s Applescript above and it was recognized, but I received a “permission denied” response.

What should I do next?

Regards,

Frank Osgood

 
Avatar antonio 621 post(s)

You have a script to manage the servers, named ctlscript.sh. If you go to the Terminal, and change directory to your current installation, you can start them by typing

./ctlscript.sh start

Another option is to use MAMPStack and Drupal Module instead of the DrupalStack, as the MAMPStack includes a graphical user interface to control the servers

Cheers

 
Avatar Frank Osgood 3 post(s)

Thanks, Antonio. I tried both options and received “permission denied” both times. Is there anything else I can do?

See below:
[franklin-osgoods-computer:] frank% />do shell script ”/Application/MAMPstack/Drupal Module/ctlscript.sh start”
/: Permission denied.
[franklin-osgoods-computer:
] frank% />do shell script “ctlscript.sh start”
/: Permission denied.
[franklin-osgoods-computer:~] frank%

 
Avatar antonio 621 post(s)

Hi Frank,

I don’t know how AppleScript works, but that command input seems a bit weird to me. Can you check with

./ctlscript.sh start

only? If you still get errors, please type

ls -l ctlscript.sh

from the installation directory.

Antonio

 
Avatar Frank Osgood 3 post(s)

Thanks, Antonio, but that doesn’t work either. Perhaps I’m too much of a novice to figure it out. I’ve given up on trying to use Drupal on the Mac partition of my MacBook and am using the Drupal Stack for Windows on the Windows partition.

If someone with more talent than I could program the MAMP to put a start up icon in the Mac Dock during MAMP install, that would be very helpful to those of us who are less talented.

I appreciate your attempts to help me. Thanks again.

Frank.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

I think we include a graphical interface with MAMP Stack https://bitnami.com/article/managing-your-servers-with-the-new-graphical-interface-beta

Cheers

 
Avatar geekartiste 6 post(s)

I really appreciate Joshua Preston’s contribution of the applescript. It works like a charm on my system (OS X 10.4.11, BitNami eZ publish stack). I read with regret that I could have gotten a GUI control panel if I’d installed the MAMP stack and then installed eZ publish as a module. But … I’m only a geek when compared to the average graphic designer so what I got is working so I’ll stay with what I got.

That said, I found a cool utility to add all kinds of stuff to the OS X contextual menu, including the Start/Stop servers scripts, above: OnMyCommand. Install was clean and there’s a library of hundreds of user contributed commands. Even includes a GUI editor and online tutorials to get you started.

The New Empty File Tutorial will show you how to create a basic command. Substituting the command part of Joshua’s script (the part between the quotes) for the example Terminal command and saving puts a start and stop command in Finder’s right|control click context sensitive menu.

Enjoy!

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

That is a great suggestion, thanks for posting it. I’m sure that this post will be very helpful for other bitnami users.

Forums MAMPStack