18 lines
409 B
Bash
18 lines
409 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
|
||
|
task_begin "Installing Consul configuration";
|
||
|
# /etc/consul is created by the apt postinstall script
|
||
|
|
||
|
subtask_begin "Copying configuration files";
|
||
|
cp "configs/consul-client.hcl" "/etc/consul/client.hcl";
|
||
|
cp "configs/consul-server.hcl" "/etc/consul/server.hcl";
|
||
|
subtask_end "$?";
|
||
|
|
||
|
subtask_begin "Starting Consul and enabling on boot";
|
||
|
systemctl consul;
|
||
|
subtask_end "$?";
|
||
|
|
||
|
|
||
|
task_end "$?";
|