Homeassistant "addon bash" acts different, even linux commands

I am currently trying to make my own add-on for my ha (It should have been nothing more than an installation script).
This project compiles rust code (ekzhang/bore) an IP tunnel and then loops over it depending on the config. But it seems like every time tunnel exits, the entire script dies off. I have tried to replicate the issue with the terminal add-on, but it just worked, and my add-on does not.

Error: could not connect to 1.1.1.1:7835
Caused by:
    timed out
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I tried to connect my tunnel to 1.1.1.1, which should not work and did not work, but after throwing an error, the program shout retry, but it just dies.
I tried to use nohup to detach the problem, and I still got an error message, what should be impossible, so now I wonder what I can do to fix the issue.

Bash script
Repo

Any help appreciated.

Lines 87 & 89 do you really mean nohub or should they be nohup?