why there's no output on my screen? ubuntu upstart event
I added a new file test.conf to /etc/init/, content as below:
start on test stop on shutdown console output exec echo hello and I used "initctl emit laji" to trigger it but no console output. what am i doing wrong? |
Why "laji"? Your event is called "test". Also this example it is rather a task and not service, so "task" keyword should be included.
|
sorry for my mistake, event name is "test".
is the term "task" necessary? start on test task console output exec echo hello is the above correct? i'm using windows and thus cann't try it out. |
Task is not neccessary in this situation, but your executed command is a task (start, do what must do and end) as opposed to service, which start on event emit and stop on event stop condition. You can get unexpected behavior. For example when you add later "respawn" ("echo" will respawn forever).
This is correct and should work. |
All times are GMT -5. The time now is 11:21 PM. |