2
0
mirror of https://github.com/gitwatch/gitwatch synced 2024-11-17 03:25:41 +00:00

Optimize the systemd service script

1. Only the default.target will be bring up when the user login.
2. The script now supports the -r option.
This commit is contained in:
amit-gshe 2019-03-22 11:24:01 +08:00
parent 3244518c5a
commit 4842795e43

View File

@ -1,9 +1,10 @@
[Unit]
Description=Watch file or directory and git commit all changes
Description=Watch file or directory and git commit all changes. run with: systemctl --user --now enable gitwatch@$(systemd-escape "'-r url/to/repository' /path/to/folder").service
[Service]
ExecStart=/usr/local/bin/gitwatch "%I"
Environment="SCRIPT_ARGS=%I"
ExecStart=/usr/bin/gitwatch $SCRIPT_ARGS
ExecStop=/bin/true
[Install]
WantedBy=multi-user.target
WantedBy=default.target