#!/bin/sh

set -e

if pgrep fhem.pl >/dev/null; then
  if test -x /sbin/initctl; then
    initctl stop fhem
  else
    invoke-rc.d fhem stop
  fi
fi
