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


Groups > linux.debian.user > #256803 > unrolled thread

questions about cron.daily

Started bycoreyh@free.fr
First post2023-04-06 13:40 +0200
Last post2023-04-07 03:50 +0200
Articles 20 on this page of 40 — 23 participants

Back to article view | Back to linux.debian.user


Contents

  questions about cron.daily coreyh@free.fr - 2023-04-06 13:40 +0200
    Re: questions about cron.daily Greg Wooledge <greg@wooledge.org> - 2023-04-06 13:50 +0200
    Re: questions about cron.daily Andy Smith <andy@strugglers.net> - 2023-04-06 17:40 +0200
      Re: questions about cron.daily Fred <fred@blakemfg.com> - 2023-04-06 18:40 +0200
        Re: questions about cron.daily Pierre Frenkiel <frenkiel@gmail.com> - 2023-04-06 18:50 +0200
          Re: questions about cron.daily "Thomas Schmitt" <scdbackup@gmx.net> - 2023-04-06 19:10 +0200
            Re: questions about cron.daily Alexis Grigoriou <alexis@nanoid.net> - 2023-04-06 20:30 +0200
          Re: questions about cron.daily Fred <fred@blakemfg.com> - 2023-04-06 21:30 +0200
            Re: questions about cron.daily David Wright <deblis@lionunicorn.co.uk> - 2023-04-07 00:50 +0200
              Re: questions about cron.daily Greg Wooledge <greg@wooledge.org> - 2023-04-07 01:00 +0200
                Re: questions about cron.daily <tomas@tuxteam.de> - 2023-04-07 07:10 +0200
                  Re: questions about cron.daily Alex King <alex@rimuhosting.com> - 2023-04-08 02:20 +0200
                    Re: questions about cron.daily "Andrew M.A. Cater" <amacater@einval.com> - 2023-04-08 11:10 +0200
                      Re: questions about cron.daily Michel Verdier <mv524@free.fr> - 2023-04-08 11:20 +0200
                        Re: questions about cron.daily Greg Wooledge <greg@wooledge.org> - 2023-04-08 14:40 +0200
                          Re: questions about cron.daily Max Nikulin <manikulin@gmail.com> - 2023-04-08 17:20 +0200
                          Re: questions about cron.daily Kushal Kumaran <kushal@locationd.net> - 2023-04-08 17:20 +0200
                            Re: questions about cron.daily Max Nikulin <manikulin@gmail.com> - 2023-04-08 19:00 +0200
                              Re: questions about cron.daily Michel Verdier <mv524@free.fr> - 2023-04-09 10:00 +0200
                                Re: questions about cron.daily Max Nikulin <manikulin@gmail.com> - 2023-04-11 11:20 +0200
                          Re: questions about cron.daily Michel Verdier <mv524@free.fr> - 2023-04-09 10:00 +0200
                Re: questions about cron.daily Richard Hector <richard@walnut.gen.nz> - 2023-04-07 18:00 +0200
                Re: questions about cron.daily Anssi Saari <as@sci.fi> - 2023-04-07 18:00 +0200
                  Re: questions about cron.daily Cindy Sue Causey <butterflybytes@gmail.com> - 2023-04-07 23:50 +0200
                Re: questions about cron.daily David Wright <deblis@lionunicorn.co.uk> - 2023-04-09 18:10 +0200
                  Re: questions about cron.daily zithro <slack@rabbit.lu> - 2023-04-09 21:50 +0200
                    Re: questions about cron.daily David Wright <deblis@lionunicorn.co.uk> - 2023-04-10 03:30 +0200
                      Re: questions about cron.daily davidson <davidson@freevolt.org> - 2023-04-10 04:30 +0200
                      Re: questions about cron.daily Michel Verdier <mv524@free.fr> - 2023-04-10 08:40 +0200
                        Re: questions about cron.daily David Wright <deblis@lionunicorn.co.uk> - 2023-04-11 05:50 +0200
                      Re: questions about cron.daily zithro <slack@rabbit.lu> - 2023-04-10 17:50 +0200
                        Re: questions about cron.daily David Wright <deblis@lionunicorn.co.uk> - 2023-04-11 05:50 +0200
        Re: questions about cron.daily Tom Furie <tom@furie.org.uk> - 2023-04-06 19:00 +0200
        Re: questions about cron.daily Michel Verdier <mv524@free.fr> - 2023-04-06 19:10 +0200
        Re: questions about cron.daily Greg Wooledge <greg@wooledge.org> - 2023-04-06 19:50 +0200
        Re: questions about cron.daily Stefan Monnier <monnier@iro.umontreal.ca> - 2023-04-06 19:50 +0200
        Re: questions about cron.daily davidson <davidson@freevolt.org> - 2023-04-06 23:30 +0200
          Re: questions about cron.daily ken@openmbox.net - 2023-04-07 02:20 +0200
            Re: questions about cron.daily Tom Furie <tom@furie.org.uk> - 2023-04-07 02:30 +0200
              Re: questions about cron.daily Dan Ritter <dsr@randomstring.org> - 2023-04-07 03:50 +0200

