Results 1 to 3 of 3

Thread: OS 13.1 - Systemd/user timer and timer service install - how to stop it when user logoff

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,069

    Default OS 13.1 - Systemd/user timer and timer service install - how to stop it when user logoff

    Hello.
    The timer is start in ~/.profile :
    Code:
        systemctl --user start user_timer.timer
    What keyword I must use to stop it when user logoff.
    Here is my systemd/user timer.
    Code:
    [Unit]
    # Directory   : ~/.config/systemd/user
    # file        : user_timer.service
    # enable with : systemctl --user  enable  user_timer.service
    Description=user_timer.service
    
    [Service]
    EnvironmentFile=~/.config/systemd/user/user_timer.conf
    #
    Type=simple
    #
    ExecStart=~/bin/user_script_tmr  ${TEXT} ${A_USER}
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,397
    Blog Entries
    2

    Default Re: OS 13.1 - Systemd/user timer and timer service install - how to stop it when user logoff

    I don't know the exact attribute flags which may be required/desirable, but you're looking for how to configure the ExecStop command in your Unitfile. Maybe a search for how your timer is used with this command as your keywords should turn something up.

    Also, if you know how to execute from the command line it might be a start, so for example inspect what is in your "~/bin/user_script_tmr"

    If you can identify the binary start command in that script, it'll probably provide a strong hint what the command might be to stop the binary app, and then after some testing you'd insert as an "ExecStop" command.

    HTH,
    TSU

  3. #3
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,069

    Default Re: OS 13.1 - Systemd/user timer and timer service install - how to stop it when user logoff

    Hello
    I restated my question otherwise: is it necessary to stop a systemd user service for a specific user because of that user logoff or does it stops by itself (because that user logoff) ?

    Any help is welcome
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •