0

Is this the correct syntax? It seems that Upstart is starting two instances of this daemon:

start on runlevel [2345]
stop on runlevel [06]

limit nofile 32768 32768
env DISPLAY=:0
respawn

script
    [ -r /etc/default/splash ] && . /etc/default/splash
    logdir=${SPLASH_LOGDIR:-/var/log/splash}
    proxyprofilespath=${SPLASH_PROXYPROFILESPATH:-/etc/splash/proxy-profiles}
    jsprofilespath=${SPLASH_JSPROFILESPATH:-/etc/splash/js-profiles}
    maxrss=${SPLASH_MAXRSS:-$(awk '/MemTotal/{print $2*0.75/1024}' /proc/meminfo)}
    cachepath=${SPLASH_CACHEPATH:-/var/cache/splash}
    cachesize=${SPLASH_CACHESIZE:-512}  # 512MB

    chown proxy:proxy $logdir $proxyprofilespath $cachepath $jsprofilespath

# May need to figure out how to run this /usr/bin/xvfb-run --auto-servernum

    exec start-stop-daemon --start \
        --chuid proxy:proxy \
        --pidfile /var/run/splash.pid \
        --exec /usr/bin/xvfb-run /usr/bin/python -- \
            -m splash.server \
            --maxrss $maxrss \
            --logfile $logdir/splash.log \
            --proxy-profiles-path=$proxyprofilespath \
            --js-profiles-path=$jsprofilespath \
            --cache --cache-path=$cachepath --cache-size=$cachesize \
            --manhole \
            >$logdir/splash.out 2>$logdir/splash.err
end script

The ps -ef ...

proxy      701     1  0 21:45 ?        00:00:00 /bin/sh /usr/bin/xvfb-run /usr/bin/python -m splash.server --maxrss 1239.67 --logfile /var/log/splash/splash.log --proxy-profiles-path=/etc/splash/proxy-profiles --js-profiles-path=/etc/splash/js-profiles --cache --cache-path=/var/cache/splash --cache-size=512 --manhole
proxy      776   701  0 21:45 ?        00:00:05 /usr/bin/python -m splash.server --maxrss 1239.67 --logfile /var/log/splash/splash.log --proxy-profiles-path=/etc/splash/proxy-profiles --js-profiles-path=/etc/splash/js-profiles --cache --cache-path=/var/cache/splash --cache-size=512 --manhole
1
  • Maybe that's how xvfb-run works - two processes. I don't see any indication of this in the docs but I think the one without xvfb-run is a child process
    – Tony
    Feb 7, 2014 at 0:47

1 Answer 1

0

This line:
--exec /usr/bin/xvfb-run /usr/bin/python -- \
Should be:
--exec /usr/bin/xvfb-run -- /usr/bin/python \

Why? The -- seperates the command and arguments. /usr/bin/xvfb-run is the command. /usr/bin/python is the first argument to that command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .