From 68c367e76a8ffa459791aea9bc86ae59f7003046 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Sat, 8 Jan 2022 21:21:28 +0530 Subject: [PATCH] add consul user to script --- consul-bootstrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consul-bootstrap.sh b/consul-bootstrap.sh index 7ce2571..36c5bee 100755 --- a/consul-bootstrap.sh +++ b/consul-bootstrap.sh @@ -19,6 +19,9 @@ elif [ "$#" -eq 1 ] && [ "$1" == "-h" ]; then exit 1 fi +# create consul user +useradd --system --home /etc/consul.d --shell /bin/false consul + # create directory if doesn't exist and set permissions mkdir -p /etc/consul.d/ && chown -R consul:consul /etc/consul.d/