From 9af2567ab33463332897bec9f1de68f4a6f29c99 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sat, 16 Jan 2021 11:34:40 +0800 Subject: [PATCH] add systemd service --- pacroller.service | 8 ++++++++ pacroller.timer | 9 +++++++++ setup.py | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 pacroller.service create mode 100644 pacroller.timer diff --git a/pacroller.service b/pacroller.service new file mode 100644 index 0000000..0500b2a --- /dev/null +++ b/pacroller.service @@ -0,0 +1,8 @@ +[Unit] +Description=Unattended upgrade for archlinux +After=network-online.target + +[Service] +User=root +Type=simple +ExecStart=/usr/bin/pacroller run diff --git a/pacroller.timer b/pacroller.timer new file mode 100644 index 0000000..f8ca0af --- /dev/null +++ b/pacroller.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Scheduled unattended upgrade for archlinux + +[Timer] +OnCalendar=*-*-* 12:00:00 +RandomizedDelaySec=15m + +[Install] +WantedBy=timers.target diff --git a/setup.py b/setup.py index 5eae905..d2a1d8f 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( version="0.0.1", author="Jerry Xiao", author_email="pacroller@mail.jerryxiao.cc", - description="unattended pacman upgrade for archlinux", + description="unattended upgrade for archlinux", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/isjerryxiao/pacroller",