fix(ppq): attempt to fix gitwatch

This commit is contained in:
Matthieu Bessat 2024-07-15 11:57:27 +02:00
parent f8d5db62cd
commit cc8e75e591
3 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,10 @@
ansible.builtin.git: ansible.builtin.git:
repo: "git@forge.lefuturiste.fr:mbess/main-popequer-notebook.git" repo: "git@forge.lefuturiste.fr:mbess/main-popequer-notebook.git"
dest: /home/mbess/notebooks/personal dest: /home/mbess/notebooks/personal
- name: Copy gitwatch script
template:
src: scripts/gitwatch.sh
dest: "{{ home }}/.local/bin/ppq_gitwatch"
- name: Setup gitwatch - name: Setup gitwatch
systemd_service: systemd_service:
scope: user scope: user

View file

@ -0,0 +1,3 @@
#!/usr/bin/sh
/usr/bin/gitwatch -r -R origin -s 300 -m "docs: update from {{ device_name }}" {{ home }}/notebooks/$1

View file

@ -4,7 +4,7 @@ Description=Sync popequer notebook with git
[Service] [Service]
# the buffer period in seconds 5min = 300s # the buffer period in seconds 5min = 300s
Type=simple Type=simple
ExecStart=/usr/bin/gitwatch -r -R origin -s 300 -m "docs: update from {{ device_name }}" {{ home }}/notebooks/%i ExecStart={{ home }}/.local/bin/gitwatch /%i
ExecStop=/bin/true ExecStop=/bin/true
Restart=always Restart=always
RestartSec=30 RestartSec=30