We have an automatic script on one of our servers, run by observing-user. It needs to tell another script, run by primary-user, to update a log file.
The code for this is sudo kill -UPDATE_LOG pid
Obviously, observing-user has to have permissions to run this command. However, I don't want to give this automatic script permission to kill processes, for obvious reasons.
I would like to do something like alias update_log='kill -UPDATE_LOG; grant update_log on observing_user