InstallScript icon indicating copy to clipboard operation
InstallScript copied to clipboard

Lower privilege for setup

Open tresf opened this issue 6 years ago • 2 comments

  • sudo isn't need for wget
  • sh prevents needing chmod
  • odoo_install.sh asks for credentials naturally

tresf avatar May 02 '18 01:05 tresf

@tresf,

Thanks for the PR / ideas. For the sudo: this is because some people try to do this in a folder where they have not enough rights, sudo will always 'win' in this case. For the second part, I never tried the differences so I'll try it as soon as possible to check. thanks!

Yenthe666 avatar May 02 '18 07:05 Yenthe666

For the sudo: this is because some people try to do this in a folder where they have not enough rights, sudo will always 'win' in this case.

No they don't. Please don't spread this stuff around, it's simply incorrect. A terminal defaults to ~, moving forward you should always write your scripts to honor that. Never run something as sudo that doesn't need root access to the system. All this does is create a file that can't be easily deleted in a user's home directory and that's wrong. 😃

For the second part, I never tried the differences so I'll try it as soon as possible to check. thanks!

For the record, the script fails on Ubuntu 14.04 and the others I've found on the internet seem to fail as well. It may be worth porting the repo to Circle-CI or Travis-CI or something to make sure it works. This process was quite involved so I ended up installing Odoo on Windows just to try it out (still struggling there as well, but that's another topic).

But please move away from sudo. It has no place in a wget call that places something in ~.

tresf avatar May 02 '18 13:05 tresf