2

i created a .jar executable file that when executed opens up two firefox selenium webdriver instances (two automated firefox instances) now when i execute the jar file through terminal likes this java -jar /opt/program.jar it works fine. but when i execute it through an upstart service:

program.conf

description "Desc"
author "Author"
start on filesystem
stop on shutdown

script
    export HOME="/opt"
    echo $$ > /var/run/program.pid
    exec sudo /usr/bin/java -jar /opt/program.jar
end script

pre-start script
    echo "[`date`] Starting" >> /var/log/program.log
end script

pre-stop script
    rm /var/run/program.pid
    echo "[`date`] Stopping" >> /var/log/program.log
end script

it doesn't launch any browser instances. just says

program start/running, process 14546

i would appreciate any help with how to go about doing what i am trying to do the correct way. thanks

Amit Hendin
  • 87
  • 1
  • 8

0 Answers0