1

So I want to use the following in my script stanza:

forever -l >(tee $QW_LOG_DIR/webserver.log | logger -p user.info -t '[QW]') start webserver.js

However, that doesn't work for at least two reasons (I think):

1) There is a process created (the >(...) part) before my job, and so upstart will track that.

2) I am unsure why, but I get an error about the ( in the console log. Does upstart run bash? Does it support process substitution?

What's my workaround?

1

Upstart runs the script in /bin/sh. Process substitution is bash specific.

Read the upstart cookbook for more information:

  • So would it be fair to say that I need to use mkfifo in my pre-start stanza so that I can write to the fifo in my start script, thus avoid both the bash syntax and that fact that I have another process? If so, I would also need to run (tee fifo | logger ...) in the background in my pre-start. How would I end it in pre-stop? – Nitzan Shaked Oct 1 '13 at 22:05
  • I am not skilled enough in upstart to be able to answer that question. I suggest you ask that question here on superuser or on askubuntu. – lesmana Oct 2 '13 at 13:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.