StuPro-TOSCAna/stupro_toscana_vorprojekt

Executor must transfer util scripts to ssh machine and add them to PATH

Closed this issue · 3 comments

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.

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

Somehow i cant get above solution to work. We should simply copy the util scripts to a directory contained in 'secure path'.

Commit ba48c1d should fix this.
The files (sourcePath still pending) will be moved onto the machine and placed in /usr/local/bin/ which adds them to PATH as well as secure path