After spending much time configurating znc on OpenWrt with the helps from people on znc channel, I believe I have a pretty decent configration, and would like to suggest the following modifications to the znc package so other people can benefit from it.
-
Drop UCI config, and use znc's config directly.
-
With UCI config, it means the used config dir is temporary, and it makes modules like webadmin less useful. Also it makes remembering password for the sasl module very hard, which doesn't support specifying the password when loading the module. The same goes for using a pem file for the cert module and making it stick.
I know the znc package currently supports external config. But the problem is that the pid file is specified to live in
/tmp/etc/znc/znc.pid. I'm not sure if this directory will be created when the external config is used. Ideally, it should live in/var/run/znc/znc.pidwith/var/run/zncbe owned by a limited userznc(more on this later).
-
-
Use
sudoinstead ofsu- Using
suto switch user seems to be broken on CC r2. I constantly get error like "can not drop controlling terminal".
- Using
-
Drop the
droprootmodule- People on the znc channel urge me not to use the
droprootmodule. It's removed since znc v1.0. It's best to create a limitedzncuser and run znc with that user. The whole config dir should be owned by that user and the pid dir should be owned by that user too. Although I'm not sure if it's ok to make the znc package depend onshadow-useraddandsudo.
- People on the znc channel urge me not to use the
-
Other issues
- The cert package should depend on ca-certificates otherwise it will fail to auth.
- If you decide to keep UCI config. The
add_networkfunction in the init script is broken. It doesn't close theNetworktag, I can submit a PR if you want.
I would be grateful if you fixed these issues. This package is really confusing for me, coming from having set up ZNC on Pidora (Raspberry Pi Fedora Spin) previously. I don't understand why a UCI config system was implemented without a LuCI frontend; it just makes setup overcomplicated. I don't think a LuCI frontend would be very helpful anyway considering how straightforward ZNC's configuration file is. The way the OpenWRT package is now, I don't understand how to use ZNC's own configuration generator (znc --makeconf), which is straightforward and suggested on ZNC's website, with the OpenWRT package.