From eeb29c3e70c2e321c5a1cea4180f424beb4e0f8e Mon Sep 17 00:00:00 2001 From: Bruno Carlin Date: Fri, 28 Sep 2018 11:27:46 +0200 Subject: [PATCH] add units to automatically sync notebook --- systemd/.config/systemd/user/syncnotebook.service | 6 ++++++ systemd/.config/systemd/user/syncnotebook.timer | 11 +++++++++++ .../user/timers.target.wants/syncnotebook.timer | 1 + 3 files changed, 18 insertions(+) create mode 100644 systemd/.config/systemd/user/syncnotebook.service create mode 100644 systemd/.config/systemd/user/syncnotebook.timer create mode 120000 systemd/.config/systemd/user/timers.target.wants/syncnotebook.timer diff --git a/systemd/.config/systemd/user/syncnotebook.service b/systemd/.config/systemd/user/syncnotebook.service new file mode 100644 index 0000000..ddd9274 --- /dev/null +++ b/systemd/.config/systemd/user/syncnotebook.service @@ -0,0 +1,6 @@ +[Unit] +Description=Synchronize local notebook + +[Service] +Type=oneshot +ExecStart=/home/bca/.local/bin/syncnotebook diff --git a/systemd/.config/systemd/user/syncnotebook.timer b/systemd/.config/systemd/user/syncnotebook.timer new file mode 100644 index 0000000..d88f147 --- /dev/null +++ b/systemd/.config/systemd/user/syncnotebook.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Notebook synchronization timer + +[Timer] +OnBootSec=5m +OnUnitActiveSec=5m +Persistent=true +Unit=syncnotebook.service + +[Install] +WantedBy=timers.target diff --git a/systemd/.config/systemd/user/timers.target.wants/syncnotebook.timer b/systemd/.config/systemd/user/timers.target.wants/syncnotebook.timer new file mode 120000 index 0000000..bc8d72d --- /dev/null +++ b/systemd/.config/systemd/user/timers.target.wants/syncnotebook.timer @@ -0,0 +1 @@ +/home/bca/.config/systemd/user/syncnotebook.timer \ No newline at end of file