| Server IP : 193.86.120.172 / Your IP : 216.73.216.67 Web Server : Apache/2.4.63 (Unix) System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64 User : kubec ( 1026) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/syno/sbin/ |
Upload File : |
#!/bin/bash
ISPKG=false
TIMESTAMP=/tmp/syslog-ng-timestamp
CheckSyslog() {
if /bin/systemctl is-active pkgctl-LogCenter ;then
ISPKG=true
/bin/systemctl is-active pkg-LogCenter-syslog
else
ISPKG=false
/bin/systemctl is-active syslog-ng
fi
return $?
}
case $1 in
check)
if [ -f /tmp/syslog-ng-sigbus ]; then
/bin/rm -f /tmp/syslog-ng-sigbus
if ! CheckSyslog; then
# Send notification daily
if [ ! -f $TIMESTAMP ]; then
/bin/echo 0 > $TIMESTAMP
fi
last_time=$(cat $TIMESTAMP)
now_time=$(date +%s)
if [ $(( now_time - last_time )) -gt 86400 ];then
/usr/syno/bin/synonotify LogCenterServiceFailed '{"%SERVICE%": "SYSLOG"}'
logger -p user.err "Unable to start syslog-ng"
/bin/echo "$now_time" > $TIMESTAMP
fi
if [ "$ISPKG" = "true" ]; then
/usr/syno/bin/synosystemctl restart pkg-LogCenter-syslog
else
/usr/syno/bin/synosystemctl restart syslog-ng
fi
exit 0
fi
fi
/usr/syno/sbin/syno_syslog_check_ctl --stop
exit 0
;;
esac