Assume that there's an application
app installed in the server, and it provides an application control called
appctl. As an administrator, I can start/stop/restart the application via
appctl start appctl stop appctl restart
Then I realized that I should use
systemctl to do this, so I wrote a
app.service and linked the service file to
/etc/systemd/system. After reloading the daemon, I can start/stop/restart the application via
systemctl start app.service systemctl stop app.service systemctl restart app.service
Now my question comes: After stopping my application using
appctl restart, the status in system
systemctl status app.service said inactive (dead) since 1 hour ago. This does not reflect to the real status of the application. Is it acceptable?
Personally I feel it normal, because I didn't use
systemctl to restart. But I'd like to have more arguments, like quotes from documentation, analysis of the
systemctl internal mechanism.