install.fairie/home/dot_local/bin/executable_gitomatic_service.tmpl
enggnr 836af2b9be
32 gitomatic (#61)
* Initial work to support gitomatic services

* Changes to create systemd service to run gitomatic

* Update logic after review

* Support MacOS
2023-07-09 00:44:11 -04:00

17 lines
727 B
Bash

#!/usr/bin/env bash
# @file .local/bin/gitomatic_service
# @brief Helper script to run gitomatic to monitor git repositories
# @description
# This script is executed by gitomatic systemd service. `gitomatic` does not support monitoring multiple
# repositories in a single process. This script starts as many gitomatic processes as there are repositories.
#
# ## Links
#
# [Systemd Unit file](https://github.com/megabyte-labs/install.doctor/blob/master/home/dot_config/gitomatic/gitomatic.service.tmpl)
{{ includeTemplate "universal/logg" }}
{{ range .data.user.gitomatic }}
gitomatic -author {{ $.data.user.name }} -email {{ $.data.user.email }} -privkey {{ $.chezmoi.homeDir }}/.ssh/id_rsa {{ .path }} &
{{ end -}}