Make it possible to install dbmarlin in arbitary place

👍 Gathering votes
Lennart Jonsson

I get the impression that dbmarlin assumes that it is installed in /opt/dbmarlin (anyhow I got into trouble when I tried to use another directory). It would be nice if one could choose the location, or at least choose where postgres data resides. I can imagine that /opt is not dimensioned to hold an extra n00Gb of data for some installations. I had some space over in lvm so I added a new partition /opt/dbmarlin, but it may be a problem in certain setups.

It should be fairly easy to have a variable that points to /opt/dbmarlin and use that. It could then be easily overridden. I found 28 occurrences of /opt/dbmarlin:

find . -type f | xargs grep -I /opt/dbmarlin | wc -l
28

1 year ago

Activity
Mick Mcguinness

Hi Lennart, it is possible to install in another directory other than /opt/dbmarlin. If you do then I think then the number of files containing /opt/dbmarlin would be fewer.

There are still some files where it is compiled in at build time since postgres for example needs to have default log and conf directories built into the binaries but they can then be overridden at runtime.

If I run this find command below on a machine where dbmarlin is instialled not under /opt/dbmarlin I find references to it in the postgres libs which are compile-time defaults but overridden at runtime. I see it in the systemd and init.d scripts which are just examples to be customised as per the docs. The place I would maybe not expect to see references would be the nginx and tomcat log files so I will take a look at that.

find . -type f | xargs grep -I /opt/dbmarlin -l

./nginx/logs/nginx-error.log
./postgresql/lib/pkgconfig/libpq.pc
./postgresql/lib/pkgconfig/libpgtypes.pc
./postgresql/lib/pkgconfig/libecpg.pc
./postgresql/lib/pkgconfig/libecpg_compat.pc
./postgresql/lib/pgxs/src/Makefile.global
./tomcat/logs/catalina.out
./scripts/systemd/dbmarlin-nginx.service
./scripts/systemd/dbmarlin-postgresql.service
./scripts/systemd/dbmarlin-tomcat.service
./scripts/init.d/dbmarlin-nginx
./scripts/init.d/dbmarlin-postgresql
./scripts/init.d/dbmarlin-tomcat

0    1 year ago    Reply

Comment must be at least 20 characters.
Cancel
One vote
Categories
Enhancement