From 39a1a114c3b842e3e77154d5dc534712425272db Mon Sep 17 00:00:00 2001 From: aixiao Date: Wed, 6 Jun 2018 16:40:52 +0800 Subject: [PATCH] 20180606 --- gpio/info.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gpio/info.sh b/gpio/info.sh index 3612cc9..784bb84 100644 --- a/gpio/info.sh +++ b/gpio/info.sh @@ -48,7 +48,7 @@ function INIT() bindir="/root/gpio"; ! test -d ${bindir} && exit 1; - . conf/info.conf + . ${bindir}/conf/info.conf #时间 y=$(date "+%y"); @@ -228,6 +228,17 @@ case ${ai} in #exit case $OPTARG in "stop") + case $3 in + "wind") + kill $(cat ${bindir}/log/wind_daemon.pid) 2> ${null} + kill $(cat ${bindir}/log/wind.pid) 2> ${null} + exit 1; + ;; + "light") + kill `cat ${bindir}/log/light.pid` 2> ${null} + exit 1; + ;; + esac array=$(ls ${bindir}/log/) for arr in ${array[@]}; do kill $(cat ${bindir}/log/${arr}) &> ${null}