0

On my CentOS 7.6.1810, I have a service run with systemctl. The service executes on startup/shutdown/reboot to start a specific server:

systemctl status qronos
● qronos.service - SYSV: script
   Loaded: loaded (/etc/rc.d/init.d/qronos; enabled; vendor preset: disabled)
   Active: active (exited) since mer. 2019-06-12 14:46:41 CEST; 18min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3646 ExecStart=/etc/rc.d/init.d/qronos start (code=exited, status=0/SUCCESS)
    Tasks: 0


# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/qronos
Description=SYSV: script d arret et de demarage de QRONOS
Before=runlevel2.target
Before=runlevel3.target
Before=runlevel4.target
Before=runlevel5.target
After=network-online.target
After=network.service

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/etc/rc.d/init.d/qronos start
ExecStop=/etc/rc.d/init.d/qronos stop

It works on startup, but when I reboot or shutdown the command in execstop doesn't work correctly. I receive the message:

a stop job is running for session c1 of user toto

The stop script is compiled, but i know that it uses sockets

I think I missed a requirement, but I don't know. Or it may be the order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.