Added more exit codes

This commit is contained in:
deajan 2014-05-23 23:47:34 +02:00
parent c3f5534c64
commit c40462d4c6
1 changed files with 6 additions and 1 deletions

View File

@ -92,9 +92,11 @@ status() {
if [ ! -f $pidfile-* ]
then
echo "Cannot find any running osync instance."
exit
exit 1
fi
errno=0
for pfile in $pidfile-*
do
if ps -p$(cat $pfile) > /dev/null 2>&1
@ -102,8 +104,11 @@ status() {
echo "$prog instance $(basename $pfile) is running (pid $(cat $pfile))"
else
echo "$pfile is dead but lockfile exists."
$errno=1
fi
done
exit $errno
}
case "$1" in