How to pass the PATH variable to Bamboo when running it as a systemd service in RedHat Enterprise Linux 7
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
Problem
When running Bamboo as a systemd service in RedHat Enterprise Linux (RHEL) 7 the PATH variable will not be automatically inherited by the Bamboo process.
This happens due to an OS restriction since systemd will not pass the PATH variable available for that user to any process started from it unless you explicitly pass the variable.
Resolution
Add and environment directive to your service passing the PATH values you want:
1. Edit the systemd configuration file for Bamboo
vi /usr/lib/systemd/system/bamboo.service
2. Add the following environment directive:
Environment=PATH=/opt/location_of_your_executable
3. Reload Daemon
systemctl daemon-reload
4. Restart Bamboo
systemctl stop bamboo; systemctl start bamboo