Skip to content

Conversation

@mritd
Copy link

@mritd mritd commented Oct 9, 2022

add launchd log file

Signed-off-by: kovacs mritd@linux.com

add launchd log file

Signed-off-by: kovacs <mritd@linux.com>
add '-w' option

Signed-off-by: kovacs <mritd@linux.com>
ret = err
}
out, err = exec.Command("launchctl", "unload", sysPlist).CombinedOutput()
out, err = exec.Command("launchctl", "unload", "-w", sysPlist).CombinedOutput()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know when launctl added the -w flag? macOS releases back to 10.13 are supported.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't found a changelog for launctl, so I'm not sure if the -w option is available in 10.13, unfortunately I don't currently have a 10.13 system.

So do I need to remove this option? Or do some other work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to exist at least as of Sept. 2016, per the source code for launchctl:
https://github.com/apple-opensource/launchd/blob/master/support/launchctl.c#L2649-L2651

That source release is launchd 842.92.1, which was in macOS 10.9.5, before 10.13.

Comment on lines +46 to +51
<key>StandardOutPath</key>
<string>/var/log/tailscaled.log</string>
<key>StandardErrorPath</key>
<string>/var/log/tailscaled.log</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these get rotated?

Is it okay/defined for stdout+stderr to have the same value?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the log size is unlimited, a feasible solution is to increase the newsyslog configuration, such as /etc/newsyslog.d/wifi.conf.

If the log is not configured, it seems that the log will be discarded and cannot be viewed.

@mritd mritd closed this Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants