set -e
if ! getent passwd regops > /dev/null; then
useradd --system --shell /usr/bin/bash regops
fi
echo "regops ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/regops
chmod 0440 /etc/sudoers.d/regops
systemctl daemon-reload
systemctl enable regops.service
systemctl start regops.service