• bleistift2OP
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 days ago

    It’s a node process invoked by a run.sh, which gets executed via a .desktop file in the ~/.config/autostart directory.

    I went with a systemd unit now and it works.

    • sik0fewl@lemmy.ca
      link
      fedilink
      arrow-up
      8
      ·
      edit-2
      2 days ago

      I can’t remember off the top of my head, but your shell script might not be relaying the SIGTERM. Make sure you start your node process with the “exec” statement. This will replace the script’s process with node instead of having node be a subprocess of your script.

      • bleistift2OP
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        When I run the script myself and kill it, it gets the signal and acts correctly. Only when I poweroff the system, this doesn’t work.

        I also tried prepending exec, but no dice.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      Your DE may be the one not relaying the sigterm, or it may be losing the PID because of the double launching.

      Does the LSB have something to call on termination? Or you may want to call an executable there instead of a script.