Hi glemor123,
I would rather you did not ask me, and forward the question to the community instead. This script is suppose to be saved as a bash script named 'auto-restarter.sh'. Place this file inside your trunk folder, and then modify the permissions for it to be fully executable.
Once completed with these steps, simply run that bash script; and it should begin the auto-restart process if it detects a crash on either the login, map, or char servers.