Service doesn't start at boot
I created a service named fldcd, put the fldcd.service file in /usr/lib/systemd/system, executed systemctl enable fldcd.service, but in /etc/systemd/system there is no the link to the .service file.
I put the executable and the libraries in /usr/bin/fldc. Added this path in the file /etc/ld.so.conf.d/fldcd.conf.
This is the .service file:
**
[Unit]
Description=XXXXXXXXX
After=syslog.target network.target mariadb.target
Requires=mariadb.service
[Service]
Type=forking
ExecStart=/usr/bin/fldc/fldcd
Restart=always
**
I can start and stop the service but at boot it doesn't start.
If I remove the after and requires directive, the behavior is the same.
Could you help me? Thank you.
Responses
At first look it sounds that the service is not enabled to start on boot, please check. You could use 'systemctl is-enabled' command for respective service as similar to shown below:
#systemctl is-enabled sshd.service
If service is not enabled then enable it by running 'systemctl enable servicename'. This would create a symbolic link for the service in the respective target, I mean if the system is running in text mode then a link would get created in "/etc/systemd/system/multi-user.target.wants" directory.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
