#!/bin/bash## This file is used to set config for core when taosd crashset-e# set -xcsudo=""if command-vsudo> /dev/null;thencsudo="sudo"fi#ulimit -c unlimited${csudo}echo"ulimit -c unlimited">> /etc/profilesource /etc/profile${csudo}mkdir-p /coredump${csudo} sysctl -w kernel.core_pattern='/coredump/core-%e-%p'${csudo}echo'/coredump/core-%e-%p' | ${csudo}tee /proc/sys/kernel/core_pattern