[NCP] Cron - logrotate error

Hi forum,

I am on NextcloudPi 1.9.1 on an Odroid HC2 (nc-ramlogs is activated). My cron job throws the following error message via mail:

**Cron <root@nextcloudpi> /usr/lib/armbian/armbian-truncate-logs**

logrotate_script: 2: logrotate_script: invoke-rc.d: not found
error: error running non-shared postrotate script for /var/log.hdd/syslog of '/var/log.hdd/syslog
'
logrotate_script: 2: logrotate_script: invoke-rc.d: not found
error: error running shared postrotate script for '/var/log.hdd/mail.info
/var/log.hdd/mail.warn
/var/log.hdd/mail.err
/var/log.hdd/mail.log
/var/log.hdd/daemon.log
/var/log.hdd/kern.log
/var/log.hdd/auth.log
/var/log.hdd/user.log
/var/log.hdd/lpr.log
/var/log.hdd/cron.log
/var/log.hdd/debug
/var/log.hdd/messages
'

Certain webpages hint that this happens due to a false $PATH variable regarding the cron job, but I haven´t changed anything and this behaviour started only two weeks ago.
Invoke-rc.d is located in /usr/sbin:
$ sudo ls -al /usr/sbin
-rwxr-xr-x 1 root root 18110 May 2 2017 invoke-rc.d

The e-mail header refers to the following file:

**$ sudo nano /usr/lib/armbian/armbian-truncate-logs**
#!/bin/sh
#
# Copyright (c) Authors: http://www.armbian.com/authors
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
#
# truncate, save and clean logs if they get over 75% of the /var/log size
# working only when armbian-ramlog is enabled

treshold=75 # %

[ -f /etc/default/armbian-ramlog ] && . /etc/default/armbian-ramlog

[ "$ENABLED" != true ] && exit 0

logusage=$(df /var/log/ --output=pcent | tail -1 |cut -d "%" -f 1)
if [ $logusage -ge $treshold ]; then
                # write to SD
                /usr/lib/armbian/armbian-ramlog write >/dev/null 2>&1
                # rotate logs on "disk"
                chown root.root -R /var/log.hdd
                /usr/sbin/logrotate --force /etc/logrotate.conf
                # truncate
                /usr/bin/find /var/log -name '*.log' -or -name '*.xz' -or -name 'lastlog' -or -name 'messages' -or -$
                /usr/bin/find /var/log -name 'btmp' -or -name 'wtmp' -or -name 'faillog' | xargs truncate --size 0
                # remove
                /usr/bin/find /var/log -name '*.[0-9]' -or -name '*.gz' | xargs rm >/dev/null 2>&1

fi

The mentioned files syslog and mail.info are present:
$ sudo ls -al /var/log.hdd
total 1540
drwxr-xr-x 12 root root 4096 Mar 9 06:25 .
drwxr-xr-x 14 root root 4096 Sep 15 19:50 …

-rw-r----- 1 root adm 0 Nov 24 07:25 mail.err
-rw-r----- 1 root adm 115678 Mar 9 02:29 mail.info
-rw-r----- 1 root adm 2753 Mar 9 02:29 mail.log
-rw-r----- 1 root adm 2470 Mar 8 21:17 mail.warn
-rw-r----- 1 root adm 60121 Mar 9 02:18 messages

-rw-r----- 1 root adm 0 Mar 9 06:25 syslog
-rw-r----- 1 root adm 178969 Mar 9 06:25 syslog.1

Does anyone know how to correct the error? Any help is greatly appreciated, thanx in advance.

Kind regards, gst