Hi,
as a follow up of the 2 previous posts(compiling eibd and SysV startup script) here is a sample Upstart script for the eibd daemon. Some Ubuntu based distributions uses the upstart start mechanism.
Login as root at your machine where eibd is installed and add a user under which the eibd process should run.
useradd eibd -s /bin/false -U -M
Create the upstart conf file /etc/init/eibd.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ######################################################################## eibd - startscript for the eibd daemondescription "eibd daemon Upstart script"author "Michael Albert info@michlstechblog.info"start on (filesystem or resume)stop on (suspend or runlevel [!2345])expect forknormal exit 0pre-start scriptroute add 224.0.23.12 dev eth0 2>&1 > /dev/null || trueend scriptscriptPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binDAEMON=/usr/local/bin/eibdDAEMON_OPTS="-d -D -T -R -S -i -u --eibaddr=1.1.128 ipt:192.168.56.1"exec start-stop-daemon --start -c eibd --exec $DAEMON -- $DAEMON_OPTSend scriptpost-stop scriptroute delete 224.0.23.12 2>&1 > /dev/null || trueend script####################################################################### |