-redo of some roles, particularly GUI -modifications to support working from a "Raspbian Lite" install
22 lines
470 B
Bash
22 lines
470 B
Bash
#!/bin/bash
|
|
# generate facebook traffic by loading random help url's
|
|
|
|
#launch browser on local display
|
|
function launch_browser {
|
|
DISPLAY=:0 /usr/bin/chromium-browser `shuf -n 1 /home/pi/Documents/facebook_url.list` &
|
|
}
|
|
|
|
#prevent race condition/memory exhaustion
|
|
if pgrep -f chromium-browser >/dev/null
|
|
then
|
|
exit 0
|
|
else
|
|
for i in $(seq 13)
|
|
do
|
|
launch_browser
|
|
sleep 10
|
|
done
|
|
sleep 30 && /usr/bin/killall chromium-browser && /usr/bin/killall chromium-browser-v7
|
|
fi
|
|
|