diff options
Diffstat (limited to 'security/honeytrap/files/honeytrap.in')
-rw-r--r-- | security/honeytrap/files/honeytrap.in | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/security/honeytrap/files/honeytrap.in b/security/honeytrap/files/honeytrap.in new file mode 100644 index 000000000000..7c4e383026e7 --- /dev/null +++ b/security/honeytrap/files/honeytrap.in @@ -0,0 +1,41 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: honeytrap +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# honeytrap_enable (bool): Set to NO by default. +# Set it to YES to enable honeytrap. +# honeytrap_datadir (path): Set to %%PREFIX%%/var/lib/honeytrap +# by default. +# honeytrap_config (path): Set to %%PREFIX%%/etc/honeytrap.toml +# by default. + +. /etc/rc.subr + +name=honeytrap +rcvar=honeytrap_enable + +load_rc_config $name + +: ${honeytrap_enable:="NO"} +: ${honeytrap_datadir="%%PREFIX%%/var/lib/honeytrap"} +: ${honeytrap_config="%%PREFIX%%/etc/honeytrap.toml"} + +start_cmd="$name_start" + +honeytrap_program="%%PREFIX%%/bin/honeytrap" +honeytrap_flags="--data $honeytrap_datadir --config $honeytrap_config" +pidfile=/var/run/${name}.pid + +honeytrap_start() +{ + daemon -p $pidfile -u $name $honeytrap_program $honeytrap_flags +} + +run_rc_command "$1" |