erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

Pid file #476

Closed dzimi closed 7 years ago

dzimi commented 8 years ago

Hi !

What do you think about adding a functionality to the extended script which is : creating a pid file on startup? We used to have our own init.d scripts ( based on basho node_package) which checks pid file. I think it may be also useful for other applications like keepalived monit etc. ..

lrascao commented 7 years ago

sounds good, would you be interesting in making a PR for this?

lrascao commented 7 years ago

445 should take care of this ticket

lrascao commented 7 years ago

fixed via #445 @dzimi you can now specify a pid file:

{extended_start_script_hooks, [
                        {pre_start, [{custom, "hooks/pre_start"}]},
                        {post_start, [{pid, "/tmp/foo.pid"},
                                      {wait_for_process, some_process},
                                      {custom, "hooks/post_start"}]},
                        {pre_stop, [{custom, "hooks/pre_stop"}]},
                        {post_stop, [{custom, "hooks/post_stop"}]}
                    ]},