From 140939d6f58db93a5132fbdc26918e47dde5bf87 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Wed, 27 Jan 2021 03:50:32 -0500 Subject: [icinga2]: upgrade to v2.12.3 --- pcr/icinga2/PKGBUILD | 193 +++++++++++++++++++++++--------------- pcr/icinga2/boost-1.74-8184.patch | 31 ++++++ pcr/icinga2/boost-1.74-8191.patch | 26 +++++ pcr/icinga2/boost-1.74-8575.patch | 192 +++++++++++++++++++++++++++++++++++++ pcr/icinga2/icinga2.install | 12 +-- 5 files changed, 367 insertions(+), 87 deletions(-) create mode 100644 pcr/icinga2/boost-1.74-8184.patch create mode 100644 pcr/icinga2/boost-1.74-8191.patch create mode 100644 pcr/icinga2/boost-1.74-8575.patch (limited to 'pcr/icinga2') diff --git a/pcr/icinga2/PKGBUILD b/pcr/icinga2/PKGBUILD index 8ccb63719..8f2769cbd 100644 --- a/pcr/icinga2/PKGBUILD +++ b/pcr/icinga2/PKGBUILD @@ -1,28 +1,81 @@ -# Maintainer (AUR): Malte Rabenseifner -# Maintainer (AUR): Julian Brost -# Contributor (AUR): bebehei - -# parabola changes and rationale: -# - removed "open source" term from pkgdesc - -pkgname=('icinga2-common' 'icinga2' 'icinga-studio') -pkgbase=icinga2 -pkgver=2.8.1 -pkgrel=1 -pkgdesc="A libre host, service and network monitoring program" +# Maintainer (aur): Julian Brost +# Maintainer (aur): Malte Rabenseifner +# Contributor: bebehei + +pkgname=icinga2 +pkgver=2.12.3 +pkgrel=2 +pkgdesc="An open source host, service and network monitoring program" +pkgdesc="${pkgdesc/An open source host, service/Host, service,}" license=('GPL') -arch=('i686' 'x86_64' 'armv7h') +arch=('i686' 'x86_64') +arch+=('armv7h') url="http://www.icinga.org" -depends=('boost-libs' 'libedit' 'openssl' 'yajl') -makedepends=('boost' 'cmake' 'libmariadbclient' 'postgresql-libs' 'wxgtk') -source=("https://github.com/Icinga/$pkgbase/archive/v$pkgver.tar.gz") -sha256sums=('83930bf95a5c6562cc31c37ddb01b361665497ef7001e9cc8763fd499a4d709d') +depends=('boost-libs' 'libedit' 'libsystemd' 'openssl' 'yajl') +optdepends=('monitoring-plugins: plugins needed for icinga checks' + 'libmariadbclient: for MySQL support' + 'postgresql-libs: for PostgreSQL support') +makedepends=('boost' 'cmake' 'libmariadbclient' 'postgresql-libs' 'systemd') +replaces=('icinga2-common') +replaces+=('icinga-studio') +backup=(etc/default/icinga2 + etc/icinga2/features-available/api.conf + etc/icinga2/features-available/checker.conf + etc/icinga2/features-available/command.conf + etc/icinga2/features-available/compatlog.conf + etc/icinga2/features-available/debuglog.conf + etc/icinga2/features-available/elasticsearch.conf + etc/icinga2/features-available/gelf.conf + etc/icinga2/features-available/graphite.conf + etc/icinga2/features-available/icingadb.conf + etc/icinga2/features-available/ido-mysql.conf + etc/icinga2/features-available/ido-pgsql.conf + etc/icinga2/features-available/influxdb.conf + etc/icinga2/features-available/livestatus.conf + etc/icinga2/features-available/mainlog.conf + etc/icinga2/features-available/notification.conf + etc/icinga2/features-available/opentsdb.conf + etc/icinga2/features-available/perfdata.conf + etc/icinga2/features-available/statusdata.conf + etc/icinga2/features-available/syslog.conf + etc/icinga2/constants.conf + etc/icinga2/icinga2.conf + etc/icinga2/scripts/mail-host-notification.sh + etc/icinga2/scripts/mail-service-notification.sh + etc/icinga2/zones.conf + etc/init.d/icinga2 + etc/logrotate.d/icinga2) +install='icinga2.install' +changelog="icinga2.changelog" +source=($pkgname-$pkgver.tar.gz::https://github.com/Icinga/$pkgname/archive/v$pkgver.tar.gz + boost-1.74-8184.patch # https://patch-diff.githubusercontent.com/raw/Icinga/icinga2/pull/8184.patch + boost-1.74-8191.patch # https://patch-diff.githubusercontent.com/raw/Icinga/icinga2/pull/8191.patch + boost-1.74-8575.patch # https://patch-diff.githubusercontent.com/raw/Icinga/icinga2/pull/8575.patch + $pkgname.tmpfiles + $pkgname.sysusers) +sha256sums=('56387d5e047df04fd91fdb8db3124eb09325c7377fbcaa11ef063147db816dfb' + 'dc1a2530d1c2c311826443cebaaa3c307f400e6a995414c654f4e6b94ec8b885' + '297c38f5e682ebed1c399997fa3955dfd383b13ae1a9086e73a5272ab1c995cd' + '51578f037ae87ac5336473199ccf31f0097402eb57e73383fbe9899c09063da8' + '1302b333f49ead14f8808a379535971501d3a0c1ba02a7bf7b4406b7d27c754c' + '2f946a33ea50a3c4400a81acd778e6411ffe5e2257a98004288b84a64f382810') + +_is_nonsystemd_host=0 # set this to 1, if building on a non-systemd host (redmine #2969) + + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + + patch -p1 < "$srcdir/8184.patch" + patch -p1 < "$srcdir/8191.patch" + patch -p1 < "$srcdir/8575.patch" +} build() { - mkdir -p "$srcdir/$pkgbase-$pkgver/build" - cd "$srcdir/$pkgbase-$pkgver/build" + mkdir -p "$srcdir/$pkgname-$pkgver/build" + cd "$srcdir/$pkgname-$pkgver/build" - cmake "$srcdir/$pkgbase-$pkgver" \ + cmake "$srcdir/$pkgname-$pkgver" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_SYSCONFDIR=/etc \ -DICINGA2_RUNDIR=/run \ @@ -32,78 +85,66 @@ build() { -DICINGA2_SYSCONFIGFILE=/etc/default/icinga2 \ -DICINGA2_PLUGINDIR=/usr/lib/monitoring-plugins \ -DUSE_SYSTEMD=ON \ - -DICINGA2_WITH_STUDIO=ON \ - -DLOGROTATE_HAS_SU=OFF \ + -DINSTALL_SYSTEMD_SERVICE_AND_INITSCRIPT=ON \ + $( (( _is_nonsystemd_host )) && echo '-DSYSTEMD_INCLUDE_DIR=/usr/include/elogind/' ) \ + -DLOGROTATE_HAS_SU=OFF make } -package_icinga2-common() { - pkgdesc="Common files for Icinga2" - - cd "$srcdir/$pkgbase-$pkgver/build" - make DESTDIR="$pkgdir" install - rm -r $pkgdir/{etc,run,var} - rm -r $pkgdir/usr/{bin,share} - rm -r $pkgdir/usr/lib/monitoring-plugins - rm -r $pkgdir/usr/lib/systemd - rm -r $pkgdir/usr/lib/icinga2/{prepare-dirs,safe-reload,sbin} -} - -package_icinga2() { - depends=('icinga2-common') - optdepends=('monitoring-plugins: plugins needed for icinga checks' - 'libmariadbclient: for MySQL support' - 'postgresql-libs: for PostgreSQL support') - backup=(etc/default/icinga2 - etc/icinga2/features-available/{api,checker,command,compatlog}.conf - etc/icinga2/features-available/{debuglog,gelf,graphite}.conf - etc/icinga2/features-available/{ido-mysql,ido-pgsql,influxdb,livestatus,mainlog}.conf - etc/icinga2/features-available/{notification,opentsdb,perfdata,statusdata,syslog}.conf - etc/icinga2/{constants,icinga2,init,zones}.conf - etc/logrotate.d/icinga2) - install='icinga2.install' - - cd "$srcdir/$pkgbase-$pkgver/build" +package() { + cd "$srcdir/$pkgname-$pkgver/build" make DESTDIR="$pkgdir" install + # move default config to conf.d.example mv "$pkgdir/etc/icinga2/conf.d" "$pkgdir/etc/icinga2/conf.d.example" mkdir "$pkgdir/etc/icinga2/conf.d" - rm "$pkgdir/etc/icinga2/features-enabled/checker.conf" - rm "$pkgdir/etc/icinga2/features-enabled/mainlog.conf" - rm "$pkgdir/etc/icinga2/features-enabled/notification.conf" - rm -r "$pkgdir/run" - - mkdir -p "$pkgdir/usr/lib/tmpfiles.d" - cat > "$pkgdir/usr/lib/tmpfiles.d/icinga2.conf" <<- EOF - d /run/icinga2 0750 icinga icingacmd - - d /run/icinga2/cmd 2750 icinga icingacmd - - EOF - - cd "$srcdir/$pkgbase-$pkgver" - - install -Dm644 tools/syntax/vim/ftdetect/icinga2.vim "$pkgdir/usr/share/vim/vimfiles/ftdetect/icinga2.vim" - install -Dm644 tools/syntax/vim/syntax/icinga2.vim "$pkgdir/usr/share/vim/vimfiles/syntax/icinga2.vim" - install -Dm644 tools/syntax/nano/icinga2.nanorc "$pkgdir/usr/share/nano/icinga2.nanorc" + # restrict some filesystem locations by default chmod 750 "$pkgdir/etc/icinga2" \ "$pkgdir/var/lib/icinga2" \ "$pkgdir/var/spool/icinga2" \ "$pkgdir/var/cache/icinga2" \ "$pkgdir/var/log/icinga2" - rm -r $pkgdir/usr/lib/icinga2/lib* - rm $pkgdir/usr/bin/icinga-studio -} + # config files for creating users, groups and tmp files/dirs + install -Dm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf" + install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" -package_icinga-studio() { - pkgdesc="Graphical tool for debugging and testing the Icinga2 API" - depends=('icinga2-common' 'wxgtk') + # install syntax highlighting for vim and nano + cd "$srcdir/$pkgname-$pkgver" + install -Dm644 tools/syntax/vim/ftdetect/icinga2.vim "$pkgdir/usr/share/vim/vimfiles/ftdetect/icinga2.vim" + install -Dm644 tools/syntax/vim/syntax/icinga2.vim "$pkgdir/usr/share/vim/vimfiles/syntax/icinga2.vim" + install -Dm644 tools/syntax/nano/icinga2.nanorc "$pkgdir/usr/share/nano/icinga2.nanorc" - cd "$srcdir/$pkgbase-$pkgver/build" - make DESTDIR="$pkgdir" install - rm -r $pkgdir/{etc,run,var} - rm -r $pkgdir/usr/{lib,share} - rm $pkgdir/usr/bin/icinga2 + # remove features-enabled symlink from the package so that they are not + # recreated on package upgrades. they are initially set-up in the + # post_install script. + rm "$pkgdir/etc/icinga2/features-enabled/checker.conf" + rm "$pkgdir/etc/icinga2/features-enabled/mainlog.conf" + rm "$pkgdir/etc/icinga2/features-enabled/notification.conf" + # ensure that nothing it left in features enables. make sure to keep the list + # above in sync with post_install. rmdir && mkdir seems to be the easiest way + # to check if the directory was actually empty. + rmdir "$pkgdir/etc/icinga2/features-enabled" && mkdir "$pkgdir/etc/icinga2/features-enabled" || { + error 'Features enabled by make install are inconsistent with those in package().' + ls -l "$pkgdir/etc/icinga2/features-enabled" + return 1 + } + + # check that the backup array contains all files in /etc except those explicitly excluded in the command below. + diff -u \ + <(printf '%s\n' "${backup[@]}" | sort) \ + <(find "$pkgdir/etc" '(' \ + -path "$pkgdir/etc/bash_completion.d" -o \ + -path "$pkgdir/etc/icinga2/conf.d.example" -o \ + -path "$pkgdir/etc/icinga2/zones.d/README" \ + ')' -prune -o -type f -printf 'etc/%P\n' | sort) || { + error 'Backup array and file installed to /etc are inconsistent.' + return 1 + } + + # some cleanup + rm -r "$pkgdir/run" } diff --git a/pcr/icinga2/boost-1.74-8184.patch b/pcr/icinga2/boost-1.74-8184.patch new file mode 100644 index 000000000..978ed830d --- /dev/null +++ b/pcr/icinga2/boost-1.74-8184.patch @@ -0,0 +1,31 @@ +From c30bae2994f1e5f33f6da51eb96d423e9bf0f75c Mon Sep 17 00:00:00 2001 +From: Louis Sautier +Date: Thu, 20 Aug 2020 18:25:48 +0200 +Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=98fs::copy=5Foption=E2=80=99=20has?= + =?UTF-8?q?=20not=20been=20declared=20with=20boost=201.74.0?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It was deprecated in +https://github.com/boostorg/filesystem/commit/f199152b7df036ff1606c85e4ea1b28edfeda6cc +--- + lib/base/utility.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp +index 1add7616c6..d8e6f20b0c 100644 +--- a/lib/base/utility.cpp ++++ b/lib/base/utility.cpp +@@ -725,7 +725,11 @@ void Utility::CopyFile(const String& source, const String& target) + { + namespace fs = boost::filesystem; + ++#if BOOST_VERSION >= 107400 ++ fs::copy_file(fs::path(source.Begin(), source.End()), fs::path(target.Begin(), target.End()), fs::copy_options::overwrite_existing); ++#else /* BOOST_VERSION */ + fs::copy_file(fs::path(source.Begin(), source.End()), fs::path(target.Begin(), target.End()), fs::copy_option::overwrite_if_exists); ++#endif /* BOOST_VERSION */ + } + + /* diff --git a/pcr/icinga2/boost-1.74-8191.patch b/pcr/icinga2/boost-1.74-8191.patch new file mode 100644 index 000000000..d6be61b55 --- /dev/null +++ b/pcr/icinga2/boost-1.74-8191.patch @@ -0,0 +1,26 @@ +From 34942a35112438a91ef25ffa5f0c6c18f1999303 Mon Sep 17 00:00:00 2001 +From: "Alexander A. Klimov" +Date: Mon, 14 Dec 2020 15:59:56 +0100 +Subject: [PATCH] Define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT + +... to enable compiling with Boost v1.74. + +refs #8185 +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c7bd1c139b..eb125ff9cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -172,6 +172,9 @@ add_definitions(-DBOOST_COROUTINES_NO_DEPRECATION_WARNING) + + add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED) + ++# Required for Boost v1.74+ ++add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) ++ + link_directories(${Boost_LIBRARY_DIRS}) + include_directories(${Boost_INCLUDE_DIRS}) + diff --git a/pcr/icinga2/boost-1.74-8575.patch b/pcr/icinga2/boost-1.74-8575.patch new file mode 100644 index 000000000..d2557a602 --- /dev/null +++ b/pcr/icinga2/boost-1.74-8575.patch @@ -0,0 +1,192 @@ +From 339b37a985b5f67ce5f0d2e02211d2c5b98a5d45 Mon Sep 17 00:00:00 2001 +From: Julian Brost +Date: Tue, 22 Dec 2020 14:32:56 +0100 +Subject: [PATCH 1/2] Use content_length method for setting the Content-Length + header + +Boost.Beast changed the signature of the previously used generic `set` +method so that it no longer accepts integer types, however there is +alreay a more specific method for setting the Content-Length header, so +use this one instead. +--- + lib/perfdata/elasticsearchwriter.cpp | 2 +- + lib/perfdata/influxdbwriter.cpp | 2 +- + lib/remote/configfileshandler.cpp | 2 +- + lib/remote/httpserverconnection.cpp | 10 +++++----- + lib/remote/httputility.cpp | 2 +- + lib/remote/infohandler.cpp | 2 +- + 6 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/lib/perfdata/elasticsearchwriter.cpp b/lib/perfdata/elasticsearchwriter.cpp +index 6870198e45..9ab277f201 100644 +--- a/lib/perfdata/elasticsearchwriter.cpp ++++ b/lib/perfdata/elasticsearchwriter.cpp +@@ -494,7 +494,7 @@ void ElasticsearchWriter::SendRequest(const String& body) + request.set(http::field::authorization, "Basic " + Base64::Encode(username + ":" + password)); + + request.body() = body; +- request.set(http::field::content_length, request.body().size()); ++ request.content_length(request.body().size()); + + /* Don't log the request body to debug log, this is already done above. */ + Log(LogDebug, "ElasticsearchWriter") +diff --git a/lib/perfdata/influxdbwriter.cpp b/lib/perfdata/influxdbwriter.cpp +index 5dbe785f88..3fd955bcf7 100644 +--- a/lib/perfdata/influxdbwriter.cpp ++++ b/lib/perfdata/influxdbwriter.cpp +@@ -517,7 +517,7 @@ void InfluxdbWriter::Flush() + } + + request.body() = body; +- request.set(http::field::content_length, request.body().size()); ++ request.content_length(request.body().size()); + + try { + if (stream.first) { +diff --git a/lib/remote/configfileshandler.cpp b/lib/remote/configfileshandler.cpp +index d714f4d864..6013d9722e 100644 +--- a/lib/remote/configfileshandler.cpp ++++ b/lib/remote/configfileshandler.cpp +@@ -84,7 +84,7 @@ bool ConfigFilesHandler::HandleRequest( + response.result(http::status::ok); + response.set(http::field::content_type, "application/octet-stream"); + response.body() = content; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + } catch (const std::exception& ex) { + HttpUtility::SendJsonError(response, params, 500, "Could not read file.", + DiagnosticInformation(ex)); +diff --git a/lib/remote/httpserverconnection.cpp b/lib/remote/httpserverconnection.cpp +index 182e2a5159..cb07557afe 100644 +--- a/lib/remote/httpserverconnection.cpp ++++ b/lib/remote/httpserverconnection.cpp +@@ -186,7 +186,7 @@ bool EnsureValidHeaders( + } else { + response.set(http::field::content_type, "text/html"); + response.body() = String("

