Would like to have the option of installing an shutdown timer - the easy “dietpi-way”
Has this been seen or is it an absolute no-go?
Br.
Christian
Actually the shutdown commands had a timer function: https://manpages.debian.org/buster/systemd-sysv/shutdown
But it requires dbus and logind to work:
systemctl unmask systemd-logind
apt update
apt install libpam-systemd
Hi,
I don`t think that this will be realised shortly.
Anyway it’s not that complicated. First you would need to install dbus package
apt-get install dbus
and unmask the the following service
systemctl unmask systemd-logind.service
Scheduling a shutdown run the command:
sudo shutdown -P 60
That will wait 60 mins before starting the shutdown sequence.
You could do as well
sudo shutdown -P 1:00
to shutdown at 1 AM and
sudo shutdown -P now
to shutdown now.
A message is broadcast to all terminals to warn about the shutdown.
Cancel a pending shutdown, if the time argument is not “+0” or “now”, you can use:
sudo shutdown -c
ahh shit I’m way to slow MichaIng
But I used dbus and not libpam-systemd. Does that make any differences?
libpam-systemd pulls dbus as dependency. I was not sure if dbus is sufficient or systemd-logind (libpam-systemd for full support) required. At least for non-root calls the later is required from what I found.