Mercurial > vanilla
comparison system/smartmontools/smartd @ 1026:3dfef64b81c1
vanilla: update all init scripts
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 29 Aug 2019 20:34:00 +0200 |
parents | 657ee4987f4d |
children |
comparison
equal
deleted
inserted
replaced
1025:21a87230c8a1 | 1026:3dfef64b81c1 |
---|---|
25 : ${SMARTD_ARGS:=} | 25 : ${SMARTD_ARGS:=} |
26 : ${SMARTD_PID:=/var/run/smartd.pid} | 26 : ${SMARTD_PID:=/var/run/smartd.pid} |
27 | 27 |
28 smartd_start() | 28 smartd_start() |
29 { | 29 { |
30 echo "Starting smartd: $SMARTD_CMD $SMARTD_ARGS" | 30 if [ -s $SMARTD_PID ]; then |
31 $SMARTD_CMD $SMARTD_ARGS -p $SMARTD_PID | 31 echo "smartd is already running with pid: $(cat $SMARTD_PID)" |
32 else | |
33 echo "Starting smartd: $SMARTD_CMD $SMARTD_ARGS" | |
34 $SMARTD_CMD $SMARTD_ARGS -p $SMARTD_PID | |
35 fi | |
32 } | 36 } |
33 | 37 |
34 smartd_status() | 38 smartd_status() |
35 { | 39 { |
36 if [ -s $SMARTD_PID ]; then | 40 if [ -s $SMARTD_PID ]; then |
37 echo "smartd is running with pid: `cat $SMARTD_PID`" | 41 echo "smartd is running with pid: $(cat $SMARTD_PID)" |
38 else | 42 else |
39 echo "smartd is not running" | 43 echo "smartd is not running" |
40 fi | 44 fi |
41 } | 45 } |
42 | 46 |