#! /bin/bash case "$1" in start) echo "Starte p0f" /usr/sbin/p0f -l 'tcp dst port 25' 2>&1 | /usr/sbin/p0f-analyzer 2345 & ;; stop) echo "Stoppe p0f" /usr/bin/killall p0f ;; restart) echo "Restarting p0f" $0 stop && $0 start ;; status) echo "p0f Status:" /bin/ps aux |grep p0f ;; *) echo "Fehlerhafter Aufruf" echo "Syntax: $0 {start|stop|restart}" exit 1 ;; esac