Live preview
This commit is contained in:
parent
2da3ba3e63
commit
ae54c490d5
@ -1,4 +1,4 @@
|
||||
#!/bin/bash -x
|
||||
#!/bin/bash
|
||||
|
||||
INPUT="$1"
|
||||
ID=$2
|
||||
@ -10,17 +10,15 @@ unquote(){
|
||||
URL=$(unquote $(echo $INPUT | jq .url))
|
||||
DOMAINS=`node array-to-lines.js "$(echo $INPUT | jq .third_party_domains)"`
|
||||
|
||||
echo "$DOMAINS"
|
||||
|
||||
source ./ephemeral-x.sh
|
||||
source ./annotate_header.sh
|
||||
source ./utils.sh
|
||||
|
||||
# (while true; do
|
||||
# grab_screen_to_public $ID
|
||||
# sleep 1
|
||||
# done) &
|
||||
# refresher_pid=$!;
|
||||
(while true; do
|
||||
grab_screen_to_public $ID
|
||||
sleep 1
|
||||
done) &
|
||||
refresher_pid=$!;
|
||||
|
||||
start_firefox
|
||||
grab start_firefox
|
||||
@ -36,8 +34,6 @@ grab open_network_inspector
|
||||
declare -a pids;
|
||||
pids=()
|
||||
|
||||
echo DOMAINS: "$DOMAINS"
|
||||
|
||||
|
||||
index=0
|
||||
mkdir -p "/opt/static/$ID"
|
||||
@ -71,7 +67,7 @@ while IFS= read -r DOMAIN; do
|
||||
done
|
||||
done <<< "$DOMAINS"
|
||||
|
||||
# kill $refresher_pid;
|
||||
kill $refresher_pid;
|
||||
|
||||
echo "starting wait..."
|
||||
|
||||
|
@ -102,10 +102,9 @@ load_website(){
|
||||
printf "."
|
||||
scrot
|
||||
times=$((times + 1))
|
||||
if [ $times -eq 60 ]
|
||||
if [ $times -eq 30 ]
|
||||
then
|
||||
echo "Could not load website in time"
|
||||
exit 1;
|
||||
echo "Could not load website in time, trying anyway"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
|
4
index.js
4
index.js
@ -24,6 +24,10 @@ function attach(docker_id, output_stream) {
|
||||
output_stream.push(d);
|
||||
console.log("DATA!", d.toString());
|
||||
});
|
||||
task.stderr.on("data", (d) => {
|
||||
/* output_stream.push(d); */
|
||||
console.log("STDERR!", d.toString());
|
||||
});
|
||||
task.stdout.on("error", (d) => {
|
||||
output_stream.push(d);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user