Executor must transfer util scripts to ssh machine and add them to PATH
Closed this issue · 3 comments
hnicke commented
A static folder (basically its content, bunch of shell scripts) must be transfered to every machine right after establishing initial connection. They need to be available within implementation artifacts.
export PATH="$PATH:/path/to/folder/with/scripts" <-- put this into $HOME/.profile
problem: when using sudo (ubuntu only) you cant access youre old path, but the definde 'secure path' (some scripts need to be performed as root)
solution: Additionally to above PATH extension, this 'secure path' must be modified in /etc/sudoers.
hnicke commented
I couldnt find a quick and easy way to change the secure path in the sudoers file; instead, you could use this workaround:
> touch $HOME/.bash_aliases
> echo 'alias sudo="PATH=$PATH sudo"' >> $HOME/.bash_aliases
hnicke commented
Somehow i cant get above solution to work. We should simply copy the util scripts to a directory contained in 'secure path'.