简单的弄一下。因为有时候要改配置,然后打开mamp,点击重启会耗时特别长。。。。所以简单的弄了一下
XML/HTML代码
- #!/bin/bash
- function start(){
- /Applications/MAMP/Library/bin/httpd -f "/Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf" -k start
- }
- function stop(){
- /Applications/MAMP/Library/bin/httpd -f "/Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf" -k stop
- }
- function restart(){
- (stop)
- (start)
- }
- function status(){
- ps aux|grep httpd
- }
- echo "which do you want to?input the number."
- echo "1. start"
- echo "2. stop"
- echo "3. restart"
- echo "4. status"
- read num
- case "$num" in
- [1] ) (start);;
- [2] ) (stop);;
- [3] ) (restart);;
- [4] ) (status);;
- *) echo "exit";;
- esac
其实没啥难度就是这么几行代码。连路径都没有定义变量。但一般情况下够用了,复制不成功的,可以直接打开://neatstudio.com/mamp.txt