I am missing something below. I keep getting unexpected end of file. What is it?
function lock_inactive_accounts {
echo "Locking inactive accounts or accounts that haven't logged in during the past 35 days."
echo " "
echo "The following accounts have been locked: "
su - postgres -c "psql database" << EOF
UPDATE users SET has_locked_account = true WHERE DATE_PART('days', now() - last_successful_login) > 35;
SELECT name from users where has_locked_account = 't';
EOF
}
lock_inactive_accounts