summaryrefslogtreecommitdiff
path: root/sysutils/amazon-ssm-agent/pkg-install
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/amazon-ssm-agent/pkg-install')
-rw-r--r--sysutils/amazon-ssm-agent/pkg-install6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysutils/amazon-ssm-agent/pkg-install b/sysutils/amazon-ssm-agent/pkg-install
index f42d5b710f72..743ffdd91a85 100644
--- a/sysutils/amazon-ssm-agent/pkg-install
+++ b/sysutils/amazon-ssm-agent/pkg-install
@@ -2,5 +2,9 @@
if [ "$2" = "POST-INSTALL" ]; then
echo "Creating ssm-user for SSM Agent Sessions"
- pw -R ${PKG_ROOTDIR} useradd ssm-user -G wheel -m
+ if [ -n "${PKG_METALOG}" ] && \
+ pw useradd --help 2>&1 | grep -q -F -- '-M metalog'; then
+ METALOG="-M ${PKG_METALOG}"
+ fi
+ pw ${METALOG} -R ${PKG_ROOTDIR} useradd ssm-user -G wheel -m
fi