Our application uses an init.d script to start and stop the application as a service. Under CentOS 7, /sbin/init is symlinked to systemd, so I can start my application using either:
service myapp start or
systemctl start myapp The issue I am having is that running stop on the service using either service or systemctl will not stop my application. The output of systemctl status:
[root@nec04 ~]# systemctl status myapp myapp.service - SYSV: Service script to start/stop my application Loaded: loaded (/etc/rc.d/init.d/myapp) Active: inactive (dead) since Mon 2015-10-05 15:17:41 CEST; 22h ago Process: 31850 ExecStop=/etc/rc.d/init.d/myapp stop (code=exited, status=0/SUCCESS) Process: 21054 ExecStart=/etc/rc.d/init.d/myapp start (code=exited, status=0/SUCCESS) Using the service command:
[root@nec04 ~]# service myapp status Local database at :3307 is started Watchdog is running Application is running Why does systemctl think my application is not running? Could it be that systemctl is not calling the stop function because it thinks my application is already stopped?