Merge pull request #1574 from progrium/josegonzalez-patch-1

Ensure the user has a valid hostname set
This commit is contained in:
Jose Diaz-Gonzalez
2015-10-20 19:38:07 -04:00
2 changed files with 7 additions and 2 deletions

View File

@@ -24,6 +24,11 @@ if ! command -v apt-get &>/dev/null; then
exit 1
fi
hostname -f > /dev/null 2>&1 || {
echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
exit 1
}
apt-get update -qq > /dev/null
which curl > /dev/null || apt-get install -qq -y curl
[[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties

4
deb.mk
View File

@@ -49,7 +49,7 @@ deb-all: deb-herokuish deb-dokku deb-gems deb-plugn deb-sshcommand
deb-setup:
echo "-> Updating deb repository and installing build requirements"
sudo apt-get update -qq > /dev/null
sudo apt-get install -qq -y gcc git ruby1.9.1-dev 2>&1 > /dev/null
sudo apt-get install -qq -y gcc git ruby1.9.1-dev > /dev/null 2>&1
command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
ssh -o StrictHostKeyChecking=no git@github.com || true
@@ -127,7 +127,7 @@ deb-plugn: deb-setup
echo "-> Copying files into place"
mkdir -p /tmp/build/usr/local/bin $(GOPATH)
sudo apt-get update -qq > /dev/null
sudo apt-get install -qq -y git golang mercurial 2>&1 > /dev/null
sudo apt-get install -qq -y git golang mercurial > /dev/null 2>&1
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && cd /tmp/tmp/plugn && make deps
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && cd /tmp/tmp/plugn && go build -o plugn
mv /tmp/tmp/plugn/plugn /tmp/build/usr/local/bin/plugn