In this question, a response details that
com.apple.loginwindow login hooks can be used to run script as root on user login.
I have followed the instructions by using
sudo defaults write com.apple.loginwindow LoginHook /Users/Shared/Test.sh
except nothing is executed on login. My script makes use of a small background process and nothing else and works by typing it into my terminal so I am lead to believe that it simply isn't possible anymore.
If this method (as it is already deprecated) no longer works, are there any method that currently work for running login scripts as root?