From 9ef25f6edb9a6895df2c3784e9ec4da969bba97a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 2 Jul 2018 04:38:49 +0300 Subject: add systemd units --- %HOME%/.config/systemd/user/pull.service | 11 +++++++++++ %HOME%/.config/systemd/user/pull.timer | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 %HOME%/.config/systemd/user/pull.service create mode 100644 %HOME%/.config/systemd/user/pull.timer (limited to '%HOME%') diff --git a/%HOME%/.config/systemd/user/pull.service b/%HOME%/.config/systemd/user/pull.service new file mode 100644 index 0000000..6970520 --- /dev/null +++ b/%HOME%/.config/systemd/user/pull.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run pull.sh +Wants=ssh-agent.service + +[Service] +Type=simple +WorkingDirectory=/srv/git +ExecStartPre=/usr/bin/truncate --size=0K -- /srv/git/pull.log +ExecStart=/srv/git/pull.sh +StandardOutput=file:/srv/git/pull.log +StandardError=inherit diff --git a/%HOME%/.config/systemd/user/pull.timer b/%HOME%/.config/systemd/user/pull.timer new file mode 100644 index 0000000..b39b357 --- /dev/null +++ b/%HOME%/.config/systemd/user/pull.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run pull.sh periodically + +[Timer] +Persistent=false +OnCalendar=daily +AccuracySec=1 + +[Install] +WantedBy=timers.target -- cgit v1.2.3