mirror of https://github.com/fail2ban/fail2ban
BF: gentoo-initd assure /var/run dir + remove stale sock file
Gentoo Bug #347477 Picked up from http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/fail2ban/files/gentoo-initd_create_run_dir.patch?view=markuppull/8/head
parent
eda7efbca3
commit
c48c2b19a0
|
@ -31,6 +31,14 @@ depend() {
|
|||
|
||||
start() {
|
||||
ebegin "Starting fail2ban"
|
||||
if [ ! -d /var/run/fail2ban ]; then
|
||||
mkdir /var/run/fail2ban || return 1
|
||||
fi
|
||||
if [ -e /var/run/fail2ban/fail2ban.sock ]; then
|
||||
# remove stalled sock file after system crash
|
||||
# bug 347477
|
||||
rm -rf /var/run/fail2ban/fail2ban.sock || return 1
|
||||
fi
|
||||
${FAIL2BAN} start &> /dev/null
|
||||
eend $? "Failed to start fail2ban"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue