alou-S / omen-fan

Utility to control fans in Omen laptops
GNU General Public License v3.0
49 stars 5 forks source link

Can you help me find out what's wrong with the service file I wrote? #9

Closed Initsnow closed 3 months ago

Initsnow commented 3 months ago

Hi,I wrote a service file to start the script at system startup,but when I run it, it won't work

[Unit]
Description=control fan speed
After=network.target

[Service]
User=root
WorkingDirectory=/usr/local/bin
ExecStart=bash -c "python3 /usr/local/bin/omen-fan.py e 1"
Type=simple

[Install]
WantedBy=multi-user.target
5月 20 12:55:34 astrid-popos systemd[1]: Started control fan speed.
5月 20 12:55:34 astrid-popos bash[11207]:   WARNING: BIOS Fan Control Disabled
5月 20 12:55:34 astrid-popos bash[11207]:   omen-fan service has been started
5月 20 12:55:34 astrid-popos systemd[1]: omen-fan.service: Deactivated successfully.
  Service Status : Stopped
  BIOS Control : Disabled
  Fan 1 : 0 RPM
  Fan 2 : 0 RPM
Initsnow commented 3 months ago

OK, I know what's wrong.I need set Type to forking to let script create a daemon process.