PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` #!/bin/sh # Copyright (C) 2019 Checkmk GmbH - License: Checkmk Enterprise License # This file is part of Checkmk (https://checkmk.com). It is subject to the terms and # conditions defined in the file COPYING, which is part of this source code package. HOMEDIR="/var/lib/cmk-agent" usage() { cat >&2 </dev/null 2>&1; then # check that the existing user is as expected existing="$(getent passwd "cmk-agent")" existing="${existing#cmk-agent:*:*:*:}" expected="${comment}:${HOMEDIR}:${usershell}" if [ "${existing}" != "${expected}" ]; then echo "cmk-agent user found: expected '${expected}'" >&2 echo " but found '${existing}'" >&2 fi unset existing expected else useradd \ --comment "${comment}" \ --system \ --home-dir "${HOMEDIR}" \ --no-create-home \ --user-group \ --shell "${usershell}" \ "cmk-agent" || exit 1 user_is_new="yes" fi # Create home directory manually instead of doing this on user creation, # because it might already exist with wrong ownership mkdir -p ${HOMEDIR} chown -R cmk-agent:cmk-agent ${HOMEDIR} if [ "${user_is_new}" ]; then _allow_legacy_pull _issue_legacy_pull_warning fi unset homedir comment usershell } main "$@"