#!/bin/bash echo "Installing Auto Fan..." echo "Cleaning up old files..." systemctl stop auto-fan rm -rf /opt/Auto_Fan rm -rf /etc/systemd/system/auto-fan.service echo "Copying new files..." mkdir -p /opt/Auto_Fan cp -rf dist/fan /opt/Auto_Fan/ chmod +x /opt/Auto_Fan/fan echo "Setting up systemd service..." rm -rf /dev/shm/fan_status.json cp -rf auto-fan.service /etc/systemd/system/ systemctl daemon-reload systemctl enable auto-fan systemctl start auto-fan echo "Installation complete! Auto Fan is now running."