Initial commit
[yaffs-website] / node_modules / tiny-lr / scripts / phantom-start
1 #!/bin/bash
2
3 WD_PORT=${WD_PORT:-9134}
4
5 pidfile=tmp/phantomjs.pid
6
7 [ -e $pidfile ] && echo "PhantomJS started. tmp/phantomjs.pid exists. Run npm run phantom-stop or remove the file." && exit 0;
8
9 echo "Starting PhantomJS WebDriver on port $WD_PORT"
10 echo "phantomjs --webdriver=$WD_PORT >> tmp/phantomjs.log &"
11 phantomjs --webdriver=$WD_PORT >tmp/phantomjs.log 2>&1 &
12 pid=$!
13
14 echo $pid > $pidfile
15
16 echo "... Waiting a bit for PhantomJS to start ..."
17 sleep 1