Console.sh locally from custom pwd not able to acces config-file

Hi!

I find this a bit weird:

In my project I download the tar.gz of release 3.1.10 and make an RPM-package of it.

The complete RPM-instalation sets custom db-path to /var/lib/orientdb/data and log path to /var/log/orientdb/
The rest of orientdb is put in /opt/orientdb/orientdb-3.1.10

in the .bashrc file I have created $ORIENTDB_HOME="/opt/orientdb/orientdb-3.1.10" ORIENTDB_BIN="$ORIENTDB_HOME/bin" ORIENTDB_CONFIG="$ORIENTDB_HOME/config"

export PATH=$ORIENTDB_HOME:$ORIENTDB_BIN:$PATH
export ORIENTDB_HOME ORIENTDB_BIN

The server is up and running with systemd.
On https port 2480 and binary ssl port 2434

So far so good and here comes the funny part

If I stand at home dir /opt/orientdb/ and want to access /opt/orientdb/orientdb-3.1.10/bin/console.sh I can do it since it’s in my path:

    $ pwd
    /opt/orientdb
    -bash-4.2$ console.sh

    OrientDB console v.3.1.10 - Veloce (build 8921c4c075030f2c351cca85a3047aaed44f464c, branch 3.1.x) https://www.orientdb.com
    Type 'help' to display all the supported commands.
    orientdb> pwd

    Current path: /opt/orientdb
    orientdb> connect remote:localhost:2434 root
    Enter password:
    OK
    orientdb {server=remote:localhost:2434}> set server user u123456 YmvgdOty6+6T1k/IRBEy0flFSi11H+Oe *

    Error: com.orientechnologies.orient.core.exception.OConfigurationException: Cannot access to file ../config/orientdb-server-config.xml

    orientdb {server=remote:localhost:2434}> exit

Now if I want to add server user it won’t let me since it tries to go up one level and then find config/orientdb-server-config.xml file which it of course wont since my pwd is /opt/orientdb

If I go to $ORIENTDB_HOME/bin of course it works perfectly but I would want to be the “orientdb” user and invoke the “console.sh” wherever from.

I have also found that if I edit the $ORIENTDB_HOME/bin/console.sh file I can sneak in the “cd $ORIENTDB_HOME/bin” under “export $ORIENTDB_HOME” and then upon invoking console.sh the sub-process is using /opt/orientdb/orientdb-3.1.10/bin and when I exit i am still in /opt/orientdb.