From 4ad98d43aaf44f1f60ef963a80ae40f411934b88 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 18 Jun 2016 08:36:57 +0200 Subject: [PATCH] added pdns use-flag Signed-off-by: Michael Kaufmann (d00p) --- .gitignore | 6 +++++ profiles/use.local.desc | 1 + www-apps/froxlor/froxlor-9999.ebuild | 38 +++++++++++++++++++++------- 3 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a4399c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.buildpath +.project +.settings/ +*.diff +*~ + diff --git a/profiles/use.local.desc b/profiles/use.local.desc index 249e60f..d6c2dd8 100644 --- a/profiles/use.local.desc +++ b/profiles/use.local.desc @@ -13,6 +13,7 @@ www-apps/froxlor:lighttpd - use ligHTTPd instead of Apache www-apps/froxlor:log - Adds support for logging actions in the Panel www-apps/froxlor:mailquota - Adds support for Quotas for the maildirs of Customers www-apps/froxlor:nginx - use nginx instead of Apache +www-apps/froxlor:pdns - use Power-DNS instead of Bind www-apps/froxlor:pureftpd - use pure-FTPd instead of ProFTPd www-apps/froxlor:quota - Adds support for Filesystem-Quotas www-apps/froxlor:tickets - Adds support for the Ticket System diff --git a/www-apps/froxlor/froxlor-9999.ebuild b/www-apps/froxlor/froxlor-9999.ebuild index 0c7e7c4..401d288 100644 --- a/www-apps/froxlor/froxlor-9999.ebuild +++ b/www-apps/froxlor/froxlor-9999.ebuild @@ -22,7 +22,7 @@ HOMEPAGE="http://www.froxlor.org/" LICENSE="GPL-2" SLOT="0" -IUSE="awstats bind domainkey +dovecot fcgid ftpquota fpm libressl lighttpd +log mailquota nginx pureftpd quota ssl +tickets vsftpd" +IUSE="awstats bind domainkey +dovecot fcgid ftpquota fpm libressl lighttpd +log mailquota nginx pdns pureftpd quota ssl +tickets vsftpd" DEPEND=" !www-apps/syscp @@ -50,8 +50,11 @@ DEPEND=" !awstats? ( app-admin/webalizer ) - bind? ( net-dns/bind - domainkey? ( mail-filter/opendkim ) + bind? ( net-dns/bind[ssl=] + domainkey? ( mail-filter/opendkim[ssl=,libressl=] ) + ) + pdns? ( net-dns/pdns[mysql] + domainkey? ( mail-filter/opendkim[ssl=,libressl=] ) ) ssl? ( !libressl? ( >=dev-libs/openssl-1.0.2:* ) @@ -96,7 +99,7 @@ DEPEND=" RDEPEND="${DEPEND}" -REQUIRED_USE="lighttpd? ( !nginx ) fcgid? ( !fpm ) vsftpd? ( !ftpquota )" +REQUIRED_USE="lighttpd? ( !nginx ) fcgid? ( !fpm ) vsftpd? ( !ftpquota ) pdns? ( !bind )" # we need that to set the standardlanguage later LANGS="de en fr it nl pt se" @@ -200,11 +203,28 @@ src_install() { fi - # If Bind will not used disable it and change the reload path for it - if ! use bind ; then - einfo "Switching 'bind' to 'Off'" - sed -e 's|'bind_enable', '1'|'bind_enable', '0'|g' -i "${S}/install/froxlor.sql" || die "Unable to change reload path for Bind" - sed -e 's|/etc/init.d/named reload|/bin/true|g' -i "${S}/install/froxlor.sql" || die "Unable to change reload path for Bind" + # If Bind and pdns will not be used disable nameserver + if ! use bind && ! use pdns; then + einfo "Disabling nameserver" + sed -e 's|'bind_enable', '1'|'bind_enable', '0'|g' -i "${S}/install/froxlor.sql" || die "Unable to change binds enabled flag" + sed -e 's|/etc/init.d/bind9 reload|/bin/true|g' -i "${S}/install/froxlor.sql" || die "Unable to change reload path for Bind" + fi + + if use bind ; then + einfo "Setting bind9 reload command" + sed -e 's|'bind_enable', '0'|'bind_enable', '1'|g' -i "${S}/install/froxlor.sql" || die "Unable to change binds enabled flag" + sed -e 's|/etc/init.d/bind9 reload|/etc/init.d/named reload|g' -i "${S}/install/froxlor.sql" || die "Unable to change reload path for Bind" + fi + + if use pdns ; then + einfo "Switching from 'bind' to 'powerdns'" + sed -e 's|'bind_enable', '0'|'bind_enable', '1'|g' -i "${S}/install/froxlor.sql" || die "Unable to change binds enabled flag" + sed -e 's|/etc/init.d/bind9 reload|/etc/init.d/pdns restart|g' -i "${S}/install/froxlor.sql" || die "Unable to change reload path for pdns" + sed -e 's|'dns_server', 'bind'|'dns_server', 'pdns'|g' -i "${S}/install/froxlor.sql" || die "Unable to change dns-server value from bind to pdns" + ewarn "" + ewarn "Note that you need to configure pdns and create a separate database for it, see:" + ewarn "https://doc.powerdns.com/3/authoritative/installation/#basic-setup-configuring-database-connectivity" + ewarn "" fi # default value is logging_enabled='1'