mirror of
https://github.com/gitwatch/gitwatch
synced 2024-11-17 03:25:41 +00:00
Merge pull request #64 from amit-gshe/master
Optimize the systemd service script
This commit is contained in:
commit
066a9f3ad6
@ -84,9 +84,9 @@ The `<username>` bit should be replaced with your username or that of any other
|
||||
|
||||
#### systemd
|
||||
|
||||
- If installed to a path other than `/usr/local/bin/gitwatch`, modify `gitwatch@.service` to suit
|
||||
- If installed to a path other than `/usr/bin/gitwatch`, modify `gitwatch@.service` to suit
|
||||
- Create dir if it does not exist and copy systemd service file with `mkdir -p "$HOME/.config/systemd/user" && cp gitwatch@.service $HOME/.config/systemd/user`
|
||||
- Start and enable the service for a given path by running `systemctl --user --now enable gitwatch@$(systemd-escape "/path/to/folder/to/monitor").service`
|
||||
- Start and enable the service for a given path by running `systemctl --user --now enable gitwatch@$(systemd-escape "'-r url/to/repository' /path/to/folder").service`
|
||||
|
||||
## Other Articles
|
||||
### On the Gitwatch Wiki
|
||||
|
@ -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…
Reference in New Issue
Block a user