[erlang-questions] Building a rpm from a relx release

Karol Urbanski karol.urbanski@REDACTED
Tue Jul 28 13:50:31 CEST 2015


The best way is to take a skeleton initscript (or edit an
existing one) and fill out the start/stop functions and the necessary
case statements; the initscript will act as a wrapper that calls
the start file in a way that will avoid directory errors. 

After that, if you have a properly created initscript, all you need to
do is just chkconfig to autostart your package.

Don't package the /etc/rc.d/rcN.d symlink to the initscript; instead
create a postinstall script that will use chkconfig to add it to
autostart on package install. This is simply good practice so your rpm
file listing doesn't desynch if someone removes the package from
autostart.

Best regards,
Karol Urbanski
On Tue, Jul 28, 2015 at 12:19:04PM +0100, Zachary Kessin wrote:
>    I am working on building a RPM from a relx release, and one question I have is what is the best way to setup
>    init scripts. What I want is of course for linux to start the erlang package on boot. Simply linking the normal
>    start file into /etc/init.d does not work as you get directory errors.
>    So what have people had luck with
> 
>    --
>    Zachary Kessin
>    Mostly Erlang Podcast
>    Skype: zachkessin
>    Twitter: @zkessin

> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list