Linux paths when starting Service Manager via systemd

Document ID : KB000111565
Last Modified Date : 17/08/2018
Show Technical Document Details
Introduction:
In this scenario, the Linux agent is started by the Service Manager. And the Service Manager again is started by systemd.

Simple Linux commands, like:
 
. ./.profile 

fail when executed by a Linux JOBS with an error message like:
 
************************************************************************ 
** ucxjlx6m version 12.2.0+build.2108 changelist 1530016094 ** 
** JOB 01131015 (ProcID:0000064225) START AT 16.08.2018 / 16:05:16 ** 
** UTC TIME 16.08.2018 / 14:05:16 ** 
** TEXT=" Job started " ** 
************************************************************************ 
/opt/uc4/agent/unix/linux/bin/../temp/JAACMJCP.TXT: line 5: env: command not found 
/usr/lib/oracle/12.2/client64 
...
/opt/uc4/agent/unix/linux/bin/../temp/JAACMJCP.TXT: line 18: ls: command not found 
************************************************************************ 
** ucxjlx6m version 12.2.0+build.2108 changelist 1530016094 ** 
** JOB 01131015 (ProcID:0000064225) ENDED AT 16.08.2018 / 16:05:16 ** 
** UTC TIME 16.08.2018 / 14:05:16 ** 
** TEXT=" Job ended " RETCODE=127 ** 
************************************************************************
Instructions:
In the configuration file for systemd, you must not use environment variables.

E.g. this will lead to above error:
 
Environment=PATH=.:/appl/uc4/local/agent/smgr/bin:$PATH 

You have to give the content of variable $PATH, not the variable name:
 
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:.:/appl/uc4/local/agent/smgr/bin"