This $(ls -d...) does not work in a systemd unit file:
[Service]
Type=forking
Environment="ORACLE_HOME=$(ls -d /usr/lib/oracle/*/client64 | sort -rV | head -n1)"
Environment="TNS_ADMIN=$(ls -d /usr/lib/oracle/*/client64/lib/network/admin | sort -rV | head -n1)"
I want to avoid hard-coding the Oracle client version (at the moment 19.19), to simplify updates. When I install a new Oracle client, I don't want to have to modify the systemd unit file.
How can I achieve that? I use RHEL9 if that matters.