Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/, net-irc/znc/files/
Date: Mon, 16 Jul 2018 07:07:31
Message-Id: 1531724625.e3b663adafd6756f5fd136e71e078fe31083eac8.sbraz@gentoo
1 commit: e3b663adafd6756f5fd136e71e078fe31083eac8
2 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 16 07:02:08 2018 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 16 07:03:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3b663ad
7
8 net-irc/znc: remove the last vulnerable version
9
10 Bug: https://bugs.gentoo.org/661228
11 Package-Manager: Portage-2.3.42, Repoman-2.3.9
12
13 net-irc/znc/Manifest | 2 -
14 net-irc/znc/files/README.gentoo | 22 ---
15 .../znc-1.6.1-create-pidfile-per-default.patch | 23 ---
16 net-irc/znc/files/znc-1.6.1-systemwideconfig.patch | 215 ---------------------
17 net-irc/znc/files/znc.initd-r1 | 39 ----
18 net-irc/znc/metadata.xml | 1 -
19 net-irc/znc/znc-1.6.6.ebuild | 129 -------------
20 7 files changed, 431 deletions(-)
21
22 diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
23 index eedc2aef66e..62133c7bbce 100644
24 --- a/net-irc/znc/Manifest
25 +++ b/net-irc/znc/Manifest
26 @@ -1,4 +1,2 @@
27 -DIST googletest-release-1.7.0.tar.gz 468653 BLAKE2B 8dfca8b79dcd7b64ce84bad11ee68c549f4fe3dff7638ed1d845af4a7f754ad5df782d2cbebdb9fecfda2499dae6585e07cda7a8c8c454f0b70723d5c9578aa4 SHA512 c623d5720c4ed574e95158529872815ecff478c03bdcee8b79c9b042a603533f93fe55f939bcfe2cd745ce340fd626ad6d9a95981596f1a4d05053d874cd1dfc
28 DIST gtest-ba96d0b1161f540656efdaed035b3c062b60e006.tar.gz 987370 BLAKE2B fcedfe559c4c93166962900117dc492da3cbb99165c30766c39131c20e3b41f057a31a8cb631beaca829c1e9966e90cbc37469ba56a5fc15a2bea86cbe401a63 SHA512 ce78098f973b45f4a177db387c42a56d5ea34407a2af278760b850c326e8450760a58991d62a5408f5df79f89fefd10fee71745b7e8669b2a6f74fa63a259600
29 -DIST znc-1.6.6.tar.gz 1471612 BLAKE2B 8bd977a95417c4259e9f38759d838f55a146f376dc8bb6230ab6e1b698fb7c9e060cbc237efd4e836961314abab56cc02e7c6bc74e40bad17abaf06e47fbb516 SHA512 cc5bc7328bfe36525ab215b4b53c7cd20aa02b41e7bb28507ff9d9632560f4c30396804e4b828bca0ece19f42813e3fce59d1bae639ea5fc149059f6979e63e7
30 DIST znc-1.7.1-rc1.tar.gz 2041320 BLAKE2B 62669b598d7423cb55fad458fe6172be36904e8599dcde757936883093f24deb6a5ed6a093e3e92854810f02e96372f44139f9807e70e0cf007de90a1373c6a8 SHA512 b4e223c86c75bc97620c52333d90d6458a02777dce9c629f8a095f8134a06992a60978b2fe8bbce29ed1155932f9f37e0a324a498ee16527b0235e4306c34973
31
32 diff --git a/net-irc/znc/files/README.gentoo b/net-irc/znc/files/README.gentoo
33 deleted file mode 100644
34 index 5b222a24f58..00000000000
35 --- a/net-irc/znc/files/README.gentoo
36 +++ /dev/null
37 @@ -1,22 +0,0 @@
38 -To run znc as a user, run 'znc --makeconf' to create a configuration file.
39 -
40 -If znc was compiled with the 'daemon' use flag, you may run
41 - emerge --config znc
42 -to configure it.
43 -
44 -To generate a new SSL certificate, run:
45 - znc --system-wide-config-as znc --makepem -d /var/lib/znc
46 -as root.
47 -
48 -If migrating from a user-based install, you can copy the existing
49 -configuration files:
50 - mkdir /var/lib/znc
51 - mv /home/$USER/.znc/* /var/lib/znc
52 - rm -rf /home/$USER/.znc
53 - chown -R znc:znc /var/lib/znc
54 -You may also adjust the location of the files and the user running znc
55 -in /etc/conf.d/znc instead.
56 -
57 -To run as a daemon, please make sure that your configuration contains
58 - PidFile = /run/znc/znc.pid
59 -or that the PidFile value matches the one in /etc/conf.d/znc.
60
61 diff --git a/net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch b/net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch
62 deleted file mode 100644
63 index 8419e9344bf..00000000000
64 --- a/net-irc/znc/files/znc-1.6.1-create-pidfile-per-default.patch
65 +++ /dev/null
66 @@ -1,23 +0,0 @@
67 -Add PidFile option to new configurations per default
68 -
69 -Our runscript requires that ZNC creates a pidfile. This patch will add
70 -the PidFile directive to ZNC's default configuration.
71 ----
72 - src/znc.cpp | 1 +
73 - 1 file changed, 1 insertion(+)
74 -
75 -diff --git a/src/znc.cpp b/src/znc.cpp
76 -index b33e860..4a02568 100644
77 ---- a/src/znc.cpp
78 -+++ b/src/znc.cpp
79 -@@ -575,6 +575,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
80 - VCString vsLines;
81 -
82 - vsLines.push_back(MakeConfigHeader());
83 -+ vsLines.push_back("PidFile = /run/znc/znc.pid");
84 - vsLines.push_back("Version = " + CString(VERSION_STR));
85 -
86 - m_sConfigFile = ExpandConfigPath(sConfigFile);
87 ---
88 -2.5.0
89 -
90
91 diff --git a/net-irc/znc/files/znc-1.6.1-systemwideconfig.patch b/net-irc/znc/files/znc-1.6.1-systemwideconfig.patch
92 deleted file mode 100644
93 index d28fa30c219..00000000000
94 --- a/net-irc/znc/files/znc-1.6.1-systemwideconfig.patch
95 +++ /dev/null
96 @@ -1,215 +0,0 @@
97 -Add system-wide daemon support.
98 -
99 -This patch adds system-wide daemon support to ZNC so that you can run
100 -one ZNC instance system-wide using the new "--system-wide-config-as"
101 -option.
102 -
103 -Patch is based on @mrueg version from 2012.
104 -
105 -X-Gentoo-Bug: 438430
106 -X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=438430
107 ----
108 - include/znc/znc.h | 3 ++
109 - src/main.cpp | 83 ++++++++++++++++++++++++++++++++++++++++---------------
110 - src/znc.cpp | 7 ++++-
111 - 3 files changed, 70 insertions(+), 23 deletions(-)
112 -
113 -diff --git a/include/znc/znc.h b/include/znc/znc.h
114 -index cf2326e..16394f9 100644
115 ---- a/include/znc/znc.h
116 -+++ b/include/znc/znc.h
117 -@@ -187,6 +187,8 @@ public:
118 -
119 - static void DumpConfig(const CConfig* Config);
120 -
121 -+ void SetSystemWideConfig(bool systemWideConfig);
122 -+
123 - private:
124 - CFile* InitPidFile();
125 - bool DoRehash(CString& sError);
126 -@@ -231,6 +233,7 @@ protected:
127 - unsigned int m_uiConnectPaused;
128 - TCacheMap<CString> m_sConnectThrottle;
129 - bool m_bProtectWebSessions;
130 -+ bool m_bSystemWideConfig;
131 - bool m_bHideVersion;
132 - };
133 -
134 -diff --git a/src/main.cpp b/src/main.cpp
135 -index 09b2c9c..bd5cca6 100644
136 ---- a/src/main.cpp
137 -+++ b/src/main.cpp
138 -@@ -16,6 +16,9 @@
139 -
140 - #include <znc/znc.h>
141 - #include <signal.h>
142 -+#include <sys/types.h>
143 -+#include <pwd.h>
144 -+#include <grp.h>
145 -
146 - #if defined(HAVE_LIBSSL) && defined(HAVE_PTHREAD)
147 - #include <znc/Threads.h>
148 -@@ -99,34 +102,36 @@ static inline int getopt_long(int argc, char * const argv[], const char *optstri
149 - #endif
150 -
151 - static const struct option g_LongOpts[] = {
152 -- { "help", no_argument, 0, 'h' },
153 -- { "version", no_argument, 0, 'v' },
154 -- { "debug", no_argument, 0, 'D' },
155 -- { "foreground", no_argument, 0, 'f' },
156 -- { "no-color", no_argument, 0, 'n' },
157 -- { "allow-root", no_argument, 0, 'r' },
158 -- { "makeconf", no_argument, 0, 'c' },
159 -- { "makepass", no_argument, 0, 's' },
160 -- { "makepem", no_argument, 0, 'p' },
161 -- { "datadir", required_argument, 0, 'd' },
162 -+ { "help", no_argument, 0, 'h' },
163 -+ { "version", no_argument, 0, 'v' },
164 -+ { "debug", no_argument, 0, 'D' },
165 -+ { "foreground", no_argument, 0, 'f' },
166 -+ { "no-color", no_argument, 0, 'n' },
167 -+ { "allow-root", no_argument, 0, 'r' },
168 -+ { "makeconf", no_argument, 0, 'c' },
169 -+ { "makepass", no_argument, 0, 's' },
170 -+ { "makepem", no_argument, 0, 'p' },
171 -+ { "datadir", required_argument, 0, 'd' },
172 -+ { "system-wide-config-as", required_argument, 0, 'S' },
173 - { 0, 0, 0, 0 }
174 - };
175 -
176 - static void GenerateHelp(const char *appname) {
177 - CUtils::PrintMessage("USAGE: " + CString(appname) + " [options]");
178 - CUtils::PrintMessage("Options are:");
179 -- CUtils::PrintMessage("\t-h, --help List available command line options (this page)");
180 -- CUtils::PrintMessage("\t-v, --version Output version information and exit");
181 -- CUtils::PrintMessage("\t-f, --foreground Don't fork into the background");
182 -- CUtils::PrintMessage("\t-D, --debug Output debugging information (Implies -f)");
183 -- CUtils::PrintMessage("\t-n, --no-color Don't use escape sequences in the output");
184 -- CUtils::PrintMessage("\t-r, --allow-root Don't complain if ZNC is run as root");
185 -- CUtils::PrintMessage("\t-c, --makeconf Interactively create a new config");
186 -- CUtils::PrintMessage("\t-s, --makepass Generates a password for use in config");
187 -+ CUtils::PrintMessage("\t-h, --help List available command line options (this page)");
188 -+ CUtils::PrintMessage("\t-v, --version Output version information and exit");
189 -+ CUtils::PrintMessage("\t-f, --foreground Don't fork into the background");
190 -+ CUtils::PrintMessage("\t-D, --debug Output debugging information (Implies -f)");
191 -+ CUtils::PrintMessage("\t-n, --no-color Don't use escape sequences in the output");
192 -+ CUtils::PrintMessage("\t-r, --allow-root Don't complain if ZNC is run as root");
193 -+ CUtils::PrintMessage("\t-c, --makeconf Interactively create a new config");
194 -+ CUtils::PrintMessage("\t-s, --makepass Generates a password for use in config");
195 - #ifdef HAVE_LIBSSL
196 -- CUtils::PrintMessage("\t-p, --makepem Generates a pemfile for use with SSL");
197 -+ CUtils::PrintMessage("\t-p, --makepem Generates a pemfile for use with SSL");
198 - #endif /* HAVE_LIBSSL */
199 -- CUtils::PrintMessage("\t-d, --datadir Set a different ZNC repository (default is ~/.znc)");
200 -+ CUtils::PrintMessage("\t-d, --datadir Set a different ZNC repository (default is ~/.znc)");
201 -+ CUtils::PrintMessage("\t-S, --system-wide-config-as Create a system-wide ZNC daemon configuration");
202 - }
203 -
204 - static void die(int sig) {
205 -@@ -192,6 +197,8 @@ int main(int argc, char** argv) {
206 - bool bMakeConf = false;
207 - bool bMakePass = false;
208 - bool bAllowRoot = false;
209 -+ bool bSystemWideConfig = false;
210 -+ CString sSystemWideConfigUser = "znc";
211 - bool bForeground = false;
212 - #ifdef ALWAYS_RUN_IN_FOREGROUND
213 - bForeground = true;
214 -@@ -201,7 +208,7 @@ int main(int argc, char** argv) {
215 - #endif
216 - CZNC::CreateInstance();
217 -
218 -- while ((iArg = getopt_long(argc, argv, "hvnrcspd:Df", g_LongOpts, &iOptIndex)) != -1) {
219 -+ while ((iArg = getopt_long(argc, argv, "hvnrcspd:DfS:", g_LongOpts, &iOptIndex)) != -1) {
220 - switch (iArg) {
221 - case 'h':
222 - GenerateHelp(argv[0]);
223 -@@ -219,6 +226,10 @@ int main(int argc, char** argv) {
224 - case 'c':
225 - bMakeConf = true;
226 - break;
227 -+ case 'S':
228 -+ bSystemWideConfig = true;
229 -+ sSystemWideConfigUser = optarg;
230 -+ break;
231 - case 's':
232 - bMakePass = true;
233 - break;
234 -@@ -254,8 +265,36 @@ int main(int argc, char** argv) {
235 - return 1;
236 - }
237 -
238 -+ if (bSystemWideConfig && getuid() == 0) {
239 -+ struct passwd *pwd;
240 -+
241 -+ pwd = getpwnam(sSystemWideConfigUser.c_str());
242 -+ if (pwd == NULL) {
243 -+ CUtils::PrintError("Daemon user not found.");
244 -+ return 1;
245 -+ }
246 -+
247 -+ if ((long) pwd->pw_uid == 0) {
248 -+ CUtils::PrintError("Please define a daemon user other than root.");
249 -+ return 1;
250 -+ }
251 -+ if (setgroups(0, NULL) != 0) {
252 -+ CUtils::PrintError("setgroups: Unable to clear supplementary group IDs");
253 -+ return 1;
254 -+ }
255 -+ if (setgid((long) pwd->pw_gid) != 0) {
256 -+ CUtils::PrintError("setgid: Unable to drop group privileges");
257 -+ return 1;
258 -+ }
259 -+ if (setuid((long) pwd->pw_uid) != 0) {
260 -+ CUtils::PrintError("setuid: Unable to drop user privileges");
261 -+ return 1;
262 -+ }
263 -+ }
264 -+
265 - CZNC* pZNC = &CZNC::Get();
266 - pZNC->InitDirs(((argc) ? argv[0] : ""), sDataDir);
267 -+ pZNC->SetSystemWideConfig(bSystemWideConfig);
268 -
269 - #ifdef HAVE_LIBSSL
270 - if (bMakePem) {
271 -@@ -304,7 +343,7 @@ int main(int argc, char** argv) {
272 - CUtils::PrintStatus(true, "");
273 - }
274 -
275 -- if (isRoot()) {
276 -+ if (isRoot() && !bSystemWideConfig) {
277 - CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
278 - CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
279 - if (!bAllowRoot) {
280 -diff --git a/src/znc.cpp b/src/znc.cpp
281 -index 78cda1a..b33e860 100644
282 ---- a/src/znc.cpp
283 -+++ b/src/znc.cpp
284 -@@ -55,6 +55,7 @@ CZNC::CZNC() {
285 - m_sConnectThrottle.SetTTL(30000);
286 - m_pLockFile = NULL;
287 - m_bProtectWebSessions = true;
288 -+ m_bSystemWideConfig = false;
289 - m_bHideVersion = false;
290 - m_uDisabledSSLProtocols = Csock::EDP_SSL;
291 - m_sSSLProtocols = "";
292 -@@ -861,7 +862,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
293 - CUtils::PrintMessage("");
294 -
295 - File.UnLock();
296 -- return bFileOpen && CUtils::GetBoolInput("Launch ZNC now?", true);
297 -+ return bFileOpen && !m_bSystemWideConfig && CUtils::GetBoolInput("Launch ZNC now?", true);
298 - }
299 -
300 - void CZNC::BackupConfigOnce(const CString& sSuffix) {
301 -@@ -1973,3 +1974,7 @@ void CZNC::LeakConnectQueueTimer(CConnectQueueTimer *pTimer) {
302 - bool CZNC::WaitForChildLock() {
303 - return m_pLockFile && m_pLockFile->ExLock();
304 - }
305 -+
306 -+void CZNC::SetSystemWideConfig(bool systemWideConfig) {
307 -+ m_bSystemWideConfig = systemWideConfig;
308 -+}
309 ---
310 -2.5.0
311 -
312
313 diff --git a/net-irc/znc/files/znc.initd-r1 b/net-irc/znc/files/znc.initd-r1
314 deleted file mode 100644
315 index dedb44b1362..00000000000
316 --- a/net-irc/znc/files/znc.initd-r1
317 +++ /dev/null
318 @@ -1,39 +0,0 @@
319 -#!/sbin/openrc-run
320 -# Copyright 1999-2015 Gentoo Foundation
321 -# Distributed under the terms of the GNU General Public License v2
322 -
323 -extra_commands="config"
324 -extra_started_commands="reload save"
325 -command="/usr/bin/znc"
326 -command_args="--datadir \"${ZNC_DATADIR}\""
327 -pidfile="${ZNC_PIDFILE:-/run/znc/znc.pid}"
328 -user=${ZNC_USER:-znc}
329 -group=${ZNC_GROUP:-znc}
330 -start_stop_daemon_args="--chdir \"${ZNC_DATADIR}\" --user ${user} --group ${group} ${ZNC_SSDARGS}"
331 -retry="${ZNC_TERMTIMEOUT}"
332 -
333 -required_dirs="${ZNC_DATADIR}"
334 -
335 -depend() {
336 - use dns logger
337 -}
338 -
339 -start_pre() {
340 - checkpath -d -m 0770 -o ${user}:${group} "$(dirname ${pidfile})"
341 -}
342 -
343 -stop_post() {
344 - rm -f "${pidfile}"
345 -}
346 -
347 -reload() {
348 - ebegin "Reloading ZNC Configuration File from Disk"
349 - start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
350 - eend $?
351 -}
352 -
353 -save() {
354 - ebegin "Saving ZNC Configuration File to Disk"
355 - start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}"
356 - eend $?
357 -}
358
359 diff --git a/net-irc/znc/metadata.xml b/net-irc/znc/metadata.xml
360 index 16293e77692..b58dd845044 100644
361 --- a/net-irc/znc/metadata.xml
362 +++ b/net-irc/znc/metadata.xml
363 @@ -6,7 +6,6 @@
364 <name>Louis Sautier</name>
365 </maintainer>
366 <use>
367 - <flag name="daemon">Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.</flag>
368 <flag name="zlib">Enable mod_deflate-like gzip support for znc's web interface using <pkg>sys-libs/zlib</pkg>.</flag>
369 </use>
370 <upstream>
371
372 diff --git a/net-irc/znc/znc-1.6.6.ebuild b/net-irc/znc/znc-1.6.6.ebuild
373 deleted file mode 100644
374 index 76b253fef23..00000000000
375 --- a/net-irc/znc/znc-1.6.6.ebuild
376 +++ /dev/null
377 @@ -1,129 +0,0 @@
378 -# Copyright 1999-2018 Gentoo Foundation
379 -# Distributed under the terms of the GNU General Public License v2
380 -
381 -EAPI=6
382 -
383 -PYTHON_COMPAT=( python3_{4,5,6} )
384 -inherit eutils python-single-r1 readme.gentoo-r1 systemd user
385 -
386 -MY_PV=${PV/_/-}
387 -GTEST_VER="1.7.0"
388 -GTEST_URL="https://github.com/google/googletest/archive/release-${GTEST_VER}.tar.gz -> googletest-release-${GTEST_VER}.tar.gz"
389 -
390 -DESCRIPTION="An advanced IRC Bouncer"
391 -HOMEPAGE="https://znc.in"
392 -SRC_URI="
393 - http://znc.in/releases/archive/${PN}-${MY_PV}.tar.gz
394 - test? ( ${GTEST_URL} )
395 -"
396 -
397 -LICENSE="Apache-2.0"
398 -SLOT="0"
399 -KEYWORDS="amd64 arm x86"
400 -IUSE="daemon debug +ipv6 +icu libressl perl python +ssl sasl tcl test +zlib"
401 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
402 -
403 -RDEPEND="
404 - icu? ( dev-libs/icu:= )
405 - perl? ( >=dev-lang/perl-5.10:= )
406 - python? ( ${PYTHON_DEPS} )
407 - sasl? ( >=dev-libs/cyrus-sasl-2 )
408 - ssl? (
409 - !libressl? ( dev-libs/openssl:0= )
410 - libressl? ( dev-libs/libressl:0= )
411 - )
412 - tcl? ( dev-lang/tcl:0= )
413 - zlib? ( sys-libs/zlib )
414 -"
415 -DEPEND="
416 - ${RDEPEND}
417 - virtual/pkgconfig
418 -"
419 -
420 -S=${WORKDIR}/${PN}-${MY_PV}
421 -
422 -PATCHES=(
423 - "${FILESDIR}"/${PN}-1.6.1-systemwideconfig.patch
424 - "${FILESDIR}"/${PN}-1.6.1-create-pidfile-per-default.patch
425 -)
426 -
427 -pkg_setup() {
428 - if use python; then
429 - python-single-r1_pkg_setup
430 - fi
431 - if use daemon; then
432 - enewgroup ${PN}
433 - enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
434 - # The home directory was previously set to /dev/null
435 - # This caused a bug with the systemd unit
436 - # https://bugs.gentoo.org/521916
437 - esethome ${PN} /var/lib/${PN}
438 - fi
439 -}
440 -
441 -src_configure() {
442 - econf \
443 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
444 - $(use_enable debug) \
445 - $(use_enable icu charset) \
446 - $(use_enable ipv6) \
447 - $(use_enable perl) \
448 - $(use_enable python) \
449 - $(use_enable sasl cyrus) \
450 - $(use_enable ssl openssl) \
451 - $(use_enable tcl) \
452 - $(use_enable zlib) \
453 - $(use_with test gtest "${WORKDIR}/googletest-release-${GTEST_VER}")
454 -}
455 -
456 -src_install() {
457 - default
458 - dodoc NOTICE
459 - if use daemon; then
460 - newinitd "${FILESDIR}"/znc.initd-r1 znc
461 - newconfd "${FILESDIR}"/znc.confd-r1 znc
462 - fi
463 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo") || die
464 - DISABLE_AUTOFORMATTING=1
465 - readme.gentoo_create_doc
466 -}
467 -
468 -pkg_postinst() {
469 - readme.gentoo_print_elog
470 - if [[ -d "${EROOT%/}"/etc/znc ]]; then
471 - ewarn "/etc/znc exists on your system."
472 - ewarn "Due to the nature of the contents of that folder,"
473 - ewarn "we have changed the default configuration to use"
474 - ewarn " /var/lib/znc"
475 - ewarn "please move /etc/znc to /var/lib/znc"
476 - ewarn "or adjust /etc/conf.d/znc"
477 - fi
478 -}
479 -
480 -pkg_config() {
481 - if use daemon; then
482 - if [[ -e "${EROOT%/}/var/lib/znc" ]]; then
483 - ewarn "${EROOT%/}/var/lib/znc already exists, aborting to avoid damaging"
484 - ewarn "any existing configuration. If you are sure you want"
485 - ewarn "to generate a new configuration, remove the folder"
486 - ewarn "and try again."
487 - else
488 - einfo "Press any key to interactively create a new configuration file"
489 - einfo "for znc."
490 - einfo "To abort, press Control-C"
491 - read
492 - mkdir -p "${EROOT%/}/var/lib/znc" || die
493 - chown -R ${PN}:${PN} "${EROOT%/}/var/lib/znc" ||
494 - die "Setting permissions failed"
495 - "${EROOT%/}"/usr/bin/znc --system-wide-config-as ${PN} -c -r -d "${EROOT%/}/var/lib/znc" ||
496 - die "Config failed"
497 - echo
498 - einfo "To start znc, run '/etc/init.d/znc start'"
499 - einfo "or add znc to a runlevel:"
500 - einfo " rc-update add znc default"
501 - fi
502 - else
503 - ewarn "To configure znc as a system-wide daemon you have to"
504 - ewarn "enable the 'daemon' use flag."
505 - fi
506 -}