OklahomaGreyBeard / eversolar-monitor

Automatically exported from code.google.com/p/eversolar-monitor
0 stars 0 forks source link

Specify eversolar ini file location from the command line #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I've tried $ perl /home/pi/eversolar-monitor/eversolar.pl 
/home/pi/eversolar-monitor/eversolar.ini etc

What is the expected output? What do you see instead?
I was hoping to be able to start the pearl script and specify the ini file 
location without having to cd /home/pi/eversolar-monitor where the ini file is.

What version of the product are you using? On what operating system?
Raspbian on a B+ RPi

How do I specify where the eversolar.ini file exists when starting from the 
command line?

i.e. I've tried $ perl /home/pi/eversolar-monitor/eversolar.pl 
/home/pi/eversolar-monitor/eversolar.ini etc, but I cannot get it to work 
unless I do the following:

cd /home/pi/eversolar-monitor perl eversolar.pl

I don't know enough about perl to be able to decipher the eversolar.pl file, 
but it seems to me that I shouold be able to specify where the eversolar.ini 
file exists via the command line when starting the monitor?

Regards,

Steve.

(Multiple TL1500-AS inverters work OK).

Original issue reported on code.google.com by wot...@gmail.com on 15 Nov 2014 at 2:45

Attachments:

GoogleCodeExporter commented 8 years ago
We agree that the source code should accept the ini file as a command 
parameter. 

I've looked at the code, and I can't see anything that shoule be wrong, but 
that is probably an issue with my skills, and the limited testing I have access 
to presently.

Meanwhile, what is keeping you from starting the perl script in the right 
directory? This is how most people set up their system, and that is how mine is 
set up - we had a few power outages, so we learned about the benefit of 
autostart.

Henrik

Original comment by henrik.m...@gmail.com on 19 Nov 2014 at 5:43

GoogleCodeExporter commented 8 years ago
Hi Henrik,

At the moment I just have a bash script that is run automatically at startup 
and it does the job.

If I could start the perl script from anywhere by including the path to the ini 
file I can use the daemontools program svc to supervise, start & stop the perl 
script.

Regards,

Steve.

Original comment by wot...@gmail.com on 20 Nov 2014 at 2:22