File updated with set_php_bin_path_in_shell should be customizable

kristian

Verified User
Joined
Nov 4, 2005
Messages
490
Location
Norway
With set_php_bin_path_in_shell enabled (default since 1.62.0), PATH updates are added to ~/.bash_profile on debian, even when this file does not exist, but ~/.profile does. Default in Debian is from what I can tell having a ~/.profile and not a ~/.bash_profile. When DirectAdmin writes to ~/.bash_profile, this means that ~/.profile is no longer read by the shell, and the contents in it are then skipped. This in turn means other files are not sourced, and in my case, my prompt fails to load some bash completion functions.

I can see the usefulness of having the PATH added, but I wish that this mechanism was a bit more clever. Changing the default shell profile behaviour is not a good idea.

One option is to make the filename to change a configuration value somewhere. Another would be to not add to ~/.bash_profile if that file does not exist, but ~/.profile does. In that case, add to the latter instead.

This feature and related are described in:
 
For now, I've created .bash_profile in /etc/skel/ with pretty much the same content as .profile, to avoid the shell environment breaking when DirectAdmin adds content to .bash_profile.
 
Back
Top