packages/fanctrolled: use new service functions
[openwrt/svn-archive/archive.git] / utils / fancontroled / files / fancontroled.init
1 #!/bin/sh /etc/rc.common
2
3 START=75
4 STOP=75
5
6 SERVICE_NAME="fancontroled"
7 SERVICE_COMMAND="/usr/sbin/$SERVICE_NAME"
8 SERVICE_PID_FILE="/var/run/$SERVICE_NAME.pid"
9
10 TEMP_SENSOR_CHIP=lm75
11 TEMP_READ_FIELD=temp1_input
12 MIN_TEMP=30
13 MAX_TEMP=50
14 FAN_SENSOR_CHIP=g760a
15 FAN_CONTROL_FIELD=pwm1
16 PWM_FAN_MIN=1
17 PWM_FAN_MAX=180
18
19 start() {
20 service_start $SERVICE_COMMAND -t $TEMP_SENSOR_CHIP -r $TEMP_READ_FIELD -m $MIN_TEMP -M $MAX_TEMP -f $FAN_SENSOR_CHIP -c $FAN_CONTROL_FIELD -p $PWM_FAN_MIN -P $PWM_FAN_MAX -z $SERVICE_PID_FILE
21 }
22
23 stop() {
24 service_stop $SERVICE_COMMAND
25 }