#!/bin/bash while [ 1 ]; do /usr/bin/amule-bin if [ $? -eq 0 ]; then exit 0 fi sleep 2 done