When running pre/post scripts, it is possible that you are getting the following error message:
2017-03-20 19:43:43 avtar Info <5916>: Executing run-at-start ‘/usr/local/avamar/etc/scripts/test.sh’
2017-03-20 19:43:43 avtar Info <6033>: Begin STDERR from run-at-start:
avspawn::spawn after execve errno:8 code 8: Exec format error
In order to resolve that, ensure that you specified the interpreter as first line.
So it should start with, for example:
#!/bin/sh