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