While trying to troubleshoot an Access Gateway issue using strace we ran into an error.
strace -f -t -i -v -o strace.log -s 16384 ./sps-ctl startssl
strace: exec: Exec format error
Typically this means the script is missing a shell reference at the start, such as
#!/bin/ksh or #!/bin/sh
There might also be an issue if the path used on the system doesn't match, so if ksh is not actually located in /bin for example.
But by adding $SHELL to the command, we tell the command to use the default user shell and it will eliminate the exec error.
strace -f -t -i -v -o strace.log -s 16384 $SHELL ./sps-ctl startssl