-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_posBuddy.sh
executable file
·38 lines (26 loc) · 1.13 KB
/
install_posBuddy.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
#!/bin/bash
clear
echo "-------------------------------------------------------"
echo "INSTALLING PosBuddy via Ansible on Raspberry Pi or local"
echo "-------------------------------------------------------"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ansible|grep "install ok installed")
echo Checking for ansible: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "No ansible installed. Setting up ansible."
sudo apt-get --force-yes --yes install ansible
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' cowsay|grep "install ok installed")
echo Checking for cowsay: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "No cowsay installed. Setting up cowsay."
sudo apt-get --force-yes --yes install cowsay
fi
## Insert this with your credentials in your.profile
## Do this if you want do build your own HeatingControl Version
#export DOCKERHUB_USERNAME="Billy Idol"
#export DOCKERHUB_PASSWORD="whiteWedding"
cowsay "Starting Ansible Playbook"
# default inatallation on remote RPI
#ansible-playbook $1 install_posBuddy.yml -i inv_rpiPosBuddy
# use this, if you install on localhost
ansible-playbook $1 install_posBuddy.yml -i inv_local -K