Merge pull request #17387 from mauriciofauth/session-cookie-samesite-php72
[phpmyadmin.git] / test / stop-local-server
blobd7fb884e06340cfd234b5fbaadbd69807ab3d3a7
1 #!/bin/sh
3 # Do not run as CGI
4 if [ -n "$GATEWAY_INTERFACE" ] ; then
5 echo 'Can not invoke as CGI!'
6 exit 1
7 fi
9 set -e
10 set -x
12 if [ "$CI_MODE" != "selenium" ] ; then
13 echo "Not in CI_MODE=selenium"
14 exit 0
17 SELENIUM_TEMPDIR="$(cat /tmp/last_temp_dir_phpMyAdminTests)"
19 if [ ! -z "$TESTSUITE_BROWSERSTACK_KEY" ] ; then
20 # Stop BrowserStack Local forwarder
21 ~/browserstack/BrowserStackLocal --daemon stop
24 if [ -f ~/selenium-standalone.pid~ ] ; then
25 # Stop selenium-standalone server
26 kill $(cat ~/selenium-standalone.pid~)
27 rm ~/selenium-standalone.pid~
30 if [ ! -z "${SELENIUM_TEMPDIR}" ] && [ -f "${SELENIUM_TEMPDIR}/nginx.pid" ]; then
31 # Stop nginx server
32 kill $(cat "${SELENIUM_TEMPDIR}/nginx.pid")
35 if [ ! -z "${SELENIUM_TEMPDIR}" ] && [ -f "${SELENIUM_TEMPDIR}/php-fpm.pid" ]; then
36 # Stop php-fpm server
37 kill $(cat "${SELENIUM_TEMPDIR}/php-fpm.pid")
40 if [ ! -z "${SELENIUM_TEMPDIR}" ] && [ -d "${SELENIUM_TEMPDIR}" ]; then
41 # Delete the temporary folder
42 rm -rf "${SELENIUM_TEMPDIR}"
43 echo "Deleted temporary dir: ${SELENIUM_TEMPDIR}"