when-changed icon indicating copy to clipboard operation
when-changed copied to clipboard

run as a service

Open bcsanford opened this issue 3 years ago • 1 comments

easy method to run when-changed as a (systemd or other type of) service

bcsanford avatar Mar 31 '23 02:03 bcsanford

You can simply create a .service file at /etc/systemd/system/ with the following content:

[Unit]
Description=My description

[Service]
Type=simple
ExecStart=/path/to/when-changed /path/to/watch "${COMMAND_TO_EXECUTE}"
Restart=always
RestartSec=3

[Install]
WantedBy=multi-user.target

In my use case I had to add restart because I am afraid OS can terminate my process after some time but I would not like to let it heppen.

mpoberezhniy avatar Mar 26 '24 22:03 mpoberezhniy