demo functionality check script

you need this demoLogin.php script:
 
<?phprequire_once '../api/PapApi.class.php';
$session = new Pap_Api_Session('URL_TO_DEMO/scripts/server.php');$session->login('merchant@example.com', 'demo');
echo $session->getSessionId();?>
 
and then demoTest.sh file in scripts:
 
#!/bin/bashSESSID=$(php demoLogin.php)RESULT=$(wget -qO- URL_TO_DEMO/merchants/index.php?S=$SESSID | grep 'Loading application' | wc -l)if [ $RESULT -eq 0 ] ; then    sleep(30)    RESULT=$(wget -qO- URL_TO_DEMO/merchants/index.php?S=$SESSID | grep 'Loading application' | wc -l)    if [ $RESULT -eq 0 ] ; then        OUT=$(sudo -u nobody /home/demoqua/www/pax4/scripts/resetAccount.sh)    fifi
×