Install what I use the most, in one shot.
[dotfiles] / bootstrap_server.sh
1 #!/bin/sh
2
3 # not so well written shell script
4 # to make sure beloved packages are installed
5
6 apt-get update
7
8 # install redis
9 dpkg --get-selections | grep redis > /dev/null 2>&1
10 if [ $? -ne 0 ]; then
11 apt-get install --quiet --assume-yes redis-server
12 fi
13
14 # install emacs & tmux
15 dpkg --get-selections | grep emacs > /dev/null 2>&1
16 if [ $? -ne 0 ]; then
17 apt-get install --quiet --assume-yes emacs24-nox tmux
18 fi
19
20 # install git
21 dpkg --get-selections | grep git > /dev/null 2>&1
22 if [ $? -ne 0 ]; then
23 apt-get install --quiet --assume-yes git git-core
24 fi
25
26 # install postgres
27 dpkg --get-selections | grep postgresql > /dev/null 2>&1
28 if [ $? -ne 0 ]; then
29 apt-get install --quiet --assume-yes postgresql-contrib postgresql libpq-dev
30 fi
31
32 # install python
33 dpkg --get-selections | grep python-dev > /dev/null 2>&1
34 if [ $? -ne 0 ]; then
35 apt-get install -q -y python3 python3-doc python3-dev python-setuptools uwsgi-plugin-python
36 fi
37
38 # install image libs
39 dpkg --get-selections | grep libjpeg-dev > /dev/null 2>&1
40 if [ $? -ne 0 ]; then
41 apt-get install --quiet --assume-yes libjpeg-dev zlib1g-dev libpng12-dev
42 fi
43
44 # install blablabla
45 dpkg --get-selections | grep gcc > /dev/null 2>&1
46 if [ $? -ne 0 ]; then
47 apt-get install --quiet --assume-yes gcc make build-essential
48 fi
49
50 # install fail2ban
51 dpkg --get-selections | grep fail2ban > /dev/null 2>&1
52 if [ $? -ne 0 ]; then
53 apt-get install --quiet --assume-yes fail2ban rkhunter
54 fi
55
56 # install project requirements using pip
57 # if on on prod server, install requirements/prod.txt
58
59 # otherwise requirements/dev.txt