Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #173461
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Script vs command line behaviour |
| Date | 2016-10-13 01:20 +0200 |
| Message-ID | <srAYy-2VU-13@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <srr8T-4rr-73@gated-at.bofh.it> <srs4W-56s-21@gated-at.bofh.it> <srsRk-5Ir-13@gated-at.bofh.it> <srtu1-6cx-25@gated-at.bofh.it> <sru6J-6rJ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Oct 12, 2016 at 05:59:10PM +0200, Frank wrote: > Op 12-10-16 om 17:17 schreef Mark Fletcher: > >I wonder if passing the --fetchmailrc option will work. The systemd > >journal snippet I included in my original post shows that fetchmail is > >getting started successfully -- but by the morning it's not running. > >Now, clearly nothing gets past me, but that means it's terminating. > >Which suggests it doesn't know what it is supposed to do once it is > >started. Which suggests maybe it's not finding the fetchmailrc file? > > Looking at question C6 in the fetchmail FAQ, I'd say that's quite likely... > :) > Likely though it may have been, I'm afraid it didn't work. I modified the last line of the script to: sudo -u mark fetchmail -d 900 --fetchmailrc /home/mark/.fetchmailrc Which is the correct location of my .fetchmailrc. Then sudo journalctl -b | grep fetchmail shows: Oct 12 23:59:04 kazuki systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon... Oct 12 23:59:04 kazuki fetchmail[2801]: Not starting fetchmail daemon, disabled via /etc/default/fetchmail. Oct 12 23:59:04 kazuki systemd[1]: Started LSB: init-Script for system wide fetchmail daemon. Oct 13 01:30:06 kazuki sudo[4323]: root : TTY=unknown ; PWD=/ ; USER=mark ; COMMAND=/usr/bin/fetchmail -q Oct 13 01:30:06 kazuki homebackup.sh[4280]: fetchmail: background fetchmail at 3734 killed. Oct 13 03:48:33 kazuki sudo[5443]: root : TTY=unknown ; PWD=/ ; USER=mark ; COMMAND=/usr/bin/fetchmail -d 900 --fetchmailrc /home/mark/.fetchmailrc [lines justified to make them easier to read] I rebooted yesterday evening, as I was playing around with tails, but that is a different story. So the above is the entirety of the output of the command. The first 3 lines are the system-wide fetchmail daemon getting kicked off at system boot and deciding not to do anything. Subsequently, unknown to systemd, I started fetchmail as my unprivelegd user mark by hand from the command line using fetchmail -d 900 . That invariably works correctly. In line 4 you can see my backup script stopping fetchmail by running fetchmail -q as user mark. Again this command does not involve systemd (except for the fact that it is being executed in a script which is being executed by a systemd unit) Line 5 reports the success of that command. And line 6 _appears_ to be a successful execution of the (modified) last line of the script, sudo -u mark fetchmail -d 900 --fetchmailrc /home/mark/.fetchmailrc , except once again this morning I got up to find fetchmail was not running. And once again running fetchmail -d 900 from the command line started it successfully. So I see Nicolas and others suggested other approaches involving greater logging of what is going on overnight after I had gone to bed; my next step is to try some of those ideas. Mark
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-12 14:40 +0200
Re: Script vs command line behaviour Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-12 14:50 +0200
Re: Script vs command line behaviour Frédéric Marchal <frederic.marchal@wowtechnology.com> - 2016-10-12 15:30 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-12 15:50 +0200
Re: Script vs command line behaviour Greg Wooledge <wooledg@eeg.ccf.org> - 2016-10-12 16:00 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-12 16:20 +0200
Re: Script vs command line behaviour Nicolas George <george@nsup.org> - 2016-10-12 16:30 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-12 17:10 +0200
Re: Script vs command line behaviour Darac Marjal <mailinglist@darac.org.uk> - 2016-10-12 17:20 +0200
Re: Script vs command line behaviour Nicolas George <george@nsup.org> - 2016-10-12 17:20 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-13 16:50 +0200
Re: Script vs command line behaviour Nicolas George <george@nsup.org> - 2016-10-13 17:00 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-14 01:10 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-13 01:30 +0200
Re: Script vs command line behaviour Henrique de Moraes Holschuh <hmh@debian.org> - 2016-10-14 02:50 +0200
Re: Script vs command line behaviour Gene Heskett <gheskett@shentel.net> - 2016-10-12 16:40 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-12 17:20 +0200
Re: Script vs command line behaviour Frank <zuiderduin@gmx.com> - 2016-10-12 18:00 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-13 01:20 +0200
Re: Script vs command line behaviour Andre Majorel <aym-naibed@teaser.fr> - 2016-10-15 11:50 +0200
Re: Script vs command line behaviour Henrique de Moraes Holschuh <hmh@debian.org> - 2016-10-15 15:50 +0200
Re: Script vs command line behaviour Jude DaShiell <jdashiel@panix.com> - 2016-10-12 23:00 +0200
Re: Script vs command line behaviour Mark Fletcher <mark27q1@gmail.com> - 2016-10-13 01:00 +0200
csiph-web