Bad Request

") + errorMsg + "

"; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + } + + response.set(http::field::connection, "close"); +@@ -259,7 +259,7 @@ bool HandleAccessControl( + response.set(http::field::access_control_allow_methods, "GET, POST, PUT, DELETE"); + response.set(http::field::access_control_allow_headers, "Authorization, Content-Type, X-HTTP-Method-Override"); + response.body() = "Preflight OK"; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + response.set(http::field::connection, "close"); + + boost::system::error_code ec; +@@ -290,7 +290,7 @@ bool EnsureAcceptHeader( + response.result(http::status::bad_request); + response.set(http::field::content_type, "text/html"); + response.body() = "

Accept header is missing or not set to 'application/json'.

"; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + response.set(http::field::connection, "close"); + + boost::system::error_code ec; +@@ -331,7 +331,7 @@ bool EnsureAuthenticatedUser( + } else { + response.set(http::field::content_type, "text/html"); + response.body() = "

Unauthorized. Please check your user credentials.

"; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + } + + boost::system::error_code ec; +@@ -423,7 +423,7 @@ bool EnsureValidBody( + } else { + response.set(http::field::content_type, "text/html"); + response.body() = String("

Bad Request

") + ec.message() + "

"; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + } + + response.set(http::field::connection, "close"); +diff --git a/lib/remote/httputility.cpp b/lib/remote/httputility.cpp +index 91902ba501..a2142e5d86 100644 +--- a/lib/remote/httputility.cpp ++++ b/lib/remote/httputility.cpp +@@ -58,7 +58,7 @@ void HttpUtility::SendJsonBody(boost::beast::http::response& response, +diff --git a/lib/remote/infohandler.cpp b/lib/remote/infohandler.cpp +index 18c18c0e04..80ebba77be 100644 +--- a/lib/remote/infohandler.cpp ++++ b/lib/remote/infohandler.cpp +@@ -92,7 +92,7 @@ bool InfoHandler::HandleRequest( + + body += R"(

More information about API requests is available in the documentation.

)"; + response.body() = body; +- response.set(http::field::content_length, response.body().size()); ++ response.content_length(response.body().size()); + } + + return true; + +From eab07a7318f9e42157bc21d86585340d762759e7 Mon Sep 17 00:00:00 2001 +From: Julian Brost +Date: Tue, 22 Dec 2020 14:36:48 +0100 +Subject: [PATCH 2/2] Provide a conversion function from icinga::String to + boost::string_view + +Boost.Beast changed the signature of +boost::beast::http::basic_fields::set in version 1.74 so that no longer +allows passing an icinga::String instance as value. This adds a +conversion function so that it works again. +--- + lib/base/string.cpp | 12 ++++++++++++ + lib/base/string.hpp | 2 ++ + 2 files changed, 14 insertions(+) + +diff --git a/lib/base/string.cpp b/lib/base/string.cpp +index c4617e3578..eec5b8372d 100644 +--- a/lib/base/string.cpp ++++ b/lib/base/string.cpp +@@ -127,6 +127,18 @@ String::operator const std::string&() const + return m_Data; + } + ++/** ++ * Conversion function to boost::string_view. ++ * ++ * This allows using String as the value for HTTP headers in boost::beast::http::basic_fields::set. ++ * ++ * @return A boost::string_view representing this string. ++ */ ++String::operator boost::string_view() const ++{ ++ return boost::string_view(m_Data); ++} ++ + const char *String::CStr() const + { + return m_Data.c_str(); +diff --git a/lib/base/string.hpp b/lib/base/string.hpp +index e9799e7ebc..b9290eeee7 100644 +--- a/lib/base/string.hpp ++++ b/lib/base/string.hpp +@@ -6,6 +6,7 @@ + #include "base/i2-base.hpp" + #include "base/object.hpp" + #include ++#include + #include + #include + +@@ -71,6 +72,7 @@ class String + bool operator<(const String& rhs) const; + + operator const std::string&() const; ++ operator boost::string_view() const; + + const char *CStr() const; + diff --git a/pcr/icinga2/icinga2.install b/pcr/icinga2/icinga2.install index 14ec50e3d..961c26098 100644 --- a/pcr/icinga2/icinga2.install +++ b/pcr/icinga2/icinga2.install @@ -1,7 +1,5 @@ post_install() { - /usr/bin/getent group icinga &> /dev/null || /usr/bin/groupadd -r icinga &> /dev/null - /usr/bin/getent group icingacmd &> /dev/null || /usr/bin/groupadd -r icingacmd &> /dev/null - /usr/bin/getent passwd icinga &> /dev/null || /usr/bin/useradd -r -c "icinga" -M -d /var/spool/icinga2 -g icinga -G icingacmd -s /usr/bin/nologin icinga &> /dev/null + /usr/bin/systemd-sysusers icinga2.conf /usr/bin/chown -R icinga:icinga \ /etc/icinga2 \ @@ -12,8 +10,6 @@ post_install() { /var/cache/icinga2 \ /var/log/icinga2 - /usr/bin/systemd-tmpfiles --create icinga2.conf - /usr/bin/icinga2 feature enable checker &> /dev/null /usr/bin/icinga2 feature enable mainlog &> /dev/null /usr/bin/icinga2 feature enable notification &> /dev/null @@ -25,12 +21,6 @@ pre_remove() { [ -f "/etc/icinga2/features-enabled/notification.conf" ] && /usr/bin/icinga2 feature disable notification &> /dev/null } -post_remove() { - /usr/bin/getent passwd icinga &> /dev/null && /usr/bin/userdel icinga &> /dev/null - /usr/bin/getent group icinga &> /dev/null && /usr/bin/groupdel icinga &> /dev/null - /usr/bin/getent group icingacmd &> /dev/null && /usr/bin/groupdel icingacmd &> /dev/null -} - post_upgrade() { if [[ "$(vercmp "$2" '2.8.0')" -lt 0 ]]; then cat << EOF -- cgit v1.2.3