Page 1 of 1

Error Keeping VRS running by cron

Posted: Wed Oct 17, 2018 11:04 am
by Hardy
Hello to all,
I am referring to: Re: Keep VRS running after closing telnet session
Post by argz » 27. Dec 2016, 12:38

Prior the cron "installation" VRS works just perfect, Silhouettes and Flags are loading almost instantly.
I followed the instructions to starts VRS during Boot.
But... The VRS Main page loads very, very slow the Silhouettes and Flags.
The WebAdmin Plugin keeps asking for the Username and Password.
Erasing (crontab -e) the entry @reboot /home/pi/vrs.sh,
Rebooting and starting VRS manualy by "mono /home/pi/vrs/VirtualRadar.exe -nogui" and everything works perfect as before.
(Maybe the VRS loads during Boot to quickly and RPI is not yet ready).

I am using RaspianStrechLight-4.14.50-v7 and the latest VRS & Plugins.
And I am an absolute beginner.
Any Ideas?
Best Regards – Hardy

Re: Error Keeping VRS running by cron

Posted: Thu Oct 18, 2018 2:09 pm
by Hardy
I have to correct :
Starting VRS via crontab or rc.local makes no change.
VRS does not display Silhouettes or Flags.
VRS WebAdmin keeps asking for Password.
If I start VRS manually (Putty) then VRS works normal.

Re: Error Keeping VRS running by cron

Posted: Fri Oct 19, 2018 11:51 am
by Hardy
Update:

I have been playing around and noticed the following:
I have a script called vrs.sh :
#!/bin/sh
echo "Hallo, Starting mono VRS"
echo "Hallo Hardy starting mono & VRS" > /tmp/vrs.txt
mono /home/pi/vrs/VirtualRadar.exe –nogui

If I invoke the script as following from PuTTY: bash vrs.sh
everything looks & works normal.

If I invoke the script as following from PuTTY: sudo bash vrs.sh
then the Silhouettes & Flags are not displayed and the WebAdmin Plugin is not working.

I think I have screwed something up with some privileges, but I don’t know where to look and how to fix it up.

Best regards
Hardy

Re: Error Keeping VRS running by cron

Posted: Fri Oct 19, 2018 6:47 pm
by Datamix
try:

Code: Select all

chmod +x vrs.sh
and then run it again

Re: Error Keeping VRS running by cron

Posted: Sat Oct 20, 2018 8:09 am
by Hardy
thanks for your sugestion,
sudo chmod +x vrs.sh
makes no change.

Re: Error Keeping VRS running by cron

Posted: Sat Oct 20, 2018 9:03 am
by Datamix
do not use "sudo" in this case. user "pi" should be able to execute it.

Re: Error Keeping VRS running by cron

Posted: Sat Oct 20, 2018 10:14 am
by Hardy
i am geting:
pi@raspberrypi:~ $ chmod +x vrs.sh
chmod: changing permissions of 'vrs.sh': Operation not permitted
pi@raspberrypi:~ $

Re: Error Keeping VRS running by cron

Posted: Fri Nov 09, 2018 4:30 pm
by agw
Sorry for the delay in replying. If you do

Code: Select all

ls -l vrs.sh
who owns the file? I imagine it's probably not the pi user. If you

Code: Select all

sudo chown pi vrs.sh
and then try chmod +x vrs.sh then that should give you execute permission on the file.

Re: Error Keeping VRS running by cron

Posted: Thu Mar 14, 2019 7:34 pm
by Raffles
Hardy wrote:
Sat Oct 20, 2018 10:14 am
i am geting:
pi@raspberrypi:~ $ chmod +x vrs.sh
chmod: changing permissions of 'vrs.sh': Operation not permitted
pi@raspberrypi:~ $

enter

Code: Select all

sudo -i  
first
as pi privs are very strange on raspian