Compare commits

...

2 Commits

Author SHA1 Message Date
Leonardo Grasso
7637ccd7a8 update(scripts): update Falco description
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-25 11:28:11 +02:00
Leonardo Grasso
40635ab620 fix(scripts): run modprobe before starting Falco
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2020-08-25 11:24:12 +02:00
2 changed files with 8 additions and 8 deletions

View File

@@ -21,7 +21,7 @@
# Required-Stop: $remote_fs $syslog # Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: Falco syscall activity monitoring agent # Short-Description: Falco Cloud Native runtime security
# Description: Falco is a system activity monitoring agent # Description: Falco is a system activity monitoring agent
# driven by system calls with support for containers. # driven by system calls with support for containers.
### END INIT INFO ### END INIT INFO
@@ -62,11 +62,11 @@ do_start()
# 0 if daemon has been started # 0 if daemon has been started
# 1 if daemon was already running # 1 if daemon was already running
# 2 if daemon could not be started # 2 if daemon could not be started
if [ ! -d /sys/module/falco ]; then
/sbin/modprobe falco || exit 2
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1 || return 1
if [ ! -d /sys/module/falco ]; then
/sbin/modprobe falco || exit 1
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \ $DAEMON_ARGS \
|| return 2 || return 2

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2019 The Falco Authors. # Copyright (C) 2020 The Falco Authors.
# #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,10 +18,10 @@
# #
# #
# falco syscall monitoring agent # Falco Cloud Native runtime security
# #
# chkconfig: 2345 55 45 # chkconfig: 2345 55 45
# description: Falco syscall monitoring agent # description: Falco Cloud Native runtime security
# #
### BEGIN INIT INFO ### BEGIN INIT INFO
@@ -52,10 +52,10 @@ start() {
[ -x $exec ] || exit 5 [ -x $exec ] || exit 5
# [ -f $config ] || exit 6 # [ -f $config ] || exit 6
echo -n $"Starting $prog: " echo -n $"Starting $prog: "
daemon $exec --daemon --pidfile=$pidfile
if [ ! -d /sys/module/falco ]; then if [ ! -d /sys/module/falco ]; then
/sbin/modprobe falco || return $? /sbin/modprobe falco || return $?
fi fi
daemon $exec --daemon --pidfile=$pidfile
retval=$? retval=$?
echo echo
[ $retval -eq 0 ] && touch $lockfile [ $retval -eq 0 ] && touch $lockfile