Page 1 of 2  [1] 2  Next page →


#256803 — questions about cron.daily

Fromcoreyh@free.fr
Date2023-04-06 13:40 +0200
Subjectquestions about cron.daily
Message-ID<Ghw89-9TL-1@gated-at.bofh.it>
Hello list,

For scripts put under /etc/cron.daily, which special time will they be 
implemented?

I know they will be run daily, but not sure about the special run time.

And, I found some services like apache2, chkrootkit will put the scripts 
in this dir automatically. are they for system cleaning purpose?

Thanks.
Corey

[toc] | [next] | [standalone]


#256804

FromGreg Wooledge <greg@wooledge.org>
Date2023-04-06 13:50 +0200
Message-ID<GhwhP-9Xg-5@gated-at.bofh.it>
In reply to#256803
On Thu, Apr 06, 2023 at 07:33:26PM +0800, coreyh@free.fr wrote:
> For scripts put under /etc/cron.daily, which special time will they be
> implemented?

unicorn:~$ grep daily /etc/crontab
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

[toc] | [prev] | [next] | [standalone]


#256809

FromAndy Smith <andy@strugglers.net>
Date2023-04-06 17:40 +0200
Message-ID<GhzSp-ceS-3@gated-at.bofh.it>
In reply to#256803
Hello,

On Thu, Apr 06, 2023 at 07:33:26PM +0800, coreyh@free.fr wrote:
> For scripts put under /etc/cron.daily, which special time will they be
> implemented?

Greg already showed you how to check this on your own systems.

