#!/usr/bin/env bash

set -e

. ${0%/*}/_functions.sh

# disable kernel logging since docker has no rights to access kernel

replaceLine "imklog" "# module(load=\"imklog\")" /etc/rsyslog.conf

# fixing rsyslog reload after logrotate
sed -i "s/reload rsyslog.*/[ -s \/var\/run\/rsyslogd.pid ] \&\& kill -HUP \`cat \/var\/run\/rsyslogd.pid\`/g" /etc/logrotate.d/rsyslog