diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-08-13 16:26:59 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-08-13 16:26:59 +0300 |
commit | bcf7d6b6c808833712a1ccac2d8e3848ca701a35 (patch) | |
tree | cfbed588b7342989a2b28a80a157729cb0db3d45 /systemd | |
parent | add README and licensing notes (diff) | |
download | cgitize-bcf7d6b6c808833712a1ccac2d8e3848ca701a35.tar.gz cgitize-bcf7d6b6c808833712a1ccac2d8e3848ca701a35.zip |
restore systemd files
Diffstat (limited to '')
-rw-r--r-- | systemd/pull-cgit-repos.service | 13 | ||||
-rw-r--r-- | systemd/pull-cgit-repos.timer | 10 |
2 files changed, 23 insertions, 0 deletions
diff --git a/systemd/pull-cgit-repos.service b/systemd/pull-cgit-repos.service new file mode 100644 index 0000000..1951247 --- /dev/null +++ b/systemd/pull-cgit-repos.service @@ -0,0 +1,13 @@ +# Adjust as you see fit. + +[Unit] +Description=Pull cgit repositories +Wants=ssh-agent.service + +[Service] +Type=simple +WorkingDirectory=%h/workspace/personal/cgit-repos +ExecStartPre=/usr/bin/truncate --size=0K -- %h/var/cgit-repos/pull-cgit-repos.log +ExecStart=/usr/bin/python3 -m pull.main --config %h/etc/cgit-repos/cgit-repos.conf +StandardOutput=file:%h/var/cgit-repos/pull-cgit-repos.log +StandardError=inherit diff --git a/systemd/pull-cgit-repos.timer b/systemd/pull-cgit-repos.timer new file mode 100644 index 0000000..de56c5a --- /dev/null +++ b/systemd/pull-cgit-repos.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Pull cgit repositories periodically + +[Timer] +Persistent=false +OnCalendar=daily +AccuracySec=1 + +[Install] +WantedBy=timers.target |