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.
pull/64/head
amit-gshe 5 years ago
parent 3244518c5a
commit 4842795e43

@ -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

Loading…
Cancel
Save