Add a systemd service file to start the autotest babysitter. Systemd is
a new init system, present since Fedora 15, and provides advantages over
traditional System-V init scripts.

In order to use this service file:

1) Make sure your autotest install is under /usr/local/autotest (or then
modify the service file to suit your needs).
2) Make sure you've created a user named 'autotest', and that you made
it own /usr/local/autotest
3) Copy the service file to systemd service directory:

sudo cp $AUTOTEST_ROOT/utils/autotestd.service /etc/systemd/system/

4) Make systemd aware of it:

sudo systemctl daemon-reload

5) Start the service:

sudo systemctl start autotestd.service

6) Check its status:

autotestd.service - Autotest scheduler
          Loaded: loaded (/etc/systemd/system/autotestd.service)
          Active: active (running) since Wed, 25 May 2011 16:13:31 -0300; 57s 
ago
        Main PID: 1962 (monitor_db_baby)
          CGroup: name=systemd:/system/autotestd.service
                  ├ 1962 /usr/bin/python -u 
/usr/local/autotest/scheduler/monitor_db_babysitter
                  └ 1963 /usr/bin/python -u 
/usr/local/autotest/scheduler/monitor_db.py /usr/local/autotest/results

You're done.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 utils/autotestd.service |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
 create mode 100644 utils/autotestd.service

diff --git a/utils/autotestd.service b/utils/autotestd.service
new file mode 100644
index 0000000..2e7855e
--- /dev/null
+++ b/utils/autotestd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Autotest scheduler
+
+[Service]
+ExecStart=/usr/local/autotest/scheduler/monitor_db_babysitter
+User=autotest
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.5.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to