summaryrefslogtreecommitdiff
path: root/community/hdapsd/hdapsd.wrapper
blob: d74fd272d290c86503fdfc471612669fc69b5b66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

[ -f /etc/conf.d/hdapsd ] && source /etc/conf.d/hdapsd

OPTS="-bp"

if [ -z "${DEVICE}" ]; then
  OPTS="${OPTS} -d sda"
else
  for i in ${DEVICE[@]}; do
    OPTS="${OPTS} -d ${i}"
  done
fi

[ ! -z "${SENSITIVITY}" ] && OPTS="${OPTS} -s ${SENSITIVITY}"
[ "${ADAPTIVE}" == "yes" ] && OPTS="${OPTS} -a"
[ "${SYSLOG}" == "yes" ] && OPTS="${OPTS} -l"
[ "${FORCE}" == "yes" ] && OPTS="${OPTS} -f"

/usr/sbin/hdapsd ${OPTS}