可传参
This commit is contained in:
12
install.sh
12
install.sh
@@ -1,13 +1,21 @@
|
||||
#!/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
|
||||
cp -rf auto-fan.service /etc/systemd/system/
|
||||
|
||||
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
|
||||
systemctl start auto-fan
|
||||
|
||||
echo "Installation complete! Auto Fan is now running."
|
||||
Reference in New Issue
Block a user