Systemd script for LDM

posted in: Technology | 0

Have you installed Unidata LDM on a Redhat 7 or CentOS 7 machine (or other system with systemd)? Well here is a script you can add to systemd to start on boot. This assumes your ldm is installed in /usr/local/ldm and the user is ldm

[Unit]
Description=Unidata Local Data Manager
After=network.target
[Service]
Type=forking
ExecStartPre=/usr/local/ldm/bin/ldmadmin delqueue
ExecStartPre=/usr/local/ldm/bin/ldmadmin mkqueue
ExecStart=/usr/local/ldm/bin/ldmadmin start
ExecStop=/usr/local/ldm/bin/ldmadmin stop
PIDFile=/usr/local/ldm/ldmd.pid
Restart=on-failure
SuccessExitStatus=1
User=ldm
[Install]
WantedBy=multi-user.target