Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assure armbian-hardware-monitor starts after armbian-firmboot and excutes cleanup steps on system shutdown. #1081

Open
ThomasKaiser opened this issue Aug 12, 2018 · 4 comments
Assignees

Comments

@ThomasKaiser
Copy link
Contributor

Since refactoring the services the stop case in armbian-hardware-monitor has become useless since never executed.

I tried to nail this down some time ago but to no avail. systemd NOOB still.

Related: To get nicer log output it would be great if armbian-hardware-monitor could wait for firstrun and resize2fs services to finish before starting to log. Also no idea how to achieve this.

@lanefu lanefu self-assigned this Sep 19, 2018
@lanefu
Copy link
Member

lanefu commented Sep 28, 2018

@ThomasKaiser

have any more details about what you mean by "since never executed" ?

I've just starting digging through the scripts and the forum to understand their role and make sense of it all.

@ThomasKaiser
Copy link
Contributor Author

The armbian-hardware-monitor script has a start and a stop case. But the script will never be called on shutdown. I don't think it's needed to understand anything inside the script(s) since it boils down to how systemd handles such stuff (keeping the script active or not, executing it on shutdown/reboot).

@sfx2000
Copy link
Collaborator

sfx2000 commented Oct 2, 2018

with systemd - calling init is calling systemd already - so the start/stop events in the script aren't particularly needed

@lanefu
Copy link
Member

lanefu commented Dec 19, 2018

Okay so according to the systemd.service docs, the unit file for the armbian-hardware-monitor service does the right thing and the shutdown cleanup steps should be happening.

Since the job is a oneshot, and has the RemainAfterExit flag is true, the ExecStop command is supposed to be executed.

see example 3 https://www.freedesktop.org/software/systemd/man/systemd.service.html#Examples

Anyway that's the should.

The reality is that I'm not seeing ###shutdown logged anywhere in /var/log/armbian-hardware-monitor.log to indicate the stop command is actually happening...

I'm going to rename issue for clarity now that i understand it.

@lanefu lanefu changed the title Monitoring issues assure armbian-hardware-monitor starts after armbian-firmboot and excutes cleanup steps on system shutdown. Dec 19, 2018
@lanefu lanefu added stale and removed stale labels Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants