How to stop running init hook, in case of failure?

I have the following init hook which will exit with error code 1

#!/bin/bash

echo "Error. Exiting"
exit 1

When I run this package, following is the output I am getting. How can I stop the "init" hook from running again in case of a failure?

example.default(SR): Initializing
example.default hook[init]:(HK): Error. Exiting
example(HK): Initialization failed! 'init' exited with status code 1
example.default(SR): Initializing
example.default hook[init]:(HK): Error. Exiting
example(HK): Initialization failed! 'init' exited with status code 1
example.default(SR): Initializing
example.default hook[init]:(HK): Error. Exiting
example(HK): Initialization failed! 'init' exited with status code 1
example.default(SR): Initializing
example.default hook[init]:(HK): Error. Exiting
example(HK): Initialization failed! 'init' exited with status code 1
example.default(SR): Initializing
example.default hook[init]:(HK): Error. Exiting

Hi @yellolad,

The supervisor will continue to retry the init hook until it succeeds. If you want it to stop, you need to either unload the package or stop the supervisor.

Matt