Skip to content

Commit

Permalink
Move scripts to a shared directory
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneog committed Jul 5, 2016
1 parent 5023c4a commit 5170dd7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions terraform/aws/consul.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "aws_instance" "server" {
}

provisioner "file" {
source = "${path.module}/scripts/${lookup(var.service_conf, var.platform)}"
source = "${path.module}/../shared/scripts/${lookup(var.service_conf, var.platform)}"
destination = "/tmp/${lookup(var.service_conf_dest, var.platform)}"
}

Expand All @@ -30,9 +30,9 @@ resource "aws_instance" "server" {

provisioner "remote-exec" {
scripts = [
"${path.module}/scripts/install.sh",
"${path.module}/scripts/service.sh",
"${path.module}/scripts/ip_tables.sh",
"${path.module}/../shared/scripts/install.sh",
"${path.module}/../shared/scripts/service.sh",
"${path.module}/../shared/scripts/ip_tables.sh",
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ script
# Make sure to use all our CPUs, because Consul can block a scheduler thread
export GOMAXPROCS=`nproc`

# Get the public IP
# Get the local IP
BIND=`ifconfig eth0 | grep "inet addr" | awk '{ print substr($2,6) }'`

exec /usr/local/bin/consul agent \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ then
echo "Installing Upstart service..."
sudo mkdir -p /etc/consul.d
sudo mkdir -p /etc/service
sudo chown root:root /tmp/upstart.conf
sudo chown root:root /tmp/upstart.conf
sudo mv /tmp/upstart.conf /etc/init/consul.conf
sudo chmod 0644 /etc/init/consul.conf
sudo mv /tmp/consul_flags /etc/service/consul
sudo chmod 0644 /etc/service/consul
else
echo "Installing Systemd service..."
sudo mkdir -p /etc/systemd/system/consul.d
sudo chown root:root /tmp/consul.service
sudo chown root:root /tmp/consul.service
sudo mv /tmp/consul.service /etc/systemd/system/consul.service
sudo chmod 0644 /etc/systemd/system/consul.service
sudo mv /tmp/consul_flags /etc/sysconfig/consul
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5170dd7

Please sign in to comment.