#!/bin/sh

if [ -d /run/systemd/system ] && systemctl is-active --quiet rsyslog.service 2>/dev/null; then
	systemctl kill -s HUP --kill-whom=main rsyslog.service
elif command -v sv >/dev/null 2>&1 && sv status rsyslog >/dev/null 2>&1; then
	sv hup rsyslog
else
	invoke-rc.d rsyslog rotate > /dev/null 2>&1 || true
fi
