[services] Add note sync service
Added service to automatically commit changes in notes directory (every 2 minutes) and automatically push them to their remote origin (after no changes occured for an hour). Uses git and systemd to work as a service in the background. Gets restarted on failure.
This commit is contained in:
parent
a2ea57ad98
commit
98377fdf00
2 changed files with 83 additions and 0 deletions
12
services/.config/systemd/user/commit_notes.service
Normal file
12
services/.config/systemd/user/commit_notes.service
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Automatically commit notes in directory
|
||||
After=graphical.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=TIME_TO_COMMIT=120 UNCHANGED_RUNS_TO_PUSH=30
|
||||
ExecStart=/bin/bash -c '%h/.local/share/services/git-sync'
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue