Skip to content

Commit

Permalink
individual binary
Browse files Browse the repository at this point in the history
  • Loading branch information
jyr committed Jan 14, 2011
1 parent 025931d commit cd0d56e
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 18 deletions.
19 changes: 19 additions & 0 deletions init/php-fpm.sh
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
18 changes: 0 additions & 18 deletions init/start.sh
Original file line number Diff line number Diff line change
@@ -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
Binary file added init/startMySQL
Binary file not shown.
7 changes: 7 additions & 0 deletions init/startMySQL.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
system("sh /Applications/MEMP/init/mysql.sh start");
return 0;
}
Binary file added init/startNginx
Binary file not shown.
7 changes: 7 additions & 0 deletions init/startNginx.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
system("sh /Applications/MEMP/init/nginx.sh start");
return 0;
}
Binary file added init/startPHP
Binary file not shown.
7 changes: 7 additions & 0 deletions init/startPHP.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
system("sh /Applications/MEMP/init/php-fpm.sh start");
return 0;
}
Binary file added init/stopMySQL
Binary file not shown.
7 changes: 7 additions & 0 deletions init/stopMySQL.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
system("sh /Applications/MEMP/init/mysql.sh stop");
return 0;
}
Binary file added init/stopNginx
Binary file not shown.
7 changes: 7 additions & 0 deletions init/stopNginx.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <stdio.h>

int main()
{
system("sh /Applications/MEMP/init/nginx.sh stop");
return 0;
}
Binary file added init/stopPHP
Binary file not shown.
7 changes: 7 additions & 0 deletions init/stopPHP.c
Original file line number Diff line number Diff line change
@@ -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.