Problem with upstart script - recognition of PID to track

Steffen Barszus steffenbpunkt at googlemail.com
Mon Mar 29 14:08:21 BST 2010


Hi !

i'm trying to write an upstart script for vdr (http://www.tvdr.de).

In order to start the daemon i first need to get a list of options for
the daemon.

part of the typical list of options (this is $PLUGIN from below)

  -P "graphtft -d none" -P text2skin -P iptv -P "suspendoutput " -P
  "skinsoppalusikka --logodir=/usr/share/vdr-xpmlogos" -P
  streamdev-server -P avolctl -P markad -P extrecmenu -P skinelchi -P
  quickepgsearch -P conflictcheckonly -P menuorg -P externalplayer -P
  channellists -P epgsearchonly -P "live --port=8008 --ip=0.0.0.0" -P
  wirbelscan -P "radio --files=/usr/share/vdr-plugin-radio
  --live=/usr/share/vdr-plugin-radio/rtextUnten-kleo2-live.mpg
  --replay=/usr/share/vdr-plugin-radio/rtextUnten-kleo2-replay.mpg
  --encrypted=0 --verbose=1" -P "xine -r" -P epgsearch -P femon

In order to get the quoting right i use eval in the script section.
Like that the daemon start - but upstart is refering to wrong pid.

Is there any way i can fill this variables in pre-start and hand over
to the start section ? Is there any other way to tell upstart what the
correct pid is ? The pid option doesn't seem to exist (anymore? I'm
using karmic)

Thanks

Steffen

PS:the job as of now:

start on (filesystem and
           net-device-up IFACE=*[0123456789])

stop on runlevel [016]

respawn
kill timeout 5

script

. /root/vdr-config-loader
. /root/vdr-plugin-loader
. /usr/lib/vdr/commands-loader.sh

mergecommands "commands"
mergecommands "reccmds"

export LANG LC_ALL
eval /usr/bin/vdr -v $VIDEO_DIR -c $CFG_DIR -L $PLUGIN_DIR -r $REC_CMD
-s $VDRSHUTDOWN -E $EPG_FILE -u $USER -g /tmp --port $SVDRP_PORT
$OPTIONS $PLUGINS $REDIRECT &>> /tmp/test-vdr.log
end script




More information about the upstart-devel mailing list