Re: [webmin-l] Rotating fetchmail log
"Jamie Cameron" <[email protected]>
| Newsgroups | gmane.comp.web.webmin.general |
|---|---|
| Message-ID | <[email protected]> |
Try removing the line : fi; from the end of the script. That looks like it was accidentally copy/pasted from elsewhere.. On 26/Dec/2016 15:49 Chris <[email protected]> wrote .. > On Mon, 2016-12-26 at 14:18 -0800, Jamie Cameron wrote: > > Try logging in as root via SSH and running : > > > > logrotate -f /etc/logrotate.conf > > > Thank you for that. I think I'm getting closer. I now have a > fetchmail.logrotate file in /etc/logrotate.d which reads > > /home/chris/fetchmaillog { > weekly > rotate 8 > compress > datext > missingok > notifempty > create 0664 chris chris > sharedscripts > postrotate > /usr/local/bin/fetchmail --quit; fetchmail -v --nokeep -- > nosyslog --logfile /home/chris/fetchmaillog --uidl -m procmail > fi; > endscript > } > > Running 'sudo logrotate -d /etc/logrotate.conf gives > > rotating pattern: /home/chris/fetchmaillog weekly (8 rotations) > empty log files are not rotated, old logs are removed > switching euid to 0 and egid to 104 > considering log /home/chris/fetchmaillog > log does not need rotating > not running postrotate script, since no logs were rotated > switching euid to 0 and egid to 0 > > I'm not sure though if the postrotate command will work correctly since > the commands below it are not a true script. > > Chris > > > On 26/Dec/2016 12:33 Chris <[email protected]> wrote .. > > > > > > I've been attempting to setup Webmin to automatically rotate my > > > fetchmail log with no success. When I run the rotation setup the > > > only > > > output I get is > > > > > > Forcing the immediate rotation of one log file .. > > > > > > .. failed! See the output above for the reason why. > > > > > > System information: > > > System hostname localhost (127.0.0.1) > > > Operating system Ubuntu Linux 16.04.1 > > > Webmin version 1.820 > > > Time on system Mon Dec 26 11:39:10 2016 > > > Kernel and CPU Linux 4.4.0-57-generic on x86_64 > > > > > > I've uploaded two screenshots here: > > > > > > https://s-media-cache-ak0.pinimg.com/originals/81/ac/bb/81acbb1627f > > > 2a30 > > > c93b25790b7ec13e5.png > > > > > > https://s-media-cache-ak0.pinimg.com/originals/09/e2/26/09e22684284 > > > ef81 > > > a55bd039685b01df4.png > > > > > > > > > I can't figure out what the problem is. Any advice would be > > > appreciated. > > > -- > > > Chris > > > KeyID 0xE372A7DA98E6705C > > > 31.11972; -97.90167 (Elev. 1092 ft) > > > 14:29:55 up 5 days, 23:35, 1 user, load average: 0.74, 0.46, 0.24 > > > Ubuntu 16.04.1 LTS, kernel 4.4.0-57-generic #78-Ubuntu SMP Fri Dec > > > 9 > > > 23:50:32 UTC 2016 > > > > > > ------------------------------------------------------------------- > > ----------- > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > - > > Forwarded by the Webmin mailing list at [email protected] > > ge.net > > To remove yourself from this list, go to > > http://lists.sourceforge.net/lists/listinfo/webadmin-list > -- > Chris > KeyID 0xE372A7DA98E6705C > 31.11972; -97.90167 (Elev. 1092 ft) > 17:27:15 up 6 days, 2:32, 1 user, load average: 0.30, 0.20, 0.23 > Ubuntu 16.04.1 LTS, kernel 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 > 23:50:32 UTC 2016 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot - Forwarded by the Webmin mailing list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-list