Permalink
Browse files

individual binary

  • Loading branch information...
1 parent 025931d commit cd0d56e03a8fc4a475b2135eff73c9d6b7013a3a @jyr committed Jan 14, 2011
View
@@ -1,11 +1,30 @@
#/bin/sh
+__create_alias( ) {
+ if [ ! -d "/usr/local/mysql" ]; then
+ ln -s /Applications/MEMP/Library/mysql /usr/local/mysql
+ fi
+}
+
+__set_privilegies( ) {
+ chown -R mysql:mysql /usr/local/mysql/
+ chown -R mysql:mysql /Applications/MEMP/tmp/mysql
+}
+
+__export_library( ){
+ export DYLD_LIBRARY_PATH=/Applications/MEMP/Library/lib:$DYLD_LIBRARY_PATH
+}
+
__show_usage( ) {
echo "Usage: ${0} {start|stop|quit|restart|reload|logrotate}"
exit 3
}
+__create_alias
+__set_privilegies
+__export_library
+
case "${1}" in
start|stop|quit|restart|reload|logrotate)
/Applications/MEMP/Library/php/sbin/php-fpm ${1}
View
@@ -1,27 +1,9 @@
#/bin/sh
-__create_alias( ) {
- if [ ! -d "/usr/local/mysql" ]; then
- ln -s /Applications/MEMP/Library/mysql /usr/local/mysql
- fi
-}
-
-__set_privilegies( ) {
- chown -R mysql:mysql /usr/local/mysql/
- chown -R mysql:mysql /Applications/MEMP/tmp/mysql
-}
-
-__export_library( ){
- export DYLD_LIBRARY_PATH=/Applications/MEMP/Library/lib:$DYLD_LIBRARY_PATH
-}
-
__init( ) {
sh /Applications/MEMP/init/php-fpm.sh start
sh /Applications/MEMP/init/mysql.sh start
sh /Applications/MEMP/init/nginx.sh start
}
-__create_alias
-__set_privilegies
-__export_library
__init
View
Binary file not shown.
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ system("sh /Applications/MEMP/init/mysql.sh start");
+ return 0;
+}
View
Binary file not shown.
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ system("sh /Applications/MEMP/init/nginx.sh start");
+ return 0;
+}
View
Binary file not shown.
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ system("sh /Applications/MEMP/init/php-fpm.sh start");
+ return 0;
+}
View
Binary file not shown.
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ system("sh /Applications/MEMP/init/mysql.sh stop");
+ return 0;
+}
View
Binary file not shown.
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ system("sh /Applications/MEMP/init/nginx.sh stop");
+ return 0;
+}
View
Binary file not shown.
View
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+ system("sh /Applications/MEMP/init/php-fpm.sh stop");
+ return 0;
+}

0 comments on commit cd0d56e

Please sign in to comment.