You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Dominik Marciniszyn <ma...@gmail.com> on 2018/03/08 08:53:27 UTC

Specific configurations in separate folder in etc

Hi,

Is it possible to put my cfg files in for example /etc/my_conf/ and karaf
will be able to read from them?

Thank you for any help
Dominik



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Specific configurations in separate folder in etc

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Dominik,

yes, no problem.

To do so, you have to edit etc/config.properties.

Here you will find:

felix.fileinstall.enableConfigSave = true
felix.fileinstall.dir    = ${karaf.etc}
felix.fileinstall.filter = .*\\.(cfg|config)
felix.fileinstall.poll   = 1000
felix.fileinstall.noInitialDelay = true
felix.fileinstall.log.level = 3
felix.fileinstall.log.default = jul

You can add a new folder in felix.fileinstall.dir properties, for instance:

felix.fileinstall.dir=${karaf.etc},${karaf.etc}/my_conf

As your folder is a subfolder of etc, you can also use:

felix.fileinstall.subdir.mode = recurse

instead of the list of folder.

Up to you ;)

Regards
JB

On 03/08/2018 09:53 AM, Dominik Marciniszyn wrote:
> Hi,
> 
> Is it possible to put my cfg files in for example /etc/my_conf/ and karaf
> will be able to read from them?
> 
> Thank you for any help
> Dominik
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Specific configurations in separate folder in etc

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I meant ${karaf.etc}/my_conf of course ;)

Regards
JB

On 03/08/2018 10:07 AM, Jean-Baptiste Onofré wrote:
> Hi,
> 
> I advise you to use ${karaf.etc} or subdir.mode. If you want to move the etc
> folder in another location, it would move smoothly this way.
> 
> Regards
> JB
> 
> On 03/08/2018 10:00 AM, Nicolas Brasey wrote:
>> Hi,
>>
>> We are resolving this overriding the value of the property felix.fileinstall.dir
>> in the custom.properties file:
>>
>> felix.fileinstall.dir = ${karaf.etc}, /etc/my_conf
>>
>> Nicolas
>>
>>
>>
>> On Thu, Mar 8, 2018 at 9:53 AM, Dominik Marciniszyn
>> <marciniszyn.dominik@gmail.com <ma...@gmail.com>> wrote:
>>
>>     Hi,
>>
>>     Is it possible to put my cfg files in for example /etc/my_conf/ and karaf
>>     will be able to read from them?
>>
>>     Thank you for any help
>>     Dominik
>>
>>
>>
>>     --
>>     Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>     <http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html>
>>
>>
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Specific configurations in separate folder in etc

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

I advise you to use ${karaf.etc} or subdir.mode. If you want to move the etc
folder in another location, it would move smoothly this way.

Regards
JB

On 03/08/2018 10:00 AM, Nicolas Brasey wrote:
> Hi,
> 
> We are resolving this overriding the value of the property felix.fileinstall.dir
> in the custom.properties file:
> 
> felix.fileinstall.dir = ${karaf.etc}, /etc/my_conf
> 
> Nicolas
> 
> 
> 
> On Thu, Mar 8, 2018 at 9:53 AM, Dominik Marciniszyn
> <marciniszyn.dominik@gmail.com <ma...@gmail.com>> wrote:
> 
>     Hi,
> 
>     Is it possible to put my cfg files in for example /etc/my_conf/ and karaf
>     will be able to read from them?
> 
>     Thank you for any help
>     Dominik
> 
> 
> 
>     --
>     Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>     <http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html>
> 
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Specific configurations in separate folder in etc

Posted by Nicolas Brasey <ni...@gmail.com>.
Hi,

We are resolving this overriding the value of the property
felix.fileinstall.dir in the custom.properties file:

felix.fileinstall.dir = ${karaf.etc}, /etc/my_conf

Nicolas



On Thu, Mar 8, 2018 at 9:53 AM, Dominik Marciniszyn <
marciniszyn.dominik@gmail.com> wrote:

> Hi,
>
> Is it possible to put my cfg files in for example /etc/my_conf/ and karaf
> will be able to read from them?
>
> Thank you for any help
> Dominik
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>