#!/bin/bash if [ $(pidof muchsync) ]; then echo "Checkmail is already running." else echo "Checking for new mail" muchsync muchsync1.local fi