5,838
edits
m (A recent correction was muddling, made it clear) |
m (change heading) |
||
(One intermediate revision by the same user not shown) | |||
Line 479: | Line 479: | ||
You might expect <code>sudo systemctl disable fake-hwclock.service</code> (or remove the service, and modify the scripts that call it) could ensure the computer (if online) has to get a time found on the internet (NTP). Nothing is as simple as it might seem! | You might expect <code>sudo systemctl disable fake-hwclock.service</code> (or remove the service, and modify the scripts that call it) could ensure the computer (if online) has to get a time found on the internet (NTP). Nothing is as simple as it might seem! | ||
===Commands to | ===Commands to do actions on a service=== | ||
You will need to start (or restart) MX after you have defined (or redefined) the service as instructed above. The | You will need to start (or restart) MX after you have defined (or redefined) the service as instructed above. The specific commands to use with MX service are at [[Raspberry_Pi_Image#systemctl_commands|systemctl_commands]], here I simply repeat the basic commands that can be used with any service (status, enable, disable, start, stop, and restart). | ||
Don't forget you may need to type <code>sudo systemctl daemon-reload</code> to tell "systemd" that it needs to reload all service definitions whenever either one has changed, or a new one has been added. | |||
In all these commands, '''just replace [service_name] with ''cumulusmx''''' (or enter the name of another service). | In all these commands, '''just replace [service_name] with ''cumulusmx''''' (or enter the name of another service). | ||
* <code>sudo systemctl status [service_name]</code> | |||
* sudo systemctl | ** (displays whether named service has started, whether it has failed, whether it has stopped, also whether enabled, extra information will be added should status change) | ||
* | ** type the single character "q" to quit updating status display and return to prompt | ||
* sudo systemctl | * <code>sudo systemctl enable [service_name]</code> | ||
** (typed just once, and service named will automatically start when your Linux computer is booted) | |||
** the confirmation message says a link has been created | |||
* <code>sudo systemctl disable [service_name]</code> | |||
** (used when you don't want an automatic restart of the named service) | |||
* <code>sudo systemctl start [service_name]</code> | |||
** (will start the named service) | |||
* <code>sudo systemctl stop [service_name]</code> | |||
** (will stop the named service) | |||
** Closing MX with "cumulusmx" as the named service this way does a proper shutdown | |||
* <code>sudo systemctl restart [service_name]</code> | |||
** (issues a stop, then start, command to named service) | |||
** You can upgrade MX by installing new files over the existing ones, while MX is left running, and then use this command to pick up new release with minimum downtime. |
edits