#!/bin/sh case "$1" in start) touch /var/log/hunnypot.log chown nobody /var/log/hunnypot.log exec env - \ DEBUG=0 \ DBUN=dbusername \ DBPW=dbpassword \ DBSERVER=mysql.example.com \ DRIVER=mysql \ DBNAME=name \ HELONAME=hunnypot.example.com \ LISTEN_IP=0.0.0.0 \ \ /usr/local/script/hunnypot.pl >/var/log/hunnypot.log 2>&1 & ;; stop) kill -9 `ps auxc | grep hunnypot.pl | grep -v grep | awk '{ print $2 }'` ;; *) echo "usage: $0 'start|stop'" exit 1; ;; esac exit 0