File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 6161 echo " $opcacherest "
6262
6363 if [ " $param_restart_apache " = true ]; then
64- echo ' systemctl restart apache2'
64+ echo ' sudo systemctl restart apache2'
6565 sudo systemctl restart apache2
6666 fi
6767
68+ if [ " $param_restart_phpfpm " = true ]; then
69+ phpVer=` php -v | head -n 1 | sed -E ' s/PHP ([0-9]+\.[0-9]+).*/\1/' `
70+ echo " sudo systemctl restart \" php$phpVer -fpm\" "
71+ sudo systemctl restart " php$phpVer -fpm"
72+ fi
73+
6874 if [ " $param_restart_nginx " = true ]; then
69- echo ' systemctl restart nginx'
75+ echo ' sudo systemctl restart nginx'
7076 sudo systemctl restart nginx
7177 fi
7278
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ function showHelp()
99{
1010 cat << HEREDOC
1111
12- Usage: bash check.sh [-t pure-php slim-*]
12+ Usage: bash setup.sh [-t slim-4 symfony-8.0 ...]
13+ Usage: bash check.sh [-t pure-php slim-4 ...]
1314
1415 Optional Arguments:
1516 -h, --help Show this help message and exit
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ function showHelp()
2727 -f, --fresh Clean all frameworks and install the target framework -fresh install- before benchmark.
2828 -h, --help Show this help message and exit
2929 -rapache, --restart-apache Restart apache "sudo systemctl restart apache2" before each benchmark.
30- -rnginx, --restart-nginx Restart apache "sudo systemctl restart nginx" before each benchmark.
30+ -rfpm, --restart-fpm Restart php-fpm "sudo systemctl restart php{current-version}-fpm" before each benchmark.
31+ -rnginx, --restart-nginx Restart nginx "sudo systemctl restart nginx" before each benchmark.
3132 -t, --target Specify your target framework/s for benchmarking
3233 Separate them via space.
3334
@@ -37,6 +38,7 @@ HEREDOC
3738export param_targets=" $frameworks_list "
3839export param_fresh=false
3940export param_restart_apache=false
41+ export param_restart_phpfpm=false
4042export param_restart_nginx=false
4143
4244oldIFS=" $IFS "
5860 -rapache|--restart-apache)
5961 param_restart_apache=true
6062 ;;
63+ -rfpm|--restart-fpm)
64+ param_restart_phpfpm=true
65+ ;;
6166 -rnginx|--restart-nginx)
6267 param_restart_nginx=true
6368 ;;
You can’t perform that action at this time.
0 commit comments