You never create a lock file. During shutdown, the stop action won't be called unless the /var/lock/subsys/<service> file exists.
To get it to work, near the top, add:
Code:
lockfile=/var/lock/subsys/TEST
Then in start, add:
Then at the end of stop, add: