I think I have the thought process incorrect in the following script can someone take a look at this please?
Code:
SERVICE=ii
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "everything is fine"
else
while false; do
ii -s irc.freenode.net -n kitche2 -k XXXXX -f "John Doe"
iipid=$!
sleep 5
echo "/j ##freebsd" > ~/irc/irc.freenode.net/in
echo "/j #infonomicon" > ~/irc/irc.freenode.net/in
echo "/j #ubuntu" > ~/irc/irc.freenode.net/in
done
fi