How to set environment variable in pre-start in Upstart script?
问题 We have a custom C++ daemon application that forks once. So we've been doing this in our Upstart script on Ubuntu 12.04 and it works perfectly: expect fork exec /path/to/the/app However now we need to pass in an argument to our app which contains the number of CPUs on the machine on which it runs: cat /proc/cpuinfo | grep processor | wc -l Our first attempt was this: expect fork exec /path/to/the/app -t `cat /proc/cpuinfo | grep processor | wc -l` While that starts our app with the correct -t