On 09/04/2016 01:28 PM, Joe Zeff wrote:
On 09/04/2016 11:59 AM, jd1008 wrote:
That's interesting. Then how does a script that IS startable and stoppable from the command line invoked as systemctl <start|stop> some-file.service
The service may need to be stopped, started or restarted manually, but it's normally only invoked during boot.
Starting and shutting down specific services should be totally at the discretion of the user/administrator even during system normal operations.
Apparently you did not know about the stop command and are making incorrect assertion.
From the man page of systemctl, unit commands can be:
start NAME... Start (activate) one or more units specified on the command line.
stop NAME... Stop (deactivate) one or more units specified on the command line.
reload NAME... Asks all units listed on the command line to reload their configuration. Note that this will reload the service-specific configuration, not the unit configuration file of systemd. If you want systemd to reload the configuration file of a unit, use the daemon-reload command. In other words: for the example case of Apache, this will reload Apache's httpd.conf in the web server, not the apache.service systemd unit file.
This command should not be confused with the daemon-reload command.
restart NAME... Restart one or more units specified on the command line. If the units are not running yet, they will be started.
try-restart NAME... Restart one or more units specified on the command line if the units are running. This does nothing if units are not running. Note that, for compatibility with Red Hat init scripts, condrestart is equivalent to this command.
reload-or-restart NAME... Reload one or more units if they support it. If not, restart them instead. If the units are not running yet, they will be started.
reload-or-try-restart NAME...