Simple answer is to use exitcheck.sh as your shutdown/reboot command. However beware that there is a small issue with only using exitcheck.sh to shut down, a backup is NOT performed, you must manually run "filetool.sh backup" before exitcheck.sh.
The cause of the issue is that at the top of exitcheck.sh the backup is only run if the file /tmp/do_backup is present, which is created by the exittc gui if the box is checked or the env var BACKUP = 1. The problem here is that if X is not running, then the exittc gui cannot be run and /tmp/do_backup is not touched.