How does freepbx restart asterisk if it crashes?

Is there script or anything?
I have a need to run post restart job.

safe_asterisk is what runs and re-runs asterisk

@aster888 - @jfinstrom answered the question you asked, but isn’t the real question “How would one add functionality to the safe_asterisk script to make sure that post-restart, some task gets executed.”

It needs to be something that will survive updates and should be something that can be added to the “altered software” search to make sure that bad actors can’t get in and mess with your system.

#EXEC=/path/to/somescript	# Run this command if Asterisk crashes

Also

#[email protected]		# Who to notify about crashes

These can be changed.

safe_asterisk is part of the Asterisk RPM and shouldn’t replace on update.

Thank you very much.