[services] Make git-sync script more universal

Can now sync any folder, passed in on the command line.
This commit is contained in:
Marty Oehme 2020-06-17 21:00:41 +02:00
parent c93cf0fc27
commit a6096c25ef
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
3 changed files with 89 additions and 27 deletions

View file

@ -1,12 +1,13 @@
[Unit]
Description=Automatically commit notes in directory
After=graphical.target
After=default.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
Environment=GS_TIME_TO_COMMIT=120 GS_UNCHANGED_RUNS_TO_PUSH=30
# workaround to allow relative executable invocation (i.e. current users' home dir)
ExecStart=/bin/bash -c '%h/.local/share/services/git-sync %h/documents/notes/uni'
# Restart=on-failure
[Install]
WantedBy=multi-user.target
WantedBy=default.target