# enable default features
enable_default_features $@
-
- /usr/share/icinga2/migrate-hosts
;;
abort-upgrade|abort-remove|abort-deconfigure)
%endif
%post common
-/usr/share/icinga2/migrate-hosts
-
# suse
%if "%{_vendor}" == "suse"
%if 0%{?suse_version} >= 1310
%{_libdir}/%{name}
%{_datadir}/%{name}
%exclude %{_datadir}/%{name}/include
-%exclude %{_datadir}/%{name}/migrate-hosts
%{_mandir}/man8/%{name}.8.gz
%attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
%{_datadir}/%{name}/include
-%{_datadir}/%{name}/migrate-hosts
%files doc
%defattr(-,root,root,-)
add_subdirectory(mkembedconfig)
add_subdirectory(mkunity)
-configure_file(migrate-hosts.cmake ${CMAKE_CURRENT_BINARY_DIR}/migrate-hosts @ONLY)
-
-install(
- FILES ${CMAKE_CURRENT_BINARY_DIR}/migrate-hosts
- DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
-)
+++ /dev/null
-#!/bin/sh
-# Moves configuration files from /etc/icinga2/conf.d/hosts/<fqdn>
-# as backup files. TODO: Remove script before 2.2 release.
-
-icinga2bin=@CMAKE_INSTALL_FULL_SBINDIR@/icinga2
-sysconfdir=`$icinga2bin variable get --current SysconfDir`
-
-if [ -z "$sysconfdir" ]; then
- echo "Could not determine SysconfDir"
- exit 1
-fi
-
-target="`hostname -f`"
-if [ ! -e $sysconfdir/icinga2/repository.d/hosts/$target.conf ]; then
- exit 0
-fi
-
-mv $sysconfdir/icinga2/repository.d/hosts/$target.conf $sysconfdir/icinga2/repository.d/hosts/$target.conf.bak
-
-if [ -d $sysconfdir/icinga2/repository.d/hosts/$target ]; then
- for file in $sysconfdir/icinga2/repository.d/hosts/$target/*.conf; do
- if [ ! -e $file ]; then
- break
- fi
-
- mv $file $file.bak
- done
-fi
-
-echo "Moved repository FQDN host in $sysconfdir/icinga2/repository.d/hosts/$target as backup. Please migrate your changes to all new conf.d/{hosts,services.conf}"
-exit 0