Code review comment for lp:~cypressyew/checkbox/systemd-server

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

The right way to enable the services would have been to use dh_systemd but this helper is not available for precise. So instead of creating post-installation scripts to enable them (that could lead to two runs on desktop systems), let's add the following lines to the server preseed:

systemctl enable checkbox-sru
systemctl enable checkbox-ci-installed-notifier

This will create the following needed symlinks in /etc/systemd/system/multi-user.target.wants:

checkbox-ci-installed-notifier.service -> /lib/systemd/system/checkbox-ci-installed-notifier.service
checkbox-sru.service -> /lib/systemd/system/checkbox-sru.service

With those symlinks, the two services are sucessfully started on boot (tested on a vivid server):

systemctl status checkbox-sru
● checkbox-sru.service - CheckBox SRU on server
   Loaded: loaded (/lib/systemd/system/checkbox-sru.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Fri 2015-05-08 16:14:31 CEST; 41s ago
  Process: 847 ExecStopPost=/bin/systemctl start checkbox-ci-mailer.service (code=exited, status=0/SUCCESS)
  Process: 831 ExecStart=/bin/systemctl start checkbox-ci-installed-notifier.service (code=exited, status=0/SUCCESS)
  Process: 827 ExecStartPre=/bin/mkdir -p /var/cache/plainbox (code=exited, status=0/SUCCESS)
 Main PID: 831 (code=exited, status=0/SUCCESS)

May 08 16:14:31 ubuntu systemd[1]: Starting CheckBox SRU on server...
May 08 16:14:31 ubuntu systemd[1]: Started CheckBox SRU on server.

« Back to merge proposal