Код: Выделить всё
#!/bin/sh
start=`/usr/local/etc/rc.d/xxx.sh start`
stat=`ps -A | grep -c xxx`
if [$stat -eq 0]
then
$start
fi
Код: Выделить всё
#!/bin/sh
start=`/usr/local/etc/rc.d/xxx.sh start`
stat=`ps -A | grep -c xxx`
if [$stat -eq 0]
then
$start
fi
Код: Выделить всё
#!/bin/sh
stat=`ps -A | grep -c xxx`
if [ $stat -eq 1 ]
then /usr/local/etc/rc.d/xxx.sh restart
fiКод: Выделить всё
#!/bin/sh
start="/usr/local/etc/rc.d/xxx.sh start" # вот тут двойные или одинарные нужны. разберись почему и что делают разные типы ковычек
stat=`ps -A | grep -c xxx`
if [$stat -eq 0]
then
$start
fi