1 2 3 4 5 6 7 8 9 10 11 12 13
post_install() { if ! getent group td-agent >/dev/null; then groupadd --system td-agent fi if ! getent passwd td-agent >/dev/null; then useradd --system -g td-agent --no-create-home -d /opt/td-agent td-agent fi mkdir -p /var/log/td-agent chown td-agent:td-agent /var/log/td-agent true }