# Automation of creating rc.d



## mallniya (Feb 10, 2016)

Hey Forum,

Lately I often need to create rc.d for a new services, and for educational purpose or thin rc.d profiling it's ok, moreover over time it takes less effort and time and result is more satisfying. But sometimes I just want a simple daemon to be ported and waste my time to do repetitive task of creating rc.d for a simple . So I wonder whether there is some automation tool that gets this task done? And I don't mean some magic tool, that does all the decision that only human being can do. I mean tool, that can at least help with rc.d building and templating to eliminate or reduce the repetitive part of the work. Thanks.


----------



## uzsolt (Feb 13, 2016)

Maybe a simple script which asks you about options and create a script using a template?


----------



## mallniya (Feb 14, 2016)

uzsolt said:


> Maybe a simple script which asks you about options and create a script using a template?


Exactly, does it exist?


----------



## uzsolt (Feb 15, 2016)

IMHO no. But you can write a simple script.


----------



## SirDice (Feb 15, 2016)

The Porter's handbook has a basic skeleton of an rc(8) script you can use:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html


----------



## mallniya (Feb 16, 2016)

Thanks folks, will seriously consider to write a script.


----------



## Atsuri (Feb 17, 2016)

mallniya said:


> Thanks folks, will seriously consider to write a script.



While in general I am against automation, especially concerning critical decisions, I am all for reducing redundancy of repetitive tasks. I think your idea to write an rc 'skeleton generator' is a good one . Good luck!


----------

