forked from AzuraCast/AzuraCast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
37 lines (28 loc) · 922 Bytes
/
install.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
#!/usr/bin/env bash
while test $# -gt 0; do
case "$1" in
--dev)
APP_ENV="development"
shift
;;
*)
break
;;
esac
done
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ansible|grep "install ok installed")
echo Checking for Ansible: $PKG_OK
. /etc/lsb-release
if [ "" == "$PKG_OK" ]; then
sudo apt-get update
sudo apt-get install -q -y software-properties-common
sudo add-apt-repository -y ppa:ansible/ansible
# if [ $DISTRIB_RELEASE = "14.04" ]; then
# sudo add-apt-repository -y ppa:fkrull/deadsnakes-python2.7
# fi
sudo apt-get update
sudo apt-get install -q -y python2.7 python-pip python-mysqldb ansible
fi
APP_ENV="${APP_ENV:-production}"
echo "Installing AzuraCast (Environment: $APP_ENV)"
ansible-playbook util/ansible/deploy.yml --inventory=util/ansible/hosts --extra-vars "app_env=$APP_ENV"