#!/bin/bash mpd_running=$(ps ax |grep mpd |grep -v mpd) if [ ! -n $mpd_running ]; then echo "mpd is running" else echo "mpd is not running" fi