#!/bin/sh

###############################################
# Sourcing macros
DIRNAME=/usr/bin/dirname
. `$DIRNAME $0`/../lib/psmacros
###############################################

PATH="$PS_VAR_DIR/netletd.pid."

for j in $PATH* ; do
  conf_name=`echo $j | $SED -e "s#$PATH##"`
  port=`$CAT $j | $GREP "port" | $SED -e "s/port=//"`
  ${BASE_DIR}/$PS_PRODUCT_DIR/bin/checkport localhost $port $1
  if [ $? -eq 1 ]; then
    ${BASE_DIR}/$PS_PRODUCT_DIR/bin/netletd -n $conf_name start
  fi
done

