Well as written, the script sets variable PID to null, defines a function "get_pid", defines a function "start", and then exits without ever calling either function. The parameter that you passed when invoking the script is never used.
Once you correct that by inserting a call to "start" (perhaps with a test of the supplied parameter, "$1") following the function definitions, you will find that the script will run for quite a while but will eventually run out of memory due to the infinite recursion of the "start" function calling itself. Rather than doing that, you should just write the body of the "start" function as an infinite loop
Code:
while :; do
...
done
Also, if your installation includes the
pgrep command, the function "get_pid" could be deleted and the call replaced by
Code:
PID=`pgrep -x ata_pep`
See the manpage for
pgrep for details. (I'll leave the possibility of more that one "ata_pep" process running simultaneously as an exercise, but you might want to look at the "-P ppid" option of the
pgrep command.)