Menu

systemd "init script"

2011-09-26
2013-01-28
  • Mark Rosenstand

    Mark Rosenstand - 2011-09-26

    Hi,

    I've been using thinkfan on my X300 for a year and a half now and really love it. Have no clue how I could live with the noise prior to that…

    Anyway, with Fedora 15 switching to systemd I've created a thinkpad.service file to replace my old init script. As a couple of other distros also has decided to convert to systemd in the future, I wanted to share it here, and if I'm lucky get it included upstream. I've read almost all existing *.service files out there in order for it to be correct. Tested on Fedora 16.

    Description=Simple fan control daemon
    After=syslog.target

    EnvironmentFile=-/etc/sysconfig/thinkfan
    ExecStart=/usr/sbin/thinkfan -n $THINKFAN_OPTIONS
    ExecReload=/bin/kill -HUP $MAINPID

    WantedBy=multi-user.target

     
  • Victor Mataré

    Victor Mataré - 2011-10-12

    oh wait, I guess THINKFAN_OPTIONS needs to be set in /etc/sysconfig/thinkfan and MAINPID is set by systemd? But then what's the minus in

    EnvironmentFile=-/etc/sysconfig/thinkfan
    
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.