From f110fc61334a2d6a13a87f782a84c4c79ff7ccb2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 31 Dec 2018 19:13:02 +0100 Subject: Readding debconf-handling of health_alarm_notify.conf (Reopens: #904459). Signed-off-by: Daniel Baumann --- debian/netdata.config | 20 +++++++++++++++++ debian/netdata.postinst.in | 26 ++++++++++++++++++++++ debian/netdata.templates | 14 ++++++++++++ debian/po/POTFILES.in | 1 + debian/po/de.po | 54 ++++++++++++++++++++++++++++++++++++++++++++++ debian/po/fr.po | 52 ++++++++++++++++++++++++++++++++++++++++++++ debian/po/nl.po | 52 ++++++++++++++++++++++++++++++++++++++++++++ debian/po/pt.po | 50 ++++++++++++++++++++++++++++++++++++++++++ debian/po/ru.po | 52 ++++++++++++++++++++++++++++++++++++++++++++ debian/po/templates.pot | 50 ++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 371 insertions(+) create mode 100644 debian/netdata.config create mode 100644 debian/netdata.templates create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/de.po create mode 100644 debian/po/fr.po create mode 100644 debian/po/nl.po create mode 100644 debian/po/pt.po create mode 100644 debian/po/ru.po create mode 100644 debian/po/templates.pot diff --git a/debian/netdata.config b/debian/netdata.config new file mode 100644 index 000000000..eb2796f47 --- /dev/null +++ b/debian/netdata.config @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +CONFFILE="/etc/netdata/health_alarm_notify.conf" + +. /usr/share/debconf/confmodule + +if [ -e "${CONFFILE}" ]; then + # contains bashisms + . ${CONFFILE} || true + + db_set netdata/send_email "${SEND_EMAIL}" +fi + +db_settitle netdata/title +db_input low netdata/send_email || true +db_go + +db_stop diff --git a/debian/netdata.postinst.in b/debian/netdata.postinst.in index d4fe0171c..49ed64955 100644 --- a/debian/netdata.postinst.in +++ b/debian/netdata.postinst.in @@ -2,8 +2,34 @@ set -e +CONFFILE="/etc/netdata/health_alarm_notify.conf" + +. /usr/share/debconf/confmodule + case "$1" in configure) + db_get netdata/send_email + SEND_EMAIL="${RET:-true}" # boolean + + db_stop + + case "${SEND_EMAIL}" in + true) + SEND_EMAIL="YES" + ;; + + *) + SEND_EMAIL="NO" + ;; + esac + + if [ -e "${CONFFILE}" ]; then + sed -e "s|^ *SEND_EMAIL=.*|SEND_EMAIL=\"${SEND_EMAIL}\"|" \ + < "${CONFFILE}" > "${CONFFILE}.tmp" + + mv -f "${CONFFILE}.tmp" "${CONFFILE}" + fi + if [ -z "$2" ]; then if ! getent group netdata >/dev/null; then addgroup --quiet --system netdata diff --git a/debian/netdata.templates b/debian/netdata.templates new file mode 100644 index 000000000..b21b81e39 --- /dev/null +++ b/debian/netdata.templates @@ -0,0 +1,14 @@ +Template: netdata/title +Type: title +_Description: netdata: Configuration + +Template: netdata/send_email +Type: boolean +Default: true +_Description: send emails: + netdata sends emails for warnings and alerts to root@localhost for + monitoring purposes. Potentially this can trigger a lot of emails. + . + Please choose to enable or disable sending emails. + . + If unsure, allow it to send emails (default). diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 000000000..e40390257 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] netdata.templates diff --git a/debian/po/de.po b/debian/po/de.po new file mode 100644 index 000000000..1333b088f --- /dev/null +++ b/debian/po/de.po @@ -0,0 +1,54 @@ +# German debconf translation of netdata +# Copyright (C) 2018 Helge Kreutzmann +# This file is distributed under the same license as the netdata package. +# +msgid "" +msgstr "" +"Project-Id-Version: netdata 1.10.0+dfsg-1\n" +"Report-Msgid-Bugs-To: netdata@packages.debian.org\n" +"POT-Creation-Date: 2018-02-27 10:30+0100\n" +"PO-Revision-Date: 2018-08-18 13:32+0200\n" +"Last-Translator: Helge Kreutzmann \n" +"Language-Team: german \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: title +#. Description +#: ../netdata.templates:1001 +msgid "netdata: Configuration" +msgstr "netdata: Konfiguration" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "send emails:" +msgstr "E-Mails versenden:" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "" +"netdata sends emails for warnings and alerts to root@localhost for " +"monitoring purposes. Potentially this can trigger a lot of emails." +msgstr "" +"Netdata sendet zu Überwachungszwecken E-Mails mit Warnungen und Alarmen an " +"root@localhost. Dies kann ein hohes E-Mailaufkommen nach sich ziehen." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "Please choose to enable or disable sending emails." +msgstr "" +"Bitte wählen Sie aus, ob Sie das Senden von E-Mails aktivieren oder " +"deaktivieren möchten." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "If unsure, allow it to send emails (default)." +msgstr "" +"Wenn Sie unsicher sind, erlauben Sie das (voreingestellte) Versenden von E-" +"Mails." diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 000000000..387018335 --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,52 @@ +# French debconf translation of netdata +# Copyright (C) 2018 Alban Vidal +# This file is distributed under the same license as the netdata package. +msgid "" +msgstr "" +"Project-Id-Version: netdata 1.10.0\n" +"Report-Msgid-Bugs-To: netdata@packages.debian.org\n" +"POT-Creation-Date: 2018-02-27 10:30+0100\n" +"PO-Revision-Date: 2018-05-12 22:25+0100\n" +"Last-Translator: Alban Vidal \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. Type: title +#. Description +#: ../netdata.templates:1001 +msgid "netdata: Configuration" +msgstr "netdata : configuration" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "send emails:" +msgstr "Envoi des courriels :" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "" +"netdata sends emails for warnings and alerts to root@localhost for " +"monitoring purposes. Potentially this can trigger a lot of emails." +msgstr "" +"netdata envoie des courriels d'avertissement et d'alerte à root@localhost " +"à des fins de surveillance. Potentiellement, cela peut produire l'envoi de " +"beaucoup de courriels." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "Please choose to enable or disable sending emails." +msgstr "" +"Veuillez choisir si vous souhaitez activer ou non l'envoi des courriels." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "If unsure, allow it to send emails (default)." +msgstr "Si vous n'êtes pas sûr, autorisez l'envoi des courriels (par défaut)." diff --git a/debian/po/nl.po b/debian/po/nl.po new file mode 100644 index 000000000..1b00501d0 --- /dev/null +++ b/debian/po/nl.po @@ -0,0 +1,52 @@ +# Dutch debconf translation of netdata +# Copyright (C) 2018 Frans Spiesschaert +# This file is distributed under the same license as the netdata package. +# +msgid "" +msgstr "" +"Project-Id-Version: netdata 1.10.0+dfsg-1\n" +"Report-Msgid-Bugs-To: netdata@packages.debian.org\n" +"POT-Creation-Date: 2018-02-27 10:30+0100\n" +"PO-Revision-Date: 2018-05-08 15:18+0200\n" +"Last-Translator: Frans Spiesschaert \n" +"Language-Team: Debian Dutch l10n Team \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: title +#. Description +#: ../netdata.templates:1001 +msgid "netdata: Configuration" +msgstr "netdata: configuratie" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "send emails:" +msgstr "e-mails sturen:" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "" +"netdata sends emails for warnings and alerts to root@localhost for " +"monitoring purposes. Potentially this can trigger a lot of emails." +msgstr "" +"In functie van toezicht stuurt netdata bij waarschuwingen en problemen een e-" +"mail naar root@localhost. Mogelijk kan dit om veel e-mails gaan." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "Please choose to enable or disable sending emails." +msgstr "" +"Kies of het sturen van e-mails geactiveerd of uitgeschakeld moet worden." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "If unsure, allow it to send emails (default)." +msgstr "Laat bij twijfel het sturen van e-mails toe (standaard)." diff --git a/debian/po/pt.po b/debian/po/pt.po new file mode 100644 index 000000000..42f64fbf5 --- /dev/null +++ b/debian/po/pt.po @@ -0,0 +1,50 @@ +# Portuguese debconf translation of netdata +# Copyright (C) 2018 Rui Branco +# This file is distributed under the same license as the netdata package. +msgid "" +msgstr "" +"Project-Id-Version: netdata\n" +"Report-Msgid-Bugs-To: netdata@packages.debian.org\n" +"POT-Creation-Date: 2018-02-27 10:30+0100\n" +"PO-Revision-Date: 2018-05-09 20:33+0000\n" +"Last-Translator: Rui Branco - DebianPT \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: title +#. Description +#: ../netdata.templates:1001 +msgid "netdata: Configuration" +msgstr "netdata: Configuração" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "send emails:" +msgstr "enviar emails:" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "" +"netdata sends emails for warnings and alerts to root@localhost for " +"monitoring purposes. Potentially this can trigger a lot of emails." +msgstr "" +"O netdata envia emails de avisos e alertas para root@localhost " +"com objectivos de monitorização. Podem ser gerados muitos emails." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "Please choose to enable or disable sending emails." +msgstr "Por favor escolha activar ou desactivar o envio de emails." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "If unsure, allow it to send emails (default)." +msgstr "Na dúvida, permita o envio de emails (predefinição)." diff --git a/debian/po/ru.po b/debian/po/ru.po new file mode 100644 index 000000000..e0dbf7ceb --- /dev/null +++ b/debian/po/ru.po @@ -0,0 +1,52 @@ +# Russian debconf translation of netdata +# Copyright (C) 2018 Lev Lamberov +# This file is distributed under the same license as the netdata package. +msgid "" +msgstr "" +"Project-Id-Version: netdata\n" +"Report-Msgid-Bugs-To: netdata@packages.debian.org\n" +"POT-Creation-Date: 2018-02-27 10:30+0100\n" +"PO-Revision-Date: 2018-05-06 12:23+0500\n" +"Last-Translator: Lev Lamberov \n" +"Language-Team: Debian L10n Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: title +#. Description +#: ../netdata.templates:1001 +msgid "netdata: Configuration" +msgstr "netdata: Настройка" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "send emails:" +msgstr "отправка электронной почты:" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "" +"netdata sends emails for warnings and alerts to root@localhost for " +"monitoring purposes. Potentially this can trigger a lot of emails." +msgstr "" +"Утилита netdata с целью мониторинга отправляет электронную почту с " +"предупреждениями и оповещениями об опасной ситуации по адресу " +"root@localhost. Это может привести к отправке большого количества сообщений." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "Please choose to enable or disable sending emails." +msgstr "Выберите, включить или отключить отправку сообщений." + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "If unsure, allow it to send emails (default)." +msgstr "Если вы не уверены, то разрешите отправку сообщений (по умолчанию)." diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 000000000..ca5f41a0b --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,50 @@ +# Messages for netdata email configuration +# Copyright (C) 2018 +# This file is distributed under the same license as the netdata package. +# Daniel Baumann +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: netdata\n" +"Report-Msgid-Bugs-To: netdata@packages.debian.org\n" +"POT-Creation-Date: 2018-02-27 10:30+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: title +#. Description +#: ../netdata.templates:1001 +msgid "netdata: Configuration" +msgstr "" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "send emails:" +msgstr "" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "" +"netdata sends emails for warnings and alerts to root@localhost for " +"monitoring purposes. Potentially this can trigger a lot of emails." +msgstr "" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "Please choose to enable or disable sending emails." +msgstr "" + +#. Type: boolean +#. Description +#: ../netdata.templates:2001 +msgid "If unsure, allow it to send emails (default)." +msgstr "" -- cgit v1.2.3