File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,4 +37,10 @@ You can then stop the fan service with:
3737
3838```
3939sudo systemctl stop pimoroni-fanshim.service
40- ```
40+ ```
41+
42+ If you need to change the threshold, hysteresis or delay you can add them as arguments to the installer:
43+
44+ ```
45+ sudo ./install-service <threshold> <hysteresis> <delay>
46+ ```
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ THRESHOLD=${1:- 36}
3+ HYSTERESIS=${2:- 2}
4+ DELAY=${3:- 2}
25SERVICE_PATH=/etc/systemd/system/pimoroni-fanshim.service
36
47read -r -d ' ' UNIT_FILE << EOF
@@ -9,7 +12,7 @@ After=multi-user.target
912[Service]
1013Type=simple
1114WorkingDirectory=$( pwd)
12- ExecStart=$( pwd) /automatic.py --threshold 36
15+ ExecStart=$( pwd) /automatic.py --threshold $THRESHOLD --hysteresis $HYSTERESIS --delay $DELAY
1316Restart=on-failure
1417
1518[Install]
@@ -24,4 +27,4 @@ echo "$UNIT_FILE" > $SERVICE_PATH
2427systemctl daemon-reload
2528systemctl enable pimoroni-fanshim.service
2629systemctl start pimoroni-fanshim.service
27- systemctl status pimoroni-fanshim.service
30+ systemctl status pimoroni-fanshim.service
You can’t perform that action at this time.
0 commit comments