Initial commit
[yaffs-website] / node_modules / tiny-lr / scripts / phantom-stop
1 #!/bin/bash
2
3 pidfile=tmp/phantomjs.pid
4
5 warn () {
6   echo $1
7   exit 1
8 }
9
10 [ -e $pidfile ] || warn "PhantomJS not started (no pid file found in tmp/)"
11
12 echo "Getting pid"
13 pid=$(cat $pidfile)
14
15 echo "Killing PhantomJS with pid $pid"
16 kill $pid
17
18 rm $pidfile