Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #173473

Re: Script vs command line behaviour

From Mark Fletcher <mark27q1@gmail.com>
Newsgroups linux.debian.user
Subject Re: Script vs command line behaviour
Date 2016-10-14 01:10 +0200
Message-ID <srXiq-1AP-15@gated-at.bofh.it> (permalink)
References (5 earlier) <srsHD-5Fa-7@gated-at.bofh.it> <srtkm-688-31@gated-at.bofh.it> <srtu2-6cx-33@gated-at.bofh.it> <srPuy-4ML-25@gated-at.bofh.it> <srPEe-4Qo-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 13, 2016 at 04:55:06PM +0200, Nicolas George wrote:
> Le duodi 22 vendémiaire, an CCXXV, Mark Fletcher a écrit :
> > > strace -f -e execve -s 10000 -o /tmp/my_script.$$.$(date +%Y%m%d%H%M%S) &
> 
> > But there is no my_script.<anything> in /tmp... WhaFu?
> 
> My bad, I forgot the end of the command:
> 
> -p $$
> 
> (insert just before the final ampersand)
> 

I will check this out later because I want to understand what was going 
on, but I am happy to report that switchng to the system-wide fetchmail, 
a unit for which was already in systemd (but which was prevented from 
doing anything by /etc/default/fetchmail, and by the fact it was 
unconfigured) has solved the problem.

So as described in a mail I wrote last night, I've moved my .fetchmailrc 
to /etc/fetchmailrc (which is not an obnoxious thing to do on this 
machine because I am the only habitual user) and enabled this run of 
fetchmail in /etc/default/fetchmailrc, and now systemctl start fetchmail 
and systemctl stop fetchmail start and stop fetchmail meaningfully.

(Also had to change the ownership of /etc/fetchmailrc to the user 
fetchmail, when I copied ~mark/.fetchmailrc to /etc/fetchmailrc as root 
the result was initially owned by root which given the recommended 
permissions of 600 wouldn't have worked)

I moved my refresh interval from the command line to the fetchmailrc 
file -- /etc/default/fetchmailrc provides a means to influence the 
command line but putting all the options in the fetchmailrc felt 
cleaner, now that I think on it.

And then in my original script sudo -u mark fetchmail -q can be replaced 
with systemctl stop fetchmail, and sudo -u mark fetchmail -d 900 can be 
replaced with systemctl start fetchmail

I made all these changes last night and got up this morning to find 
everything working as it should be.

So this issue is now downgraded from an actual issue to a research 
project of why it wasn't working the old way. Which I will still be 
investigating and will post if I find something interesting.

Thanks to all, especially in this case Nicolas, for your help and 
suggestions.

Mark

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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