<div dir="ltr"><div>Zack,</div><div><br></div><a href="https://github.com/basho/node_package">https://github.com/basho/node_package</a> has templates you can use, even if you don't use the entire thing (since it relies on reltool, not relx).</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 6:50 AM, Karol Urbanski <span dir="ltr"><<a href="mailto:karol.urbanski@erlang-solutions.com" target="_blank">karol.urbanski@erlang-solutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The best way is to take a skeleton initscript (or edit an<br>
existing one) and fill out the start/stop functions and the necessary<br>
case statements; the initscript will act as a wrapper that calls<br>
the start file in a way that will avoid directory errors.<br>
<br>
After that, if you have a properly created initscript, all you need to<br>
do is just chkconfig to autostart your package.<br>
<br>
Don't package the /etc/rc.d/rcN.d symlink to the initscript; instead<br>
create a postinstall script that will use chkconfig to add it to<br>
autostart on package install. This is simply good practice so your rpm<br>
file listing doesn't desynch if someone removes the package from<br>
autostart.<br>
<br>
Best regards,<br>
Karol Urbanski<br>
<span class="">On Tue, Jul 28, 2015 at 12:19:04PM +0100, Zachary Kessin wrote:<br>
>    I am working on building a RPM from a relx release, and one question I have is what is the best way to setup<br>
>    init scripts. What I want is of course for linux to start the erlang package on boot. Simply linking the normal<br>
>    start file into /etc/init.d does not work as you get directory errors.<br>
>    So what have people had luck with<br>
><br>
>    --<br>
>    Zachary Kessin<br>
</span><span class="">>    Mostly Erlang Podcast<br>
>    Skype: zachkessin<br>
</span>>    Twitter: @zkessin<br>
<br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>