Cgate / Raspbian -trouble running as a daemon

Discussion in 'C-Gate Developers' started by jonw, Oct 21, 2013.

  1. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    Hi guys,

    I'm running cgate on my raspberry pi. When started from the command line using "sudo java -jar cgate.jar" It runs fine, but when started from an init script it fails to find the config file.

    I assume this is because the environment that the init script runs in doesn't know the current path, even though I have "cd /usr/local/bin/cgate" at the beginning of the script. Any idea how I get the script to set the environment up correctly?

    Alternatively, is there a way I can pass the config file location to the jar in the command line?

    Cheers,

    Jon
     
    jonw, Oct 21, 2013
    #1
  2. jonw

    jonw

    Joined:
    Sep 25, 2013
    Messages:
    13
    Likes Received:
    0
    Location:
    Lane Cove
    jonw, Oct 23, 2013
    #2
  3. jonw

    zei20t

    Joined:
    Aug 18, 2010
    Messages:
    130
    Likes Received:
    1
    Location:
    Sydney, Australia
    thanks for the link!

    looks like someones beat me to the pi doco :)
     
    zei20t, Oct 25, 2013
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.