[systemd-devel] proper way to shutdown/reboot host with systemd

Lennart Poettering lennart at poettering.net
Tue Aug 26 10:32:52 PDT 2014


On Tue, 26.08.14 20:34, Vasiliy Tolstov (v.tolstov at selfip.ru) wrote:

> Hi. What is proper way to shutdown systemd enabled host?
> I can run systemctl poweroff, do glibc call shutdown or run shutdown -P
> now...
> I'm prefer glibc call, does it proper shutdown system with systemd (and
> other init systems like sysvinit and upstart) ?

>From which language? From C, I'd recommend issuing the PowerOff() method
on logind's manager object via the bus. From the shell, i'd recommend
"systemctl poweroff", which does exactly that.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list