July 2017
Intermediate to advanced
402 pages
9h 38m
English
Our upstart configuration is located in the subdirectory scripts. With your code editor, open the file scripts/helloworld.conf.
We will edit the script section of the file as follows:
script
set -a
. /usr/local/helloworld/version
mkdir -p /var/log/helloworld/
chown ec2-user:ec2-user /var/log/helloworld/
exec su --session-command="/usr/bin/node /usr/local/helloworld/helloworld.js >> /var/log/helloworld/helloworld.log 2>&1" ec2-user
end script
The first set of changes will allow us to define the HELLOWORLD_VERSION environment variable. To get there, we will add a call to set -a to force our variables to be exported and source a new file, /usr/local/helloworld/version, which ...
Read now
Unlock full access