Sunday, March 21, 2010

Create a upstart Task(9.10)

JOB
 -> Task ( ends by themeselves)
 -> Services (supervised by init)


http://www.linux.com/archive/feature/125977


$vim /etc/init/fun.conf
start on dofun
#stop on runlevel 016[]
script
        echo "i am having fine now:" >> /tmp/funny.txt
        echo `date` >> /tmp/funnyt.txt
end script

$ initctl emit dofun

other use of initctl for upstart init daemon
$initctl list
$initctl start/stop/status/restart/reload
Technorati Tags: , ,

No comments:

Post a Comment