(Can|how do) I use $HOSTNAME
in an Ubuntu upstart script like this:
start on started foo
stop on stopped foo
exec someexecutable -n "$HOSTNAME""_bb"
(Can|how do) I use $HOSTNAME
in an Ubuntu upstart script like this:
start on started foo
stop on stopped foo
exec someexecutable -n "$HOSTNAME""_bb"
Yes, since "/etc/network/if-*.d/upstart" scripts are shell scripts, you can use an environment variable such as $HOSTNAME.
Here is what I recommend: set it first with the value you want to be sure of what is inside, like this:
HOSTNAME=`hostname -s`
exec someexecutable -n "$HOSTNAME""_bb"