gaenserich / hostsblock

an ad- and malware-blocking script for Linux
https://github.com/gaenserich/hostsblock
225 stars 28 forks source link

install.sh broken #87

Closed ohnonot closed 6 years ago

ohnonot commented 6 years ago

I've been using hostsblock on archlinux, installed via aur, no major problems.
today i tried to install it on ubuntu, "the easy way".

basically everything failed.

  1. it seems the group hostsblock already existed on my computer, and the installation failed. so i exited the script and created user & group hostsblock manually, then re-ran install.sh. however, $HOMEDIR is defined only if user hostsblock does not exist yet! the script later happily (and silently) installed config files into the root directory /.

  2. even worse, $DESTDIR is not checked for being an existing directory, only making sure it's not zero length, but that twice. why not use [ -d "$d" ] && [ -w "$d" ] here??? i must have accidenatlly input some garbage, because the script then happily (and silently) installed executables into the root directory /.

frankly, considering that hostsblock itself is a bash script, i am appalled.

gaenserich commented 6 years ago

Thanks for letting me know. Give the latest git version a try.

Should be resolved by f0738805676d3ded67e730e9b0b22d45387fb6dd