commit: revisions to Ubuntu18LTS installer

pull/35/head
Alec Muffett 2019-07-04 09:04:02 +00:00
rodzic c3f8d12c00
commit bc4aee2851
1 zmienionych plików z 30 dodań i 19 usunięć

Wyświetl plik

@ -1,6 +1,13 @@
#!/bin/sh
apt install apt-transport-https
PACKAGES="
deb.torproject.org-keyring
nginx-extras
python-dev
python-pip
socat
tor
"
cat <<EOF | sudo dd of=/etc/apt/sources.list.d/tor.list
deb https://deb.torproject.org/torproject.org bionic main
@ -11,31 +18,35 @@ TORSIG=A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
gpg --keyserver keys.gnupg.net --recv $TORSIG || exit 1
gpg --export $TORSIG | sudo apt-key add - || exit 1
# install everything in one go
echo ""
echo "$0: if you are already running a webserver, nginx may complain about port80"
echo "$0: if such happens, do not worry, because we will soon disable nginx..."
sudo apt install -y apt-transport-https || exit 1
sudo apt update || exit 1
sudo apt install tor deb.torproject.org-keyring socat python-dev python-pip || exit 1
sudo systemctl stop tor # is there a way to install-without-enable?
sudo systemctl disable tor # we don't need the system to run it
sudo apt upgrade -y || exit 1
sudo apt install -y $PACKAGES || exit 1
sudo systemctl stop tor nginx || exit 1
sudo systemctl disable tor nginx || exit 1
# install python stuff
echo ""
echo $0: if you are already running a webserver then nginx will complain about port80, do not worry
sudo apt install nginx-extras
sudo systemctl stop nginx # is there a way to install-without-enable?
sudo systemctl disable nginx # we don't need the system to run it
# files and directories
sudo find /var/log/nginx/ -perm -0200 -print0 | sudo xargs -0 chmod g+w || exit 1
echo ""
echo $0: this will probably complain about pip versions, do not worry about it.
echo $0: this command may complain about pip versions, do not worry about it.
sudo pip install onionbalance || exit 1
# fix files and directories
sudo find /var/log/nginx/ -perm -0200 -print0 | sudo xargs -0 chmod g+w || exit 1
sudo find /usr/local/bin /usr/local/lib -perm -0400 -print0 | sudo xargs -0 chmod a+r || exit 1
sudo find /usr/local/bin /usr/local/lib -perm -0100 -print0 | sudo xargs -0 chmod a+x || exit 1
echo ""
echo IMPORTANT: some versions of Ubuntu packages are unfortunately old.
echo Because of this, when starting projects you may see messages like:
echo ">" could not open error log file: open /var/log/nginx/error.log failed
echo ...and these specific messages may be safely ignored.
echo done.
echo "$0: NOTE: Some versions of Ubuntu packages are old; because of this,"
echo "$0: when starting projects you may see messages like:"
echo ""
echo "$0: > could not open error log file: open /var/log/nginx/error.log failed"
echo ""
echo "$0: ...when using EOTK; these specific messages may be safely ignored."
echo ""
echo "$0: done"
exit 0