Skip to content

Instantly share code, notes, and snippets.

@Satys
Created June 15, 2021 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Satys/8d6b002a5ca3ebc9040d46c2dd0bfdbc to your computer and use it in GitHub Desktop.
Save Satys/8d6b002a5ca3ebc9040d46c2dd0bfdbc to your computer and use it in GitHub Desktop.
Reload rsyslog
if [ -f /var/run/rsyslogd.pid ] && kill -TERM $(cat /var/run/rsyslogd.pid); then
/usr/sbin/rsyslogd -f /etc/rsyslog.d/rsyslog.conf
else
/usr/sbin/rsyslogd -f /etc/rsyslog.d/rsyslog.conf
fi
echo "[DEBUG] - `(date +%F\ %T)` - rsyslog daemon reload complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment