Need some way to poke ZNC to reload it instead.
##
<bountysource-plugin>
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29395815-don-t-reload-znc-pem-on-every-client-connection?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
<!-- github-sync-id:123881054 -->
Just add an command like znc reloadcert or similar.
It will work for most purposes. Anyone who is using Letsencrypt (or any other CA) most likely already uses cron jobs to update the certificate and concatenate the cert files into znc.pem, so adding another cron job that reloads the cert after updating it shouldn't be an issue.
Just add an command like znc reloadcert or similar.
It will work for most purposes. Anyone who is using Letsencrypt (or any other CA) most likely already uses cron jobs to update the certificate and concatenate the cert files into znc.pem, so adding another cron job that reloads the cert after updating it shouldn't be an issue.
<!-- github-comment-id:172244139 -->
@muffeeee such command would require user to connect to ZNC via IRC protocol (and authenticate as some admin) from crontab.
@muffeeee such command would require user to connect to ZNC via IRC protocol (and authenticate as some admin) from crontab.
<!-- github-comment-id:172244279 -->
No, I'm not talking about an IRC command - I'm talking about a UNIX command that can also be run manually from a terminal session.
znc reloadcert
Either that, or make service znc reload also reload cert, or make something like service znc reloadcert
No, I'm not talking about an IRC command - I'm talking about a UNIX command that can also be run manually from a terminal session.
`znc reloadcert`
Either that, or make `service znc reload` also reload cert, or make something like `service znc reloadcert`
<!-- github-comment-id:172244580 -->
@muffeeee The second part only works when ZNC is set up as a service which is NOT the default configuration. The first operates on the principle that there's a way to pass a command to the running ZNC from the command like, which I don't think is possible as it currently exists.
@muffeeee The second part only works when ZNC is set up as a service which is NOT the default configuration. The first operates on the principle that there's a way to pass a command to the running ZNC from the command like, which I don't think is possible as it currently exists.
<!-- github-comment-id:172329895 -->
Either way, my znc doesn't reload the cert on every connection anyway for some reason, so I'm still stuck with a soon-to-expire cert unless I restart znc.
Either way, my znc doesn't reload the cert on every connection anyway for some reason, so I'm still stuck with a soon-to-expire cert unless I restart znc.
<!-- github-comment-id:172331576 -->
Either way, my znc doesn't reload the cert on every connection anyway for
some reason, so I'm still stuck with a soon-to-expire cert unless I restart
znc.
No permissions to read the file?
ZNC does NOT cache cert in memory yet. This bug is exactly about this.
2016-01-17 14:50 GMT+00:00 muffe notifications@github.com:
> Either way, my znc doesn't reload the cert on every connection anyway for
> some reason, so I'm still stuck with a soon-to-expire cert unless I restart
> znc.
>
> —
> Reply to this email directly or view it on GitHub
> https://github.com/znc/znc/issues/1215#issuecomment-172331576.
<!-- github-comment-id:172333379 -->
Is this bug about a performance improvement? Is there a significant impact? When I first read that znc reloaded it on every connection it seemed like a great idea to me.
Is this bug about a performance improvement? Is there a significant impact? When I first read that znc reloaded it on every connection it seemed like a great idea to me.
<!-- github-comment-id:175999811 -->
Yeah but the current behavior makes it easier to use it with letsencrypt (no need to do anything to reload certs), while this ticket is about not reloading it every time and possibly adding an extra manual reload step (which is how it works everywhere else, but still)
So I assume it's for performance reasons. Just wondering how big of a deal that is. I don't know znc's scalability requirements, either.
Yeah but the current behavior makes it _easier_ to use it with letsencrypt (no need to do anything to reload certs), while this ticket is about not reloading it every time and possibly adding an extra manual reload step (which is how it works everywhere else, but still)
So I assume it's for performance reasons. Just wondering how big of a deal that is. I don't know znc's scalability requirements, either.
<!-- github-comment-id:176038512 -->
From what I have understood the longer term aim is to
Start ZNC as root
ZNC reads certs from /etc/letsencrypt/whatever
3.ZNC becomes the normal user and continues normally.
Or at least that has been wished without having to manually copy LE certs around the system and lose automatic renewals.
From what I have understood the longer term aim is to
1. Start ZNC as root
2. ZNC reads certs from /etc/letsencrypt/whatever
3.ZNC becomes the normal user and continues normally.
Or at least that has been wished without having to manually copy LE certs around the system and lose automatic renewals.
<!-- github-comment-id:176043134 -->
If it's not done for performance benefit there is no reason to fix this. I consider it a feature.
And frankly the performance penalty of the file read is negligible. It's not a web server with thousands of connections requesting it constantly.
Otherwise triggering the reload of the certificate via handling SIGHUP is the best option.
Restarting znc to reload the certificate should not be considered.
If it's not done for performance benefit there is no reason to fix this. I consider it a feature.
And frankly the performance penalty of the file read is negligible. It's not a web server with thousands of connections requesting it constantly.
Otherwise triggering the reload of the certificate via handling SIGHUP is the best option.
Restarting znc to reload the certificate should not be considered.
<!-- github-comment-id:371477183 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Need some way to poke ZNC to reload it instead.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29395815-don-t-reload-znc-pem-on-every-client-connection?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).One option is to use inotify
Just add an command like znc reloadcert or similar.
It will work for most purposes. Anyone who is using Letsencrypt (or any other CA) most likely already uses cron jobs to update the certificate and concatenate the cert files into znc.pem, so adding another cron job that reloads the cert after updating it shouldn't be an issue.
@muffeeee such command would require user to connect to ZNC via IRC protocol (and authenticate as some admin) from crontab.
No, I'm not talking about an IRC command - I'm talking about a UNIX command that can also be run manually from a terminal session.
znc reloadcertEither that, or make
service znc reloadalso reload cert, or make something likeservice znc reloadcert@muffeeee The second part only works when ZNC is set up as a service which is NOT the default configuration. The first operates on the principle that there's a way to pass a command to the running ZNC from the command like, which I don't think is possible as it currently exists.
Either way, my znc doesn't reload the cert on every connection anyway for some reason, so I'm still stuck with a soon-to-expire cert unless I restart znc.
No permissions to read the file?
ZNC does NOT cache cert in memory yet. This bug is exactly about this.
2016-01-17 14:50 GMT+00:00 muffe notifications@github.com:
You could make ZNC reload all config files including znc.pem on SIGHUP, SIGUSR1, or SIGRTMIN.
Is this bug about a performance improvement? Is there a significant impact? When I first read that znc reloaded it on every connection it seemed like a great idea to me.
It's about LetsEncrypt, no one cared before it came.
Yeah but the current behavior makes it easier to use it with letsencrypt (no need to do anything to reload certs), while this ticket is about not reloading it every time and possibly adding an extra manual reload step (which is how it works everywhere else, but still)
So I assume it's for performance reasons. Just wondering how big of a deal that is. I don't know znc's scalability requirements, either.
From what I have understood the longer term aim is to
3.ZNC becomes the normal user and continues normally.
Or at least that has been wished without having to manually copy LE certs around the system and lose automatic renewals.
Certainly no, see #1233
That's the reason
If it's not done for performance benefit there is no reason to fix this. I consider it a feature.
And frankly the performance penalty of the file read is negligible. It's not a web server with thousands of connections requesting it constantly.
Otherwise triggering the reload of the certificate via handling SIGHUP is the best option.
Restarting znc to reload the certificate should not be considered.