fixing FRED autostart @Ubuntu 16.04

Piotr Przybył piotr at przybyl.org
Fri Aug 19 15:36:17 CEST 2016


Hello everyone

I have some remarks about starting FRED components automatically after boot in Ubuntu 16.04 LTS
xenial. If anyone has some input, please share.

First, I suspect that upstart job definitions are obsolete and should removed. I mean the files:
/etc/init/fred-adifd.conf
/etc/init/fred-logd.conf
/etc/init/fred-msgd.conf
/etc/init/fred-pifd.conf
/etc/init/fred-rifd.conf

Next, right after installation the services of FRED were not enabled, hence:

# cd /lib/systemd/system
# systemctl enable fred*

This is not enough, since fred-pyfred failed because it was started too early (before omniorb name
server), therefore I modified unit definition of fred-pyfred in
/lib/systemd/system/fred-pyfred.service
so now it looks like this:

[Unit]
Description=fred-pyfred
After=omniorb4-nameserver.service
#ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
Requires=omniorb4-nameserver.service

[Service]
User=fred
WorkingDirectory=/
StandardOutput=null
StandardError=null
ExecStart=/usr/sbin/fred-pyfred -d
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target


and generates the following result:

# systemd-analyze critical-chain fred-pyfred.service
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

fred-pyfred.service @6.814s
└─omniorb4-nameserver.service @6.774s +23ms
  └─network-online.target @6.764s
    └─NetworkManager-wait-online.service @927ms +5.837s
      └─NetworkManager.service @665ms +185ms
        └─dbus.service @639ms
          └─basic.target @639ms
            └─sockets.target @639ms
              └─snapd.socket @637ms +1ms
                └─sysinit.target @634ms
                  └─swap.target @634ms
                    └─dev-disk-by\x2duuid-d8b40e4d\x2d4e62\x2d4436\x2db09b\x2d8cfc2a2d8a1d.swap
@629ms +3ms
                      └─dev-disk-by\x2duuid-d8b40e4d\x2d4e62\x2d4436\x2db09b\x2d8cfc2a2d8a1d.device
@623ms

(of course your delays will vary).

To check if FRED services are running, one may use
# systemctl status fred*

Maybe this page could get an update? https://fred.nic.cz/page/2906/installation-ubuntu/

Best regards
Piotr Przybył


More information about the fred-users mailing list