[Unit] Description=Fan control for the NanoPi M4 [Service] Type=simple # Edit the directory below if you placed the Exec scripts elsewhere ExecStart=/bin/bash /usr/bin/nanopim4-pwm-fan.sh ExecStop=/bin/kill -2 $MAINPID # Restart options Restart=on-failure RestartSec=15 [Install] WantedBy=multi-user.target