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

Fix errors on logging configuration #1362

Merged
merged 1 commit into from
Oct 11, 2021
Merged

Fix errors on logging configuration #1362

merged 1 commit into from
Oct 11, 2021

Conversation

MichaIng
Copy link
Contributor

rsyslog and/or logrotate may not be installed on the system, in which case creating the configurations may fail. As rsyslog and logrotate may be installed later on, it makes sense to pre-create those directories so that then OpenVPN logs are handled as expected.

Also, if the rsyslog service is not installed or not active, it should not and does not need to be restarted. Since there is not -e flag, || true has not effect, but also, when using that flag it makes sense to exit if for some reason the running service couldn't be restarted, which may then be caused by the added configuration.

rsyslog and/or logrotate may not be installed on the system, in which case creating the configurations may fail. As rsyslog and logrotate may be installed later on, it makes sense to pre-create those directories so that then OpenVPN logs are handled as expected.

Also, if the rsyslog service is not installed or not active, it should not and does not need to be restarted. Since there is not `-e` flag, ` || true` has not effect, but also, when using that flag it makes sense to exit if for some reason the running service couldn't be restarted, which may then be caused by the added configuration.

Signed-off-by: MichaIng <[email protected]>
@coolapso
Copy link
Member

LGTM, any open issue this is related to?

@MichaIng
Copy link
Contributor Author

MichaIng commented Oct 11, 2021

Here is a report on our repo: MichaIng/DietPi#4825 (comment)
The actual OP issue is/was a different one during package installs, where issues exist here already, but its good to address/mute uncritical error messages to not disturb debugging of critical issues (where I'll have another look at when I find time).

@coolapso
Copy link
Member

can you confirm if this is related too? #1360

@coolapso
Copy link
Member

Merging regardless, thanks a lot once again!

@coolapso coolapso merged commit 090642f into pivpn:test Oct 11, 2021
@MichaIng
Copy link
Contributor Author

MichaIng commented Oct 11, 2021

Yes exactly, though I didn't replicate yet. Looks like a bug in the packages's maintainer script or perl functions, probably related to a debconf call, not sure yet 🤔.

@MichaIng MichaIng deleted the patch-1 branch October 11, 2021 13:41
@FrostyMisa
Copy link

I want to add here, problem with install script for pivpn-WireGuard (not in Dietpi, I run it from website), I download clean Dietpi image for both (Raspberry pi 4b and zero w in same time, both 32 bit and in clean system I install with pivpn script WireGuard on both, but zero works without problem. No problem with debconf, don't need manually install iptables-persistent or unattended-updates. Buster, same day download, only different raspberry. Zero without problems, pi4 have problem in my report here

@coolapso
Copy link
Member

coolapso commented Oct 11, 2021

this is becoming too much to handle with all different Boards/Os ... think making a docker version might become very urgent soon, lets hope i find time to work on it soon...

@MichaIng
Copy link
Contributor Author

That is an issue with debconf and I guess either/or when STDIN and/or STDOUT are redirected, however not related to this PR at all. Check out discussion at the issue you linked to investigate what happens there.

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.

None yet

3 participants