add coredump config check

pull/236/head
cronyx 2022-06-15 19:35:45 +03:00
parent d1aa19942a
commit ae77282d05
9 changed files with 27 additions and 0 deletions

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?

View File

@ -12,6 +12,9 @@ load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
if [ $(grep ^savedumps /etc/coredump.config | cut -d= -f2) == "true" ]; then
ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?