systemd: Add timers and services to keep git repos up-to-date

Yes, systemd. In my user repo. It's awesome.
This commit is contained in:
Salt 2020-11-10 09:58:33 -06:00
parent f118c9420d
commit a3f24f4b79
4 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# vim:ft=systemd:
[Unit]
Description=Dotfile fetch service
[Service]
ExecStart=git --git-dir=%h/.dotfiles/ --work-tree=%h fetch
[Install]
WantedBy=default.target

View File

@ -0,0 +1,11 @@
# vim:ft=systemd:
[Unit]
Description=Dot fetch timer
[Timer]
Persistent=true
OnBootSec=15min
OnCalendar=*-*-* 22:00:00
[Install]
WantedBy=default.target

View File

@ -0,0 +1,9 @@
# vim:ft=systemd:
[Unit]
Description=Project fetch service
[Service]
ExecStart=find %h/Projects -type d -iname .git -execdir git fetch \;
[Install]
WantedBy=default.target

View File

@ -0,0 +1,11 @@
# vim:ft=systemd:
[Unit]
Description=Project fetch timer
[Timer]
Persistent=true
OnBootSec=15min
OnCalendar=*-*-* 23:00:00
[Install]
WantedBy=default.target