Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Im trying to get a RVM gem to run via upstart... I can't seem to get it to work:

siriserver.conf

#siriserver
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn

exec start-stop-daemon --start --exect /root/.siriproxy/siri.sh

Then my /siri.sh file is chmod ax and contains the following:

#!/bin/bash
[[ -s "home/xbmc/.rvm/scripts/rvm" ]] && . "/home/xbmc/.vrm/scripts/rvm"
siriproxy server -d 192.168.1.100 -u xbmc

My upstart log shows the following error: /usr/local/rvm/gems/ruby-2.0.0-p247/gems/siriproxy-.0.5.4/lib/siriproxy 'expand_path': non-absolute home

Thoughts?

share|improve this question

1 Answer 1

I would do a few things:

  1. Dump start-stop-daemon. Upstart largely replaces it.
  2. su into the right user from the upstart script (and move the script into /home/xbmc/)
  3. Fix the missing / in the script.

So I'd end up with something like:

start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn

exec /root/.siriproxy/siri.sh

And:

#!/bin/bash
[[ -s "/home/xbmc/.rvm/scripts/rvm" ]] && . "/home/xbmc/.vrm/scripts/rvm"
siriproxy server -d 192.168.1.100 -u xbmc
share|improve this answer
    
If i run it is a user, i get this error: Please report a bug if this causes problems. [Info - Configuration] Loading plugins -- If any fail to load, run `siriproxy b$ fatal: Not a git repository (or any of the parent directories): .git [Error - Server] Either you're not root or tcp/udp port 53 is in use. DNS serve$ [Info - Server] Starting SiriProxy on 0.0.0.0:443... –  Don Jul 12 '13 at 15:59
    
If i change the bash file to do rvmsudo siriproxy ... the log shows: [code] Warning: can not check /etc/sudoers for secure_path, falling back to call v$ export rvmsudo_secure_path=1 to avoid the warning, put it in shell initialization file to make it persistent. In case there is no secure_path in /etc/sudoers. Run: export rvmsudo_secure_path=0 to avoid the warning, put it in shell initialization file to make it persistent. sudo: no tty present and no askpass program specified [code] –  Don Jul 12 '13 at 16:00
    
@Don I didn't stop to look what siriproxy does - if it needs to bind to a low port, that's fair enough. I've put a few things back. –  Oli Jul 12 '13 at 16:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.