Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supervisord: How to use the hostname in a startup command

Tags:

supervisord

is it possible to somehow use the local hostname in a supervisord startup script? I need it to pass the jmx host to a java-Program. Example:

command=HOSTNAME=foo.bar /usr/local/rvm/bin/jruby-1.7.1 script/trinidad.rb --threadsafe -f config/trinidad_user_production.rb

I see no easy option so far.

Best,

Tobias

like image 308
Tobias Avatar asked Dec 26 '22 10:12

Tobias


1 Answers

For using hostname in the config file:

%(host_node_name)s

like image 50
Joseph Avatar answered Feb 05 '23 18:02

Joseph