22 lines
668 B
SYSTEMD
22 lines
668 B
SYSTEMD
|
|
[Unit]
|
||
|
|
Description=Presence-aware IPMI fan controller (Dell R730, garage)
|
||
|
|
Documentation=https://github.com/ViktorBarzin/infra/blob/master/scripts/fan-control.sh
|
||
|
|
After=network-online.target
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=simple
|
||
|
|
EnvironmentFile=-/etc/fan-control.env
|
||
|
|
ExecStart=/usr/local/bin/fan-control
|
||
|
|
# Belt-and-suspenders: whatever happens to the daemon, hand the fans back to
|
||
|
|
# the iDRAC's own automatic curve so the box is never stuck in manual mode.
|
||
|
|
ExecStopPost=/usr/bin/ipmitool raw 0x30 0x30 0x01 0x01
|
||
|
|
Restart=on-failure
|
||
|
|
RestartSec=10
|
||
|
|
StandardOutput=journal
|
||
|
|
StandardError=journal
|
||
|
|
SyslogIdentifier=fan-control
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|