Skip to content
Snippets Groups Projects
Commit a4c7dd66 authored by Jameson Rollins's avatar Jameson Rollins
Browse files

DAQD systemd service updates

* Use advligorts user for all services
* Move all transport to a single template service, e.g.:

    rts-transport@cps_xmit.service rts-transport@dix_recv.service

  This eases management, since they're all usign the same config.

* Source environment for command line arguments from:

    /etc/advligorts/systemd_env

  and additionally for transport and local_dc

    /etc/advligorts/systemd_env_%H

  These are systemd env files (see systemd.exec(5)), not shell, and
  command line arguments should be specified in LOWER CASE variables,
  e.g.:

    local_dc_args=...
    cps_xmit_args=...
    dix_recv_args=...
    standalone_edc_args=...
parent 3c314691
No related branches found
No related tags found
1 merge request!73DAQD systemd service updates
[Unit]
Description=Advanced LIGO RTS pub/sub transmitter
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/cps_xmit $CPS_XMIT_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=Advanced LIGO RTS DAQD
Description=Advanced LIGO RTS data acquisition daemon
After=network-online.target
[Service]
User=controls
User=advligorts
ExecStart=/usr/bin/daqd -c /etc/advligorts/daqdrc
Restart=always
......
[Unit]
Description=Advanced LIGO RTS Dolphin IX receiver
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/dix_recv $DIX_RECV_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=Advanced LIGO RTS Dolphin IX transmitter
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/dix_xmit $DIX_XMIT_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
......@@ -3,8 +3,9 @@ Description=Advanced LIGO RTS stand-alone EPICS data concentrator
After=network-online.target
[Service]
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/standalone_edc -i /etc/advligorts/edc.ini -I 0.0.0.0:9000 $STANDALONE_EDC_ARGS
User=advligorts
EnvironmentFile=-/etc/advligorts/systemd_env
ExecStart=/usr/bin/standalone_edc -i /etc/advligorts/edc.ini -I 0.0.0.0:9000 $standalone_edc_args
Restart=always
[Install]
......
......@@ -3,9 +3,10 @@ Description=Advanced LIGO RTS local data concentrator
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/local_dc $LOCAL_DC_ARGS
User=advligorts
EnvironmentFile=-/etc/advligorts/systemd_env
EnvironmentFile=-/etc/advligorts/systemd_env_%H
ExecStart=/usr/bin/local_dc $local_dc_args
Restart=always
RestartSec=5
......
[Unit]
Description=Advanced LIGO RTS OpenMX receiver
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/omx_recv $OMX_RECV_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=Advanced LIGO RTS OpenMX transmitter
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/omx_xmit $OMX_XMIT_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=Ensure the run number server is running
After=network.target
Description=Advanced LIGO RTS run number server
After=network-online.target
[Service]
User=controls
Group=controls
ExecStart=/usr/bin/run_number_server -v
WorkingDirectory=/var/lib/run_number
User=advligorts
StateDirectory=advligorts
ExecStart=/usr/bin/run_number_server -v --file $STATE_DIRECTORY/run_number
Restart=on-failure
[Install]
......
[Unit]
Description=Advanced LIGO RTS pub/sub receiver
Description=Advanced LIGO RTS DAQD transport
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/cps_recv $CPS_RECV_ARGS
User=advligorts
EnvironmentFile=-/etc/advligorts/systemd_env
EnvironmentFile=-/etc/advligorts/systemd_env_%H
ExecStart=/usr/bin/%i $%i_args
Restart=always
RestartSec=5
......
[Unit]
Description=Advanced LIGO RTS ZeroMQ receiver
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/zmq_recv $ZMQ_RECV_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
[Unit]
Description=Advanced LIGO RTS ZeroMQ transmitter
After=network-online.target
[Service]
User=controls
EnvironmentFile=/etc/advligorts/env
ExecStart=/usr/bin/zmq_xmit $ZMQ_XMIT_ARGS
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment