39 Commits

Author SHA1 Message Date
ducoterra
47d22200a9 log create project dir to pylogloc 2019-04-16 21:37:38 -04:00
ducoterra
b11d7b6ebc it's ok if tar gz files aren't removed 2019-04-16 21:29:40 -04:00
ducoterra
62c1e9cfc6 do not disable nginx 2019-04-16 21:27:45 -04:00
ducoterra
e8d23701e0 don't redownload python 2019-04-16 21:21:32 -04:00
ducoterra
f0333c9b27 only uninstall from usr/local/bin 2019-04-16 21:17:58 -04:00
ducoterra
9c42d31518 add uninstaller 2019-04-16 20:45:11 -04:00
ducoterra
6f47be3532 remove the right directories 2019-04-16 20:31:14 -04:00
ducoterra
456a336150 cd out of install directory 2019-04-16 20:25:26 -04:00
ducoterra
2af22596a4 clean up sqlite files 2019-04-16 17:34:26 -04:00
ducoterra
0c1542605e remove color 2019-04-16 17:26:49 -04:00
ducoterra
8e0e693fcb strip first level of sqlite and python 2019-04-16 17:26:22 -04:00
ducoterra
f4b9bdfb39 change tar name 2019-04-16 17:21:28 -04:00
ducoterra
083808394a update wget 2019-04-16 17:18:51 -04:00
ducoterra
2934d7978a don't check vars 2019-04-16 17:16:57 -04:00
ducoterra
67435af172 update python link, sqlite link 2019-04-16 17:15:52 -04:00
ducoterra
e3f0427e58 remove ufw setup 2019-04-16 17:12:03 -04:00
ducoterra
4e89aa2035 test install 2019-04-16 17:05:49 -04:00
ducoterra
0e619dd4ef add shebang 2018-12-12 21:54:26 -05:00
ducoterra
2e88de6714 add origin before ssh-agent 2018-12-03 11:52:15 -05:00
ducoterra
6342cbbd89 move git init and git remote add origin to before ssh-agen 2018-12-02 14:12:21 -05:00
ducoterra
34b929130d don't remove project dir 2018-11-25 17:43:04 -05:00
ducoterra
f3b2e4b787 try double quotes 2018-11-25 17:33:51 -05:00
ducoterra
54df19f71a fix string comparison again 2018-11-25 17:26:09 -05:00
ducoterra
ebab968766 fix string comparison 2018-11-25 17:24:51 -05:00
ducoterra
7e37fba048 check if vars filled out 2018-11-25 17:17:37 -05:00
ducoterra
adcf23c73c source vars 2018-11-25 16:44:14 -05:00
ducoterra
c686c1a915 add shebang 2018-11-25 16:39:09 -05:00
ducoterra
72139c9e63 revert changes 2018-11-25 16:38:47 -05:00
ducoterra
86dff989b6 Revert "push apt output to log"
This reverts commit 650002bfe8.
2018-11-25 16:37:33 -05:00
ducoterra
9705f3bc7b adding semi-colons 2018-11-25 16:28:12 -05:00
ducoterra
9a3a4bed6f fix [[ not found 2018-11-25 16:26:15 -05:00
ducoterra
c0ddc4cf1c chmod +x vars 2018-11-25 16:25:40 -05:00
ducoterra
6e907483a2 check root first 2018-11-25 16:21:38 -05:00
ducoterra
1f4081c6ef ./vars 2018-11-25 16:21:08 -05:00
ducoterra
21662b97f2 switch to sudo user 2018-11-25 16:20:08 -05:00
ducoterra
832386ff47 remove rogue character 2018-10-01 09:04:55 -04:00
ducoterra
650002bfe8 push apt output to log 2018-09-30 19:19:40 -04:00
ducoterra
333bf8f3c2 update with psycopg2 package dependency 2018-09-30 19:14:14 -04:00
ducoterra
7784ac5607 remove ufw 2018-09-30 18:18:16 -04:00
6 changed files with 204 additions and 277 deletions

View File

@@ -1,4 +1,4 @@
# Django Setup for Ubuntu 18.04 # Django Setup for Debian 9, Ubuntu. 18.04, and Raspbian Stretch
## Install ## Install
```bash ```bash
vim vars vim vars

View File

@@ -1,27 +1,28 @@
#!/bin/bash
################################################################################s ################################################################################s
# Dependencies # Dependencies
# Installs Dependencies automatically # Installs Dependencies automatically
################################################################################ ################################################################################
# source vars
source vars
# check if root # check if root
if [[ $EUID -ne 0 ]]; then if [ $EUID -ne 0 ] ; then
echo -e "This script must be run as root" echo -e "This script must be run as root"
exit 1 exit 1
fi fi
tput setaf 2 # source vars
source vars
echo -e "Installing dependencies" echo -e "Installing dependencies"
tput setaf 9
# create necessary dirs # create necessary dirs
if [ ! -d $logdir ] ; then if [ ! -d $logdir ] ; then
mkdir $logdir mkdir $logdir
fi fi;
# install dependencies # install dependencies
packages=(gcc wget nginx ufw make sqlite3 bzip2 openssl libffi-dev libssl-dev libsqlite3-dev zlib1g-dev libbz2-dev) echo -e "\tRunning apt update";
apt update 1> $aptlogloc 2>> $aptlogloc 3>> $aptlogloc;
for package in ${packages[@]}; for package in ${packages[@]};
do do
echo -e "\tInstalling $package" echo -e "\tInstalling $package"
@@ -32,259 +33,201 @@ do
fi fi
done done
# firewall ###############################################################################
ports=(22 80 443) # Sqlite3
for port in ${ports[@]}; # Download and setup Sqlite3 and modules
do ################################################################################
echo -e "ufw allow $port/tcp" > $firelogloc echo -e "Installing Sqlite3"
ufw allow $port/tcp 1>> $firelogloc 2>> $firelogloc
if [ ! -d sqlite ] ; then
# fetch Sqlite
wget -O sqlite.tar.gz $sqlink 1> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "\tfirewall failed to update port $port correctly. $firelogmsg" echo -e "Failed to fetch sqlite, make sure wget is installed and $pylink is what you're after. $pylogmsg"
exit 1 exit 1
fi fi
done
echo -e "\tenabling ufw" mkdir sqlite
ufw --force enable tar xf sqlite.tar.gz -C sqlite --strip-components=1 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "Failed to unzip sqlite. $pylogmsg"
exit 1
fi
fi;
cd sqlite
if [ $? -ne 0 ] ; then
echo -e "Something went wrong while unzipping. $pylogmsg"
exit 1
fi
# install Sqlite3
echo -e "\tConfigure"
./configure 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "./configure failed. $pylogmsg"
exit 1
fi
echo -e "\tMake"
make 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "make failed. $pylogmsg"
exit 1
fi
echo -e "\tMake install"
make install 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "make install failed. $pylogmsg"
exit 1
fi
cd ..
rm sqlite.tar.gz 1>> $pylogloc 2>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "\tNot removing Sqlite3 tar.gz file."
fi
################################################################################ ################################################################################
# Python # Python
# Download and setup Python and modules # Download and setup Python and modules
################################################################################ ################################################################################
tput setaf 2
echo -e "Installing Python" echo -e "Installing Python"
tput setaf 9
# fetch Python if [ ! -d python ] ; then
if [ ! -d $pyinstalldir ] ; then # if we already installed python wget -O python.tar.gz $pylink 1> $pylogloc 2>> $pylogloc 3>> $pylogloc
wget $pylink 1> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "Failed to fetch python, make sure wget is installed and $pylink is what you're after. $pylogmsg" echo -e "Failed to fetch python, make sure wget is installed and $pylink is what you're after. $pylogmsg"
exit 1 exit 1
fi fi
tar xf Python-3.7.0.tar.xz 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
mkdir python
tar xf python.tar.gz -C python --strip-components=1 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "Failed to unzip python. $pylogmsg" echo -e "Failed to unzip python. $pylogmsg"
exit 1 exit 1
fi fi
cd Python-3.7.0 fi
if [ $? -ne 0 ] ; then
echo -e "Missing python directory. $pylogmsg"
exit 1
fi
# install Python cd python
echo -e "\tConfigure" if [ $? -ne 0 ] ; then
./configure --prefix $pyinstalldir 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc echo -e "Something went wrong while unzipping. $pylogmsg"
if [ $? -ne 0 ] ; then exit 1
fi
# install Python
echo -e "\tConfigure"
./configure 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "./configure failed. $pylogmsg" echo -e "./configure failed. $pylogmsg"
exit 1 exit 1
fi fi
echo -e "\tMake"
make 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc echo -e "\tMake"
if [ $? -ne 0 ] ; then make 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "make failed. $pylogmsg" echo -e "make failed. $pylogmsg"
exit 1 exit 1
fi
echo -e "\tMake altinstall"
make altinstall 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "make altinstall failed. $pylogmsg"
exit 1
fi
fi fi
echo -e "\tMake install"
make install 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then
echo -e "make install failed. $pylogmsg"
exit 1
fi
# upgrade pip and install virtualenv # upgrade pip and install virtualenv
echo -e "\tUpgrading pip" echo -e "\tUpgrading pip"
/usr/src/python37/bin/python3.7 -m pip install --upgrade pip 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc python3 -m pip install --upgrade pip 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "pip upgrade failed. $pylogmsg" echo -e "pip upgrade failed. $pylogmsg"
exit 1 exit 1
fi fi
echo -e "\tInstalling virtualenv" echo -e "\tInstalling virtualenv"
/usr/src/python37/bin/python3.7 -m pip install virtualenv 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc python3 -m pip install virtualenv 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "installing virtualenv failed. $pylogmsg" echo -e "installing virtualenv failed. $pylogmsg"
exit 1 exit 1
fi fi
cd /root/
rm Python-3.7.0.tar.xz 1>> $pylogloc 2>> $pylogloc cd ..
rm -rf Python-3.7.0 1>> $pylogloc 2>> $pylogloc rm python.tar.gz 1>> $pylogloc 2>> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "Failed to remove Python install files. $pylogmsg" echo -e "\tNot removing Python tar.gz file."
fi fi
################################################################################ # create the sites directory
# Django echo -e "\tCreating project directory"
# Download, setup and configure Django mkdir /sites/ 1>> $pylogloc 2>> $pylogloc 3>> $pylogloc
################################################################################
tput setaf 2
echo -e "Starting Django project"
tput setaf 9
adduser $user 1> /dev/null 2> /dev/null 3> /dev/null
if [ ! -d "/home/$user" ] ; then
mkdir /home/$user
chown -R $user:$user /home/$user
fi
mkdir /home/$user/$projectname
if [ $? -ne 0 ] ; then
echo -e "Failed to create $projectname directory. $djamsg"
exit 1
fi
# virtual environment # ################################################################################
echo -e "\tCreating venv" # # Gunicorn
cd /home/$user/$projectname # # configure gunicorn.conf file
/usr/src/python37/bin/python3.7 -m virtualenv venv 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # ################################################################################
if [ $? -ne 0 ] ; then # tput setaf 2
echo -e "Failed to create virtual environment. $djamsg" # echo -e "Setting up gunicorn"
exit 1 # tput setaf 9
fi # echo -e "
source venv/bin/activate 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # [Unit]
if [ $? -ne 0 ] ; then # Description=gunicorn daemon
echo -e "Failed to source virtual environment. $djamsg" # After=network.target
exit 1
fi
# pip installs # [Service]
pips=(django gunicorn psycopg2-binary) # User=$user
for pip in ${pips[@]}; # Group=www-data
do # WorkingDirectory=/home/$user/$projectname
echo -e "\tInstalling $pip" # ExecStart=/home/$user/$projectname/venv/bin/gunicorn --workers 3 --bind unix:/home/$user/$projectname/$projectname.sock config.wsgi:application
pip install $pip 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # Environment=HOST=$hostname
if [ $? -ne 0 ] ; then
echo -e "Failed to install $pip. $djamsg"
exit 1
fi
done
if [ $usegit = False ] ; then # [Install]
# start django project in the project directory # WantedBy=multi-user.target" > /etc/systemd/system/gunicorn.service
echo -e "\tStarting django project" # echo -e "\tStarting gunicorn"
django-admin startproject config . 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # systemctl daemon-reload > $gunicornlogloc
if [ $? -ne 0 ] ; then # systemctl start gunicorn >> $gunicornlogloc
echo -e "Failed to start project $projectname with django-admin. $djamsg" # systemctl status gunicorn >> $gunicornlogloc
exit 1 # echo -e "\tEnabling gunicorn at startup"
fi # systemctl enable gunicorn 1>> $gunicornlogloc 2>> $gunicornlogloc
# update allowed hosts # ################################################################################
echo -e "echo -e sed -i 's/ALLOWED_HOSTS = []/ALLOWED_HOSTS = ['localhost', os.environ.get('HOST')'] config/settings.py" >> $djalogloc # # Nginx
# | FROM | TO | # # configure nginx
sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \['localhost', os.environ.get('HOST')\]/" config/settings.py # ################################################################################
if [ $? -ne 0 ] ; then # tput setaf 2
echo -e "Failed to change ALLOWED_HOSTS. $djamsg" # echo -e "Configuring Nginx"
exit 1 # tput setaf 9
fi # echo -e "
echo -e "echo -e STATIC_ROOT = os.path.join(BASE_DIR, 'static') >> config//settings.py" >> $djalogloc # server {
echo -e "STATIC_ROOT = os.path.join(BASE_DIR, 'static')" >> config/settings.py # listen 80;
if [ $? -ne 0 ] ; then # server_name $hostname;
echo -e "Failed to append STATIC_ROOT. $djamsg"
exit 1
fi
fi
if [ $usegit = True ] ; then # location = /favicon.ico { access_log off; log_not_found off; }
echo -e "\tCloning django project" # location /static/ {
ssh-agent bash -c 'ssh-add $gitkey 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc; # root /home/$user/$projectname;
git init 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc; # }
git remote add origin $giturl 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc;
git pull origin master 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc;'
echo -e "\tInstalling pip requirements"
pip install -r requirements.txt 1>> $gitlogloc 2>> $gitlogloc 3>> $gitlogloc
fi
# collect static, migrate # location / {
echo -e "\tCollecting static" # proxy_set_header Host \$http_host;
python manage.py collectstatic 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # proxy_set_header X-Real-IP \$remote_addr;
if [ $? -ne 0 ] ; then # proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
echo -e "Failed to collect static files. $djamsg" # proxy_set_header X-Forwarded-Proto \$scheme;
exit 1 # proxy_pass http://unix:/home/$user/$projectname/$projectname.sock;
fi # }
echo -e "\tMaking migrations" # }" > /etc/nginx/conf.d/$projectname.conf
python manage.py makemigrations 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # # set the nginx user
if [ $? -ne 0 ] ; then # if [ ! $user = "nginx" ] ; then
echo -e "Failed to make migrations. $djamsg" # sed -i "s/user nginx/user $user nginx/" /etc/nginx/nginx.conf
exit 1 # fi
fi # echo -e "\tStarting nginx"
echo -e "\tMigrating" # systemctl restart nginx >> $nginxlogloc
python manage.py migrate 1>> $djalogloc 2>> $djalogloc 3>> $djalogloc # systemctl status nginx >> $nginxlogloc
if [ $? -ne 0 ] ; then # echo -e "\tEnabling nginx"
echo -e "Failed to migrate. You do not survive the winter. $djamsg" # systemctl enable nginx 1>> $nginxlogloc 2>> $nginxlogloc
exit 1
fi
deactivate
if [ $? -ne 0 ] ; then
echo -e "Failed to deactivate virtual environment, (this may not be an issue). $djamsg"
fi
chown -R $user:$user .
if [ $? -ne 0 ] ; then
echo -e "Failed to change permissions of $projectname. $djamsg"
exit 1
fi
################################################################################ # tput setaf 2
# Gunicorn # echo -e "Done! Navigate to $hostname to access the site. Logs can be found in $logdir"
# configure gunicorn.conf file # tput setaf 9
################################################################################ # exit 0
tput setaf 2
echo -e "Setting up gunicorn"
tput setaf 9
echo -e "
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=$user
Group=www-data
WorkingDirectory=/home/$user/$projectname
ExecStart=/home/$user/$projectname/venv/bin/gunicorn --workers 3 --bind unix:/home/$user/$projectname/$projectname.sock config.wsgi:application
Environment=HOST=$hostname
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/gunicorn.service
echo -e "\tStarting gunicorn"
systemctl daemon-reload > $gunicornlogloc
systemctl start gunicorn >> $gunicornlogloc
systemctl status gunicorn >> $gunicornlogloc
echo -e "\tEnabling gunicorn at startup"
systemctl enable gunicorn 1>> $gunicornlogloc 2>> $gunicornlogloc
################################################################################
# Nginx
# configure nginx
################################################################################
tput setaf 2
echo -e "Configuring Nginx"
tput setaf 9
echo -e "
server {
listen 80;
server_name $hostname;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/$user/$projectname;
}
location / {
proxy_set_header Host \$http_host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_pass http://unix:/home/$user/$projectname/$projectname.sock;
}
}" > /etc/nginx/conf.d/$projectname.conf
# set the nginx user
if [ ! $user = "nginx" ] ; then
sed -i "s/user nginx/user $user nginx/" /etc/nginx/nginx.conf
fi
echo -e "\tStarting nginx"
systemctl restart nginx >> $nginxlogloc
systemctl status nginx >> $nginxlogloc
echo -e "\tEnabling nginx"
systemctl enable nginx 1>> $nginxlogloc 2>> $nginxlogloc
tput setaf 2
echo -e "Done! Navigate to $hostname to access the site. Logs can be found in $logdir"
tput setaf 9
exit 0

View File

@@ -1,3 +1,5 @@
#!/bin/bash
################################################################################ ################################################################################
# Performs a QUICK uninstall # # Performs a QUICK uninstall #
# - Does not uninstall dependencies # # - Does not uninstall dependencies #
@@ -7,24 +9,17 @@
# source vars # source vars
source vars source vars
# remove nginx conf # source vars
tput setaf 2 source vars
echo "Disabling nginx"
tput setaf 9
systemctl stop nginx 1> /dev/null 2> /dev/null
systemctl disable nginx 1> /dev/null 2> /dev/null
rm -f /etc/nginx/conf.d/$projectname.conf
# remove gunicorn # remove python
tput setaf 2 echo "Uninstalling Python"
echo "Uninstalling gunicorn" for dir in $(whereis python3 | tr " " "\n" | grep usr/local/bin | tr "\n" " ");
tput setaf 9 do rm -r $dir;
systemctl disable gunicorn 1> /dev/null 2> /dev/null done;
systemctl stop gunicorn 1> /dev/null 2> /dev/null
rm -f /etc/systemd/system/gunicorn.service
# remove project # remove sqlite
tput setaf 2 echo "Uninstalling Sqlite3"
echo "Removing Django project" for dir in $(whereis sqlite3 | tr " " "\n" | grep usr/local/bin | tr "\n" " ");
tput setaf 9 do rm -r $dir;
rm -rf /home/$user/$projectname done;

View File

@@ -1,3 +1,5 @@
#!/bin/bash
################################################################################ ################################################################################
# Performs a FULL uninstall # # Performs a FULL uninstall #
################################################################################ ################################################################################
@@ -5,39 +7,20 @@
# source vars # source vars
source vars source vars
# remove nginx conf
tput setaf 2
echo "Disabling nginx"
tput setaf 9
systemctl stop nginx 1> /dev/null 2> /dev/null
systemctl disable nginx 1> /dev/null 2> /dev/null
rm -f /etc/nginx/conf.d/$projectname.conf
# remove gunicorn
tput setaf 2
echo "Uninstalling gunicorn"
tput setaf 9
systemctl disable gunicorn 1> /dev/null 2> /dev/null
systemctl stop gunicorn 1> /dev/null 2> /dev/null
rm -f /etc/systemd/system/gunicorn.service
# remove project
tput setaf 2
echo "Removing Django project"
tput setaf 9
rm -rf /home/$user/$projectname
# remove python # remove python
tput setaf 2 echo "Uninstalling Python"
echo "Uninstalling python" for dir in $(whereis python3 | tr " " "\n" | grep usr/local/bin | tr "\n" " ");
tput setaf 9 do rm -r $dir;
rm -rf $pyinstalldir done;
# remove sqlite
echo "Uninstalling Sqlite3"
for dir in $(whereis sqlite3 | tr " " "\n" | grep usr/local/bin | tr "\n" " ");
do rm -r $dir;
done;
# remove yum dependencies # remove yum dependencies
tput setaf 2
echo "Uninstalling dependencies" echo "Uninstalling dependencies"
tput setaf 9
packages=(gcc wget nginx ufw make sqlite3 bzip2 openssl libffi-dev libssl-dev libsqlite3-dev zlib1g-dev libbz2-dev)
for package in ${packages[@]}; for package in ${packages[@]};
do do
echo -e "\tRemoving $package" echo -e "\tRemoving $package"

0
update.sh Normal file
View File

8
vars Normal file → Executable file
View File

@@ -1,3 +1,5 @@
#!/bin/bash
# django project settings # django project settings
export user="" export user=""
export projectname="" export projectname=""
@@ -22,5 +24,9 @@ export gitlogloc=$logdir"git.log"
export gitlogmsg="See $gitlogloc for more info." export gitlogmsg="See $gitlogloc for more info."
# python settings # python settings
export pylink="https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz" export pylink="https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz"
export sqlink="https://sqlite.org/2019/sqlite-autoconf-3280000.tar.gz"
export pyinstalldir="/usr/src/python37" export pyinstalldir="/usr/src/python37"
# don't change this by hand
export packages=(gcc wget nginx make bzip2 openssl libffi-dev libssl-dev libsqlite3-dev zlib1g-dev libbz2-dev libpq-dev);