Lines 10-16
Link Here
|
10 |
# to enable this service: |
10 |
# to enable this service: |
11 |
# |
11 |
# |
12 |
# honeytrap_enable (bool): Set to NO by default. |
12 |
# honeytrap_enable (bool): Set to NO by default. |
13 |
# Set it to YES to enable honeytrap. |
13 |
# Set it to YES to enable honeytrap. |
|
|
14 |
# honeytrap_user (bool): Set to YES by default. |
15 |
# Set it to NO to run service root. |
14 |
# honeytrap_datadir (path): Set to %%PREFIX%%/libdata/honeytrap |
16 |
# honeytrap_datadir (path): Set to %%PREFIX%%/libdata/honeytrap |
15 |
# by default. |
17 |
# by default. |
16 |
# honeytrap_config (path): Set to %%PREFIX%%/etc/honeytrap.toml |
18 |
# honeytrap_config (path): Set to %%PREFIX%%/etc/honeytrap.toml |
Lines 24-29
Link Here
|
24 |
load_rc_config $name |
26 |
load_rc_config $name |
25 |
|
27 |
|
26 |
: ${honeytrap_enable:="NO"} |
28 |
: ${honeytrap_enable:="NO"} |
|
|
29 |
: ${honeytrap_user:="YES"} |
27 |
: ${honeytrap_datadir="%%PREFIX%%/libdata/honeytrap"} |
30 |
: ${honeytrap_datadir="%%PREFIX%%/libdata/honeytrap"} |
28 |
: ${honeytrap_config="%%PREFIX%%/etc/honeytrap.toml"} |
31 |
: ${honeytrap_config="%%PREFIX%%/etc/honeytrap.toml"} |
29 |
|
32 |
|
Lines 35-41
Link Here
|
35 |
|
38 |
|
36 |
honeytrap_start() |
39 |
honeytrap_start() |
37 |
{ |
40 |
{ |
38 |
daemon -o /var/log/honeytrap/service.log -p $pidfile -u $name $honeytrap_program $honeytrap_flags |
41 |
if checkyesno honeytrap_user; then |
|
|
42 |
user="-u $name" |
43 |
else |
44 |
user="" |
45 |
fi |
46 |
daemon -o /var/log/honeytrap/service.log -p $pidfile $user $honeytrap_program $honeytrap_flags |
39 |
} |
47 |
} |
40 |
|
48 |
|
41 |
run_rc_command "$@" |
49 |
run_rc_command "$@" |