If you need something to run daily but at a specific time, consider
instead either creating a custom cron job in /etc/cron.d/ (or a
user's crontab) or else using a systemd timer.

> I found some services like apache2, chkrootkit will put the scripts in
> this dir automatically. are they for system cleaning purpose?

The purpose of cron.daily is literally to run scripts daily for
*whatever purpose each script has*. If you have questions about what
a specific script does, try looking at it, as it's just an
executable script (usually sh or bash). If you're still confused
then ask a specific question about a specific script.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#256811

FromFred <fred@blakemfg.com>
Date2023-04-06 18:40 +0200
Message-ID<GhAOt-cNY-1@gated-at.bofh.it>
In reply to#256809
On 4/6/23 08:33, Andy Smith wrote:
> Hello,
> 
> On Thu, Apr 06, 2023 at 07:33:26PM +0800, coreyh@free.fr wrote:
>> For scripts put under /etc/cron.daily, which special time will they be
>> implemented?
> 
> Greg already showed you how to check this on your own systems.
> 
> If you need something to run daily but at a specific time, consider
> instead either creating a custom cron job in /etc/cron.d/ (or a
> user's crontab) or else using a systemd timer.
> 
>> I found some services like apache2, chkrootkit will put the scripts in
>> this dir automatically. are they for system cleaning purpose?
> 
> The purpose of cron.daily is literally to run scripts daily for
> *whatever purpose each script has*. If you have questions about what
> a specific script does, try looking at it, as it's just an
> executable script (usually sh or bash). If you're still confused
> then ask a specific question about a specific script.
> 
> Cheers,
> Andy
> 
I also would like to know when cron.daily scripts run.  Greg's command 
does not appear to reveal the time for that script.  I ran Greg's 
command and got the same result.

Best regards,
Fred

[toc] | [prev] | [next] | [standalone]


#256812

FromPierre Frenkiel <frenkiel@gmail.com>
Date2023-04-06 18:50 +0200
Message-ID<GhAY9-cRA-7@gated-at.bofh.it>
In reply to#256811
crontab -l

Pierre Frenkiel

On Thu, 6 Apr 2023, Fred wrote:

> On 4/6/23 08:33, Andy Smith wrote:
>> Hello,
>> 
>> On Thu, Apr 06, 2023 at 07:33:26PM +0800, coreyh@free.fr wrote:
>>> For scripts put under /etc/cron.daily, which special time will they be
>>> implemented?
>> 
>> Greg already showed you how to check this on your own systems.
>> 
>> If you need something to run daily but at a specific time, consider
>> instead either creating a custom cron job in /etc/cron.d/ (or a
>> user's crontab) or else using a systemd timer.
>> 
>>> I found some services like apache2, chkrootkit will put the scripts in
>>> this dir automatically. are they for system cleaning purpose?
>> 
>> The purpose of cron.daily is literally to run scripts daily for
>> *whatever purpose each script has*. If you have questions about what
>> a specific script does, try looking at it, as it's just an
>> executable script (usually sh or bash). If you're still confused
>> then ask a specific question about a specific script.
>> 
>> Cheers,
>> Andy
>> 
> I also would like to know when cron.daily scripts run.  Greg's command does 
> not appear to reveal the time for that script.  I ran Greg's command and got 
> the same result.
>
> Best regards,
> Fred
>

[toc] | [prev] | [next] | [standalone]


#256815

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2023-04-06 19:10 +0200
Message-ID<GhBhv-ddF-3@gated-at.bofh.it>
In reply to#256812
Hi,

Greg Wooledge wrote:
> > > unicorn:~$ grep daily /etc/crontab
> > > 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

Fred wrote:
> > I also would like to know when cron.daily scripts run.  Greg's command does
> > not appear to reveal the time for that script.  I ran Greg's command and got
> > the same result.

Pierre Frenkiel wrote:
> crontab -l

Plus:
  man 5 crontab
which has in its section "EXAMPLE CRON FILE"

       # run five minutes after midnight, every day
       5 0 * * *       $HOME/bin/daily.job >> $HOME/tmp/out 2>&1

and explains further up

      The  format of a cron command is very much the V7 standard, with a num‐
      ber of upward-compatible extensions.  Each line has five time and  date
      fields,  followed by a command, followed by a newline character ('\n').
      ...
             field          allowed values
              -----          --------------
              minute         0-59
              hour           0-23
              day of month   1-31
              month          1-12 (or names, see below)
              day of week    0-7 (0 or 7 is Sun, or use names)

So the command shown by Greg Wooledge runs at 6:25 am the comand

  test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

which runs the programs in /etc/cron.daily (by run-parts(8)) if not
/usr/sbin/anacron exists and is executable.


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#256818

FromAlexis Grigoriou <alexis@nanoid.net>
Date2023-04-06 20:30 +0200
Message-ID<GhCwV-dTi-5@gated-at.bofh.it>
In reply to#256815
On Thu, 2023-04-06 at 19:05 +0200, Thomas Schmitt wrote:
> Hi,
> 
> 
> Pierre Frenkiel wrote:
> > crontab -l
> 
> Plus:
>   man 5 crontab
> which has in its section "EXAMPLE CRON FILE"
> 
>        # run five minutes after midnight, every day
>        5 0 * * *       $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
> 
> and explains further up
> 
>       The  format of a cron command is very much the V7 standard,
> with a num‐
>       ber of upward-compatible extensions.  Each line has five time
> and  date
>       fields,  followed by a command, followed by a newline character
> ('\n').
>       ...
>              field          allowed values
>               -----          --------------
>               minute         0-59
>               hour           0-23
>               day of month   1-31
>               month          1-12 (or names, see below)
>               day of week    0-7 (0 or 7 is Sun, or use names)
> 
> So the command shown by Greg Wooledge runs at 6:25 am the comand
> 
>   test -x /usr/sbin/anacron || ( cd / && run-parts --report
> /etc/cron.daily )
> 
> which runs the programs in /etc/cron.daily (by run-parts(8)) if not
> /usr/sbin/anacron exists and is executable.
> 

https://crontab.guru has a very nice explaining also.

[toc] | [prev] | [next] | [standalone]


#256821

FromFred <fred@blakemfg.com>
Date2023-04-06 21:30 +0200
Message-ID<GhDt1-et2-19@gated-at.bofh.it>
In reply to#256812
On 4/6/23 09:44, Pierre Frenkiel wrote:
> 
> crontab -l
> 
> Pierre Frenkiel
> 
> On Thu, 6 Apr 2023, Fred wrote:
> 
>> On 4/6/23 08:33, Andy Smith wrote:
>>> Hello,
>>>
>>> On Thu, Apr 06, 2023 at 07:33:26PM +0800, coreyh@free.fr wrote:
>>>> For scripts put under /etc/cron.daily, which special time will they be
>>>> implemented?
>>>
>>> Greg already showed you how to check this on your own systems.
>>>
>>> If you need something to run daily but at a specific time, consider
>>> instead either creating a custom cron job in /etc/cron.d/ (or a
>>> user's crontab) or else using a systemd timer.
>>>
>>>> I found some services like apache2, chkrootkit will put the scripts in
>>>> this dir automatically. are they for system cleaning purpose?
>>>
>>> The purpose of cron.daily is literally to run scripts daily for
>>> *whatever purpose each script has*. If you have questions about what
>>> a specific script does, try looking at it, as it's just an
>>> executable script (usually sh or bash). If you're still confused
>>> then ask a specific question about a specific script.
>>>
>>> Cheers,
>>> Andy
>>>
>> I also would like to know when cron.daily scripts run.  Greg's command 
>> does not appear to reveal the time for that script.  I ran Greg's 
>> command and got the same result.
>>
>> Best regards,
>> Fred

fred@ragnok:~$ crontab -l
no crontab for fred

root@ragnok:/home/fred# crontab -l
no crontab for root

best regards,
Fred

[toc] | [prev] | [next] | [standalone]


#256824

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2023-04-07 00:50 +0200
Message-ID<GhGAx-gn1-5@gated-at.bofh.it>
In reply to#256821
On Thu 06 Apr 2023 at 12:28:05 (-0700), Fred wrote:
> On 4/6/23 09:44, Pierre Frenkiel wrote:
> > 
> > crontab -l
> > 
> > On Thu, 6 Apr 2023, Fred wrote:
> > > I also would like to know when cron.daily scripts run.  Greg's
> > > command does not appear to reveal the time for that script.  I
> > > ran Greg's command and got the same result.
> 
> fred@ragnok:~$ crontab -l
> no crontab for fred
> 
> root@ragnok:/home/fred# crontab -l
> no crontab for root

Users (including root) write their crontabs anywhere they like,
typically in a directory like ~/.cron/. They then have to be installed
with crontab, which copies them into /var/spool/cron/crontabs/.
Those are the files that crontab -l lists. Why? Because cron isn't
going to poke around in your home directory looking for a crontab
there. It wants them somewhere it has control over.

The system crontab is different, and is found in /etc/. It is an
active file, and doesn't require any installing. It also has to
contain an extra field: the user under which each item should be
run—usually, but not always, root. Other parts of the system can
also have their own crontabs, with similar properties, which are
found in /etc/cron.d/.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#256826

FromGreg Wooledge <greg@wooledge.org>
Date2023-04-07 01:00 +0200
Message-ID<GhGKd-gqq-1@gated-at.bofh.it>
In reply to#256824
On Thu, Apr 06, 2023 at 05:45:08PM -0500, David Wright wrote:
> Users (including root) write their crontabs anywhere they like,
> typically in a directory like ~/.cron/.

Is that... normal?  I can't say I've ever seen anyone keep a private
copy of their crontab in their home directory like that.

Most people just use "crontab -e" to edit the system's copy of their
personal crontab...

> They then have to be installed
> with crontab, which copies them into /var/spool/cron/crontabs/.

... which lives there.

[toc] | [prev] | [next] | [standalone]


#256834

From<tomas@tuxteam.de>
Date2023-04-07 07:10 +0200
Message-ID<GhMwh-kk3-1@gated-at.bofh.it>
In reply to#256826

[Multipart message — attachments visible in raw view] — view raw

On Thu, Apr 06, 2023 at 06:54:31PM -0400, Greg Wooledge wrote:
> On Thu, Apr 06, 2023 at 05:45:08PM -0500, David Wright wrote:
> > Users (including root) write their crontabs anywhere they like,
> > typically in a directory like ~/.cron/.
> 
> Is that... normal?  I can't say I've ever seen anyone keep a private
> copy of their crontab in their home directory like that.

It's news to me, too. I olny knew about the /var/spool/cron/crontabs
location.

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#256847

FromAlex King <alex@rimuhosting.com>
Date2023-04-08 02:20 +0200
Message-ID<Gi4tb-vAK-5@gated-at.bofh.it>
In reply to#256834
See man crontab.

There are 2 ways of maintaining your crontab:

crontab [ -u user ] file
...
The  first  form  of this command is used to install a new crontab from 
some named file....

I.e. you can keep a file in your home directory (or anywhere,) update it 
and install it when changed using "crontab filename".  This is 
especially useful if you keep your home directory under version control 
and want your crontab under version control as well.  But I guess hardly 
anyone does this.

The second way:

crontab [ -u user ] [ -i ] { -e | -l | -r }
...
The -e option is used to edit the  current  crontab  using  the  editor
specified  by  the  VISUAL  or EDITOR environment variables.  After you
exit from the editor, the modified crontab will be installed  automati‐
cally.

I believe it actually causes the current crontab to be copied to a 
temporary file, where is edited, then it is installed after a successful 
editing session and the temporary file is deleted.

Like others, I've hardly ever met people who do things the first way, 
but it likely was the original way of doing things.

Thanks,
Alex

On 7/04/23 17:08, tomas@tuxteam.de wrote:
> On Thu, Apr 06, 2023 at 06:54:31PM -0400, Greg Wooledge wrote:
>> On Thu, Apr 06, 2023 at 05:45:08PM -0500, David Wright wrote:
>>> Users (including root) write their crontabs anywhere they like,
>>> typically in a directory like ~/.cron/.
>> Is that... normal?  I can't say I've ever seen anyone keep a private
>> copy of their crontab in their home directory like that.
> It's news to me, too. I olny knew about the /var/spool/cron/crontabs
> location.
> 
> Cheers

[toc] | [prev] | [next] | [standalone]


#256858

From"Andrew M.A. Cater" <amacater@einval.com>
Date2023-04-08 11:10 +0200
Message-ID<GicK5-B3i-5@gated-at.bofh.it>
In reply to#256847
On Sat, Apr 08, 2023 at 11:45:50AM +1200, Alex King wrote:
> See man crontab.
> 
> There are 2 ways of maintaining your crontab:
> 
> crontab [ -u user ] file
> ...
> The  first  form  of this command is used to install a new crontab from some
> named file....
> 
> I.e. you can keep a file in your home directory (or anywhere,) update it and
> install it when changed using "crontab filename".  This is especially useful
> if you keep your home directory under version control and want your crontab
> under version control as well.  But I guess hardly anyone does this.
> 

This is *exactly* what I do when I'm editing crontabs, especially on a 
remote machine. 

crontab -l

lists any crontabs for that user.

 crontab -l > crontab.old

gives you a version of the crontab that you can keep.

cp crontab.old crontab.new ; vi crontab.new ; diff crontab.old crontab.new

will allow you to add new lines / change times or whatever.

crontab crontab.new will put the new crontab in - but you've already got
the old one if you need to revert changes. If you want to be fancy, you
can do crontab.<iso8601 date> and have them sorted.

Likewise for creating systemd unit files - NEVER "just start editing over
the top" always have an example to work from and save it. You can then
commit the series to git if you want to record exact changes.

> 
> I believe it actually causes the current crontab to be copied to a temporary
> file, where is edited, then it is installed after a successful editing
> session and the temporary file is deleted.
> 

Yes,

> Like others, I've hardly ever met people who do things the first way, but it
> likely was the original way of doing things.
> 
> Thanks,
> Alex
> 
>

All the very best, as ever,

Andy 

[toc] | [prev] | [next] | [standalone]


#256859

FromMichel Verdier <mv524@free.fr>
Date2023-04-08 11:20 +0200
Message-ID<GicTL-B6N-3@gated-at.bofh.it>
In reply to#256858
Le 8 avril 2023 Andrew M. A. Cater a écrit :

> Likewise for creating systemd unit files - NEVER "just start editing over
> the top" always have an example to work from and save it. You can then
> commit the series to git if you want to record exact changes.

systemd user files can be put in ~/.config/systemd/user/ where you can
use git directly

[toc] | [prev] | [next] | [standalone]


#256862

FromGreg Wooledge <greg@wooledge.org>
Date2023-04-08 14:40 +0200
Message-ID<Gig1j-CYD-1@gated-at.bofh.it>
In reply to#256859
On Sat, Apr 08, 2023 at 11:16:51AM +0200, Michel Verdier wrote:
> Le 8 avril 2023 Andrew M. A. Cater a écrit :
> 
> > Likewise for creating systemd unit files - NEVER "just start editing over
> > the top" always have an example to work from and save it. You can then
> > commit the series to git if you want to record exact changes.
> 
> systemd user files can be put in ~/.config/systemd/user/ where you can
> use git directly

Have you ever actually *made* a systemd --user unit file?  If so, for
what purpose?

[toc] | [prev] | [next] | [standalone]


#256892

FromMax Nikulin <manikulin@gmail.com>
Date2023-04-08 17:20 +0200
Message-ID<Giiwa-ECZ-7@gated-at.bofh.it>
In reply to#256862
On 08/04/2023 19:39, Greg Wooledge wrote:
> 
> Have you ever actually *made* a systemd --user unit file?  If so, for
> what purpose?

For LXC unprivileged containers that are stopped on logout.

Do you mean it is exceptional case when default user units need 
adjustment? /usr/lib/systemd/user directory has enough entries when a 
desktop environment is installed. Even emacs server may be started as a 
systemd service.

[toc] | [prev] | [next] | [standalone]


#256895

FromKushal Kumaran <kushal@locationd.net>
Date2023-04-08 17:20 +0200
Message-ID<Giiw9-ECZ-3@gated-at.bofh.it>
In reply to#256862
On Sat, Apr 08 2023 at 08:39:14 AM, Greg Wooledge <greg@wooledge.org> wrote:
> On Sat, Apr 08, 2023 at 11:16:51AM +0200, Michel Verdier wrote:
>> Le 8 avril 2023 Andrew M. A. Cater a écrit :
>> 
>> > Likewise for creating systemd unit files - NEVER "just start editing over
>> > the top" always have an example to work from and save it. You can then
>> > commit the series to git if you want to record exact changes.
>> 
>> systemd user files can be put in ~/.config/systemd/user/ where you can
>> use git directly
>
> Have you ever actually *made* a systemd --user unit file?  If so, for
> what purpose?

I have one.  It starts emacs server for me when I login.

-- 
regards,
kushal

[toc] | [prev] | [next] | [standalone]


#256909

FromMax Nikulin <manikulin@gmail.com>
Date2023-04-08 19:00 +0200
Message-ID<Gik4V-Fsf-3@gated-at.bofh.it>
In reply to#256895
On 08/04/2023 22:17, Kushal Kumaran wrote:
>> Have you ever actually *made* a systemd --user unit file?  If so, for
>> what purpose?
> 
> I have one.  It starts emacs server for me when I login.

There is ready to use one: /usr/lib/systemd/user/emacs.service Perhaps 
there is no such file in buster.

[toc] | [prev] | [next] | [standalone]


#256938

FromMichel Verdier <mv524@free.fr>
Date2023-04-09 10:00 +0200
Message-ID<Giy7T-Ohc-3@gated-at.bofh.it>
In reply to#256909
Le 8 avril 2023 Max Nikulin a écrit :

> On 08/04/2023 22:17, Kushal Kumaran wrote:
>>> Have you ever actually *made* a systemd --user unit file?  If so, for
>>> what purpose?
>> I have one.  It starts emacs server for me when I login.
>
> There is ready to use one: /usr/lib/systemd/user/emacs.service Perhaps there
> is no such file in buster.

/usr/lib/systemd/user is for global system running. If you want to change
something in the service you copy it in ~/.config/systemd to supersede
global one.

[toc] | [prev] | [next] | [standalone]


#257039

FromMax Nikulin <manikulin@gmail.com>
Date2023-04-11 11:20 +0200
Message-ID<Gjikq-1hiw-7@gated-at.bofh.it>
In reply to#256938
On 09/04/2023 14:54, Michel Verdier wrote:
> Le 8 avril 2023 Max Nikulin a écrit :
>> There is ready to use one: /usr/lib/systemd/user/emacs.service Perhaps there
>> is no such file in buster.
> 
> /usr/lib/systemd/user is for global system running. If you want to change
> something in the service you copy it in ~/.config/systemd to supersede
> global one.

For minor tuning (adding new parameters or overwriting specific ones) it 
is possible to create a drop-in file, e.g. 
~/.config/systemd/user/emacs.service.d/override.conf (or in /etc for all 
users).

     systemctl --user edit emacs.service

See systemd.unit(5). Examples are usually given for system, not user units:
- https://wiki.debian.org/systemd#Creating_or_altering_services
- https://wiki.archlinux.org/title/systemd#Editing_provided_units
- 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/assembly_working-with-systemd-unit-files_configuring-basic-system-settings#proc_extending-the-default-unit-configuration_assembly_working-with-systemd-unit-files

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.user


csiph-web