-
Notifications
You must be signed in to change notification settings - Fork 4
/
dep_ipv6.sh
90 lines (80 loc) · 3.36 KB
/
dep_ipv6.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/sh
#################################################################################
# Title: Cloudbox: Dependencies Installer (IPv6) #
# Author(s): L3uddz, Desimaniac, EnorMOZ #
# URL: https://github.com/Cloudbox/Cloudbox #
# Description: Installs dependencies needed for Cloudbox. #
# -- #
# Part of the Cloudbox project: https://cloudbox.works #
#################################################################################
# GNU General Public License v3.0 #
#################################################################################
# Usage: #
# ====== #
# curl -s https://cloudbox.works/scripts/dep_ipv6.sh | sudo sh #
# wget -qO- https://cloudbox.works/scripts/dep_ipv6.sh | sudo sh #
# #
# Custom Ansible Version: #
# curl -s https://cloudbox.works/scripts/dep_ipv6.sh | sudo sh -s <version> #
# wget -qO- https://cloudbox.works/scripts/dep_ipv6.sh | sudo sh -s <version> #
#################################################################################
## Constants
readonly PIP="9.0.3"
readonly ANSIBLE="2.5.14"
## AppVeyor
if [ "$SUDO_USER" = "appveyor" ]; then
rm /etc/apt/sources.list.d/*
rm /etc/apt/sources.list
curl https://cloudbox.works/scripts/apt-sources/xenial.txt | tee /etc/apt/sources.list
apt-get update
fi
## Environmental Variables
export DEBIAN_FRONTEND=noninteractive
## Remove IPv6 entries from systctl
sed -i -e '/^net.ipv6.conf.all.disable_ipv6/d' /etc/sysctl.conf
sed -i -e '/^net.ipv6.conf.default.disable_ipv6/d' /etc/sysctl.conf
sed -i -e '/^net.ipv6.conf.lo.disable_ipv6/d' /etc/sysctl.conf
sysctl -p
## Install Pre-Dependencies
apt-get install -y --reinstall \
software-properties-common
## Add apt repos
add-apt-repository main
add-apt-repository universe
add-apt-repository restricted
add-apt-repository multiverse
apt-get update
## Install apt Dependencies
apt-get install -y --reinstall \
nano \
git \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
python3-pip \
python-dev \
python-pip
## Install pip3 Dependencies
python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall \
pip==${PIP}
python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall \
setuptools
python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall \
pyOpenSSL \
requests \
netaddr
## Install pip2 Dependencies
python -m pip install --disable-pip-version-check --upgrade --force-reinstall \
pip==${PIP}
python -m pip install --disable-pip-version-check --upgrade --force-reinstall \
setuptools
python -m pip install --disable-pip-version-check --upgrade --force-reinstall \
pyOpenSSL \
requests \
netaddr \
jmespath \
ansible==${1-$ANSIBLE}
## Copy pip to /usr/bin
cp /usr/local/bin/pip /usr/bin/pip
cp /usr/local/bin/pip3 /usr/bin/pip3