Merge pull request #299 from themactep/master

set watchdog timer to at least 30 seconds if core dumping enabled.
pull/302/head
Igor Zalatov 2022-07-31 00:36:19 +03:00 committed by GitHub
commit 2369e37f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 10 deletions

View File

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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

@ -13,7 +13,10 @@ load_majestic() {
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
[ "$coredump_enabled" ] && ulimit -c unlimited && echo "| /usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
if [ "$coredump_enabled" ]; then
[ "$(yaml-cli -i /etc/majestic.yaml -g .watchdog.timeout)" -lt "30" ] && yaml-cli -i /etc/majestic.yaml -s .watchdog.timeout 30
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=$?