Skip to content

Commit

Permalink
Merge pull request #1 from ticoombs/ticoombs-debian
Browse files Browse the repository at this point in the history
Feature: Add Debian derivitives to initd service
  • Loading branch information
ticoombs committed Mar 2, 2016
2 parents 190f56e + d8ff745 commit 1698147
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions files/service/maldet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
# processname: maldet

# Source function library.
. /etc/init.d/functions
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
fi
if [ -f "/etc/sysconfig/maldet" ]; then
. /etc/sysconfig/maldet
elif [ "$(egrep ^default_monitor_mode /usr/local/maldetect/conf.maldet 2> /dev/null)" ]; then
Expand All @@ -18,7 +22,11 @@ elif [ "$(egrep ^default_monitor_mode /usr/local/maldetect/conf.maldet 2> /dev/n
fi
RETVAL=0
prog="maldet"
LOCKFILE=/var/lock/subsys/$prog
if [ -d /var/lock/subsys ]; then
LOCKFILE=/var/lock/subsys/$prog
else
LOCKFILE=/var/lock/$prog
fi

if [ -z "$MONITOR_MODE" ]; then
echo "error no default monitor mode defined, set \$MONITOR_MODE in /etc/sysconfig/maldet or \$default_monitor_mode in /usr/local/maldetect/conf.maldet"
Expand Down

0 comments on commit 1698147

Please sign in to comment.