This is on Ubuntu Server 14.04, but I think it's applicable to all OSes. I'm running logrotate as a cron job, cron settings are the defaults (logrotate exists in /etc/cron.daily). I'm running a program that's finicky with its log file--the program doesn't end when the log file is touched, but it stops doing anything.I set logrotate with the below config, the scripts in question do nothing but stop and start the given program. When I run logrotate -vf /etc/logrotate.conf it works perfectly--the program is killed, all logs are rotated, and the program restarts. When it runs automatically, however, something isn't working--I get up in the morning and the program is running but not doing anything as if its log file were touched while running. The log is rotated, so logrotate did that, but it apparently didn't stop/start the program correctly. The scripts do use full paths at all points, nothing is shortened.Does logrotate run as root with its default settings (logrotate in /etc/cron.daily)? If not, how can I make it do so? Is that even the problem?Config file with file-specific info removed (except the file with problems):# see man logrotate for details# rotate log files weeklyweekly# use the syslog group by default, since this is the owning group# of /var/log/syslog.su root syslog# keep 4 weeks worth of backlogsrotate 4# create new (empty) log files after rotating old onescreate# uncomment this if you want your log files compressed#compress# packages drop log rotation information into this directoryinclude /etc/logrotate.d# system-specific logs may be configured here/home/username/.local/share/bot/bot.log {    compress    daily    nomail    rotate 14    prerotate        /home/username/botscripts/wbstop.sh    endscript    postrotate        /home/username/botscripts/wbstart.sh    endscript}In case it's helpful, these are the two scripts. The program takes a few seconds to cleanly shut down, that's why it sleeps. wbstop.sh:#!/bin/shpkill -INT -f bot.pysleep 8wbstart.sh:#!/bin/shsleep 5python3 /home/username/bot/bot.py &
logrotate works when run manually, doesn't when run with cron
logs;logrotate