/etc/systemd/system/is-active-user-sessions.timer [Unit] Description=Start check if there is actvie user sessions [Timer] OnBootSec=15min Unit=shutdown-no-user-sessions [Install] WantedBy=timers.target /etc/systemd/system/shutdown-no-user-sessions.service [Unit] Description=Shutdown if no actvie session [Service] Type=oneshot ExecStart=