This allows the ssm-agent user to be created when installing as an unprivileged user. That is, if the package is installed with pkg(8)'s METALOG option set, the home directory for ssm-agent will be added to the metalog. PR: 290080 Approved by: cperciva (maintainer) Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc.
11 lines
290 B
Bash
11 lines
290 B
Bash
#!/bin/sh
|
|
|
|
if [ "$2" = "POST-INSTALL" ]; then
|
|
echo "Creating ssm-user for SSM Agent Sessions"
|
|
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
|