From 3af7406bf603a69f8257d45265476fe7a326ff35 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Mon, 1 Sep 2014 14:17:23 +0200 Subject: [PATCH] add totest manager as service --- osc-totest.py | 4 ++-- systemd/opensuse-totest-manager.service | 7 +++++++ systemd/opensuse-totest-manager.timer | 9 +++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 systemd/opensuse-totest-manager.service create mode 100644 systemd/opensuse-totest-manager.timer diff --git a/osc-totest.py b/osc-totest.py index 59ebba60..bf6a0283 100644 --- a/osc-totest.py +++ b/osc-totest.py @@ -17,8 +17,8 @@ from datetime import date from osc import cmdln, oscerr # Expand sys.path to search modules inside the pluging directory -_plugin_dir = os.path.expanduser('~/.osc-plugins') -sys.path.append(_plugin_dir) +PLUGINDIR = os.path.expanduser(os.path.dirname(os.path.realpath(__file__))) +sys.path.append(PLUGINDIR) from osclib.stagingapi import StagingAPI from osclib.comments import CommentAPI diff --git a/systemd/opensuse-totest-manager.service b/systemd/opensuse-totest-manager.service new file mode 100644 index 00000000..7cb79f4c --- /dev/null +++ b/systemd/opensuse-totest-manager.service @@ -0,0 +1,7 @@ +[Unit] +Description=openSUSE Factory ToTest Manager + +[Service] +ExecStart=/usr/bin/osc totest +User=_opensuse-totest-manager +SyslogIdentifier=opensuse-totest-manager diff --git a/systemd/opensuse-totest-manager.timer b/systemd/opensuse-totest-manager.timer new file mode 100644 index 00000000..4471d805 --- /dev/null +++ b/systemd/opensuse-totest-manager.timer @@ -0,0 +1,9 @@ +[Unit] +Description=openSUSE Factory ToTest Manager Timer + +[Timer] +OnUnitInactiveSec=15m +AccuracySec=5m + +[Install] +WantedBy=timers.target