diff --git a/abra.sh b/abra.sh index 06c9c6d..20bf968 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export CUSTOM_ENTRYPOINT_VERSION=v16 +export CUSTOM_ENTRYPOINT_VERSION=v17 export OIDC_CONF_VERSION=v1 export PAM_EXEC_OAUTH2_YAML_VERSION=v1 export PAM_SCRIPT_AUTH_VERSION=v7 diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index 7b74ffc..9d88316 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -28,9 +28,21 @@ cp /opt/users/group /etc/group || true copy_users() { while true; do - cp -u /etc/passwd /opt/users/passwd - cp -u /etc/shadow /opt/users/shadow - cp -u /etc/group /opt/users/group + if [ /etc/passwd -nt /opt/users/passwd ]; then + cp -uv /etc/passwd /opt/users/passwd + else + cp -uv /opt/users/passwd /etc/passwd + fi + if [ /etc/shadow -nt /opt/users/shadow ]; then + cp -uv /etc/shadow /opt/users/shadow + else + cp -uv /opt/users/shadow /etc/shadow + fi + if [ /etc/group -nt /opt/users/group ]; then + cp -uv /etc/group /opt/users/group + else + cp -uv /opt/users/group /etc/group + fi sleep 60 done }