NicolaTesla
Posts: 1
Joined: Mon Jul 13, 2020 6:15 pm

Script that start WebPage doesn't works

Mon Jul 13, 2020 6:35 pm

Hi,

I installed the MotionEye application on my rasberry pi 3 for video surveillance management.
I use Raspian Desktop to open the web page, connected to a monitor, I would like to make sure that once I log in, the MotionEye web page starts automatically.
To do this, I created a very simple script (Given my few skills), which if started manually works correctly, while inserted in crontab no, I am sure that it is started because I inserted a control that creates a file when it starts, I reported below:
#!/bin/bash
ESEC=$(sudo ps aux | grep chromium | wc -l)
echo $ESEC

if ( "$ESEC" = 1 ); then
echo " The page is closed"
sudo chromium-broswer -kiosk http://localhost:8765/
touch /homepi/script/scriptok.txt
else
echo " The page is open"
exit 0;
fi

#crontab -l
* * * * * sleep 15; /home/pi/script/avvio.sh


Can you show me how I can solve my problem?

Thanks in advance for your support
Nicola

willy_pinguino
Posts: 901
Joined: Sun Jan 22, 2017 9:11 pm

Re: Script that start WebPage doesn't works

Mon Jul 13, 2020 7:57 pm

this is a subsection of the forum, dedicated for the italian language, and here is good to write in italian language only.

In every case you can have better chance to receive some answer moving your post in the international section of this forum :)

Return to “Italiano”