Install fan script

Sorry if this has been covered before, but I can’t seem to find anything on this. I’m a noob to HA and I can’t figure out how to install a fan script in HA OS. I have a Naspi case from Geekworm that requires a Python script to control the fan and on/off, reset button. I installed HA OS , then the ssh plugin, but can not seem to install it. Can someone point me to some docs.
Thank You

Script below:
cd ~
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y git pigpio
sudo apt-get install -y python-pigpio python3-pigpio
sudo apt-get install -y python-smbus python3-smbus
git clone GitHub - geekworm-com/x-c1: This is the safe shutdown script and python pwm fan control sample code.
cd x-c1
sudo chmod +x *.sh
sudo bash install.sh
echo “alias xoff=‘sudo /usr/local/bin/x-c1-softsd.sh’” >> ~/.bashrc
sudo reboot

Installing software on HAOS in unsupported, and it doesn’t support apt anyway, afaik.
You would have to create an integration or an addon for this (or find existing ones).

For the fan, you can use this topic : Controlling a CPU/case fan with GPIO PWM based on CPU temperature