Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
packaging
Icinga 2 Security Releases 2.13.1 2.12.6 2.11.11
raspbian-icinga2
Commits
2a477c53
Commit
2a477c53
authored
Jul 18, 2019
by
Markus Frosch
Browse files
Merge remote-tracking branch 'upstream/master'
parents
34655986
ad0e26de
Changes
267
Hide whitespace changes
Inline
Side-by-side
stretch/debian/icinga2-bin.install
deleted
100644 → 0
View file @
34655986
usr
/
sbin
/
icinga2
usr
/
lib
/*/
icinga2
/
sbin
usr
/
lib
/
nagios
/
plugins
/
check_nscp_api
usr
/
share
/
man
/
man8
/
icinga2
.8
stretch/debian/icinga2-bin.lintian-overrides
deleted
100644 → 0
View file @
34655986
# this is actually a defined word in the livestatus protocol...
spelling-error-in-binary usr/lib/*/icinga2/sbin/icinga2 childs children
stretch/debian/icinga2-bin.postinst
deleted
100644 → 0
View file @
34655986
#!/bin/sh
# postinst script for icinga2-bn
set
-e
is_fresh_install
()
{
if
[
-z
"
$2
"
]
;
then
return
0
fi
return
1
}
enable_default_features
()
{
FIX_VERSION
=
"0.0.5+icingasnap201312070000"
if
is_fresh_install
$@
\
||
dpkg
--compare-versions
"
$2
"
lt
"
$FIX_VERSION
"
;
then
echo
"enabling default icinga2 features"
icinga2 feature
enable
checker notification mainlog
fi
# handle new default features here in the future
}
case
"
$1
"
in
configure
)
# enable default features
enable_default_features
$@
;;
abort-upgrade|abort-remove|abort-deconfigure
)
;;
*
)
echo
"postinst called with unknown argument
\`
$1
'"
>
&2
exit
1
;;
esac
#DEBHELPER#
exit
0
stretch/debian/icinga2-bin.postrm
deleted
100644 → 0
View file @
34655986
#!/bin/sh
# postrm script for icinga2-bin
set
-e
case
"
$1
"
in
purge
)
for
f
in
/etc/icinga2/features-enabled/
*
;
do
[
-L
"
$f
"
]
&&
rm
-f
"
$f
"
done
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear
)
;;
*
)
echo
"postrm called with unknown argument
\`
$1
'"
>
&2
exit
1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit
0
stretch/debian/icinga2-common.bash-completion
deleted
100644 → 0
View file @
34655986
etc/bash_completion.d/icinga2
stretch/debian/icinga2-common.dirs
deleted
100644 → 0
View file @
34655986
etc/icinga2/pki
var/cache/icinga2
var/lib/icinga2
var/lib/icinga2/api/log
var/lib/icinga2/api/repository
var/lib/icinga2/api/zones
var/log/icinga2
var/log/icinga2/compat/archives
var/log/icinga2/crash
var/spool/icinga2
var/spool/icinga2/perfdata
var/spool/icinga2/tmp
stretch/debian/icinga2-common.icinga2.default
deleted
100644 → 0
View file @
34655986
# default settings for icinga2's initscript
#DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
stretch/debian/icinga2-common.icinga2.init
deleted
100644 → 0
View file @
34655986
#! /bin/sh
### BEGIN INIT INFO
# Provides: icinga2
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: icinga2 host/service/network monitoring and management system
# Description: icinga2 is a monitoring and management system for hosts, services and networks.
### END INIT INFO
# Author: Alexander Wirt <formorer@debian.org>
# Markus Frosch <markus@lazyfrosch.de>
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH
=
/sbin:/usr/sbin:/bin:/usr/bin
DESC
=
"icinga2 monitoring daemon"
NAME
=
icinga2
DAEMON
=
/usr/sbin/icinga2
DAEMON_CONFIG
=
"/etc/icinga2/icinga2.conf"
DAEMON_USER
=
nagios
DAEMON_GROUP
=
nagios
DAEMON_CMDGROUP
=
www-data
DAEMON_ARGS
=
"-e /var/log/icinga2/icinga2.err"
STARTUP_LOG
=
"/var/log/icinga2/startup.log"
PIDFILE
=
/var/run/icinga2/
$NAME
.pid
SCRIPTNAME
=
/etc/init.d/
$NAME
# Block/ignore SIGPIPE inside Icinga2
# Workaround for a known bug in 2.6.0
# see https://dev.icinga.com/issues/13567#note-19
trap
''
13
# SIGPIPE
# Exit if the package is not installed
[
-x
"
$DAEMON
"
]
||
exit
0
# Read configuration variable file if it is present
[
-r
/etc/default/
$NAME
]
&&
.
/etc/default/
$NAME
# Load the VERBOSE setting and other rcS variables
.
/lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
.
/lib/lsb/init-functions
# check run directory
check_run
()
{
if
[
!
-e
'/var/run/icinga2'
]
;
then
mkdir
/var/run/icinga2
mkdir
/var/run/icinga2/cmd
chown
"
$DAEMON_USER
"
:
"
$DAEMON_CMDGROUP
"
/var/run/icinga2/cmd
chmod
2710 /var/run/icinga2/cmd
chown
"
$DAEMON_USER
"
:
"
$DAEMON_GROUP
"
/var/run/icinga2
chmod
0755 /var/run/icinga2
fi
}
check_config
()
{
$DAEMON
daemon
--validate
}
#
# Function that starts the daemon/service
#
do_start
()
{
check_run
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
--exec
$DAEMON
--test
>
/dev/null
\
||
return
1
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
--exec
$DAEMON
--
\
daemon
-d
$DAEMON_ARGS
\
||
return
2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that starts the daemon/service in foreground for debugging
#
do_foreground
()
{
start-stop-daemon
--start
--quiet
--pidfile
$PIDFILE
--exec
$DAEMON
--test
\
||
return
1
start-stop-daemon
--start
--pidfile
$PIDFILE
--exec
$DAEMON
--
\
daemon
$DAEMON_ARGS
\
||
return
2
}
#
# Function that stops the daemon/service
#
do_stop
()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon
--stop
--quiet
--retry
=
TERM/30/KILL/5
--pidfile
$PIDFILE
--name
$NAME
RETVAL
=
"
$?
"
[
"
$RETVAL
"
=
2
]
&&
return
2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon
--stop
--quiet
--oknodo
--retry
=
0/30/KILL/5
--exec
$DAEMON
[
"
$?
"
=
2
]
&&
return
2
# Many daemons don't delete their pidfiles when they exit.
rm
-f
$PIDFILE
return
"
$RETVAL
"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload
()
{
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon
--stop
--signal
HUP
--quiet
--pidfile
$PIDFILE
--name
$NAME
return
0
}
do_check_config
()
{
DOEXITONOK
=
"
$1
"
log_begin_msg
"checking Icinga2 configuration"
if
!
check_config
>
$STARTUP_LOG
2>&1
;
then
echo
[
-n
"
$DOEXITONOK
"
]
&&
cat
$STARTUP_LOG
log_failure_msg
"checking Icinga2 configuration. Check '
$STARTUP_LOG
' for details."
exit
1
else
log_end_msg 0
[
-n
"
$DOEXITONOK
"
]
&&
exit
0
fi
}
case
"
$1
"
in
start
)
do_check_config
log_daemon_msg
"Starting
$DESC
"
"
$NAME
"
do_start
case
"
$?
"
in
0|1
)
log_end_msg 0
;;
2
)
log_end_msg 1
;;
esac
;;
foreground
)
do_check_config
log_action_msg
"Starting
$DESC
in foreground"
status
=
0
trap
'status=2;'
INT
# handle intr here
for
i
in
1 2
;
do
do_foreground
||
status
=
"
$?
"
case
"
$status
"
in
0
)
log_success_msg
"
$NAME
ended graceful"
break
;;
1
)
if
[
"
$i
"
-eq
1
]
;
then
log_warning_msg
"
$NAME
already running!"
log_begin_msg
"Do you want to stop
$NAME
before going foreground? [y/N] "
read
-r
question
if
[
"
$question
"
=
"y"
]
||
[
"
$question
"
=
"yes"
]
;
then
do_stop
continue
fi
fi
log_failure_msg
"
$NAME
already running! Please stop before starting in foreground!"
break
;;
2
)
log_failure_msg
"
$NAME
ended"
break
;;
esac
done
exit
$status
;;
stop
)
log_daemon_msg
"Stopping
$DESC
"
"
$NAME
"
do_stop
case
"
$?
"
in
0|1
)
log_end_msg 0
;;
2
)
log_end_msg 1
;;
esac
;;
status
)
status_of_proc
-p
"
$PIDFILE
"
"
$DAEMON
"
"
$NAME
"
&&
exit
0
||
exit
$?
;;
reload|force-reload
)
do_check_config
status_of_proc
-p
"
$PIDFILE
"
"
$DAEMON
"
"
$NAME
"
||
exit
$?
log_daemon_msg
"Reloading
$DESC
"
"
$NAME
"
do_reload
log_end_msg
$?
;;
restart
)
do_check_config
log_daemon_msg
"Restarting
$DESC
"
"
$NAME
"
do_stop
case
"
$?
"
in
0|1
)
do_start
case
"
$?
"
in
0
)
log_end_msg 0
;;
1
)
log_end_msg 1
;;
# Old process is still running
*
)
log_end_msg 1
;;
# Failed to start
esac
;;
*
)
# Failed to stop
log_end_msg 1
;;
esac
;;
checkconfig
)
do_check_config 1
;;
*
)
echo
"Usage:
$SCRIPTNAME
{start|stop|status|reload|force-reload|restart|checkconfig|foreground}"
>
&2
exit
3
;;
esac
# vi: ts=2 sw=2 expandtab :
:
stretch/debian/icinga2-common.manpages
deleted
100644 → 0
View file @
34655986
stretch/debian/icinga2-common.postinst
deleted
100644 → 0
View file @
34655986
#!/bin/sh
# postinst script for icinga2-common
set
-e
setperm
()
{
ownopt
=
if
[
"
$1
"
=
-R
]
;
then
ownopt
=
"-R"
shift
fi
user
=
"
$1
"
group
=
"
$2
"
mode
=
"
$3
"
file
=
"
$4
"
shift
4
# only do something when no setting exists
if
!
dpkg-statoverride
--list
"
$file
"
>
/dev/null 2>&1
;
then
chown
$ownopt
"
$user
"
:
"
$group
"
"
$file
"
chmod
"
$mode
"
"
$file
"
fi
}
is_fresh_install
()
{
if
[
-z
"
$2
"
]
;
then
return
0
fi
return
1
}
dpkg-maintscript-helper rm_conffile
\
"/etc/bash_completion.d/icinga2"
"2.4.1-2~"
--
"
$@
"
dpkg-maintscript-helper rm_conffile
\
"/etc/icinga2/init.conf"
"2.10.0~"
--
"
$@
"
case
"
$1
"
in
configure
)
if
!
getent passwd nagios
>
/dev/null
;
then
echo
'Adding system-user for nagios'
1>&2
adduser
--system
--group
--home
/var/lib/nagios
\
--disabled-login
--force-badname
nagios
>
/dev/null
fi
# explicitly set permissions on some files that are dependent
# on the uid/gid of the nagios user, which is dynamically created.
if
!
dpkg-statoverride
--list
/etc/icinga2
;
then
setperm nagios nagios 0750 /etc/icinga2
setperm nagios nagios 0640 /etc/icinga2/icinga2.conf
setperm nagios nagios 0640 /etc/icinga2/constants.conf
setperm nagios nagios 0640 /etc/icinga2/zones.conf
setperm
-R
nagios nagios 0700 /etc/icinga2/pki
setperm
-R
nagios nagios 0750 /etc/icinga2/conf.d
setperm
-R
nagios nagios 0750 /etc/icinga2/features-enabled
setperm
-R
nagios nagios 0750 /etc/icinga2/features-available
setperm nagios nagios 0750 /etc/icinga2/zones.d
fi
setperm nagios adm 2751 /var/log/icinga2
setperm nagios adm 2751 /var/log/icinga2/compat
setperm nagios adm 2755 /var/log/icinga2/compat/archives
setperm nagios adm 2751 /var/log/icinga2/crash
setperm nagios nagios 0750 /var/lib/icinga2
setperm nagios nagios 0750 /var/lib/icinga2/api
setperm nagios nagios 0750 /var/lib/icinga2/api/log
setperm nagios nagios 0750 /var/lib/icinga2/api/zones
setperm nagios www-data 0750 /var/cache/icinga2
setperm nagios nagios 0750 /var/spool/icinga2
setperm nagios nagios 0770 /var/spool/icinga2/perfdata
setperm nagios nagios 0750 /var/spool/icinga2/tmp
;;
abort-upgrade|abort-remove|abort-deconfigure
)
;;
*
)
echo
"postinst called with unknown argument
\`
$1
'"
>
&2
exit
1
;;
esac
init_failed
()
{
echo
"Icinga 2 was unable to start due to configuration errors."
;
echo
"Please fix them and manually restart the icinga2 daemon using"
;
echo
" ´service icinga2 start´"
;
}
#DEBHELPER#
exit
0
stretch/debian/icinga2-common.postrm
deleted
100644 → 0
View file @
34655986
#!/bin/sh
# postrm script for icinga2-common
set
-e
case
"
$1
"
in
purge
)
rm
-rf
/etc/icinga2/features-enabled/
rm
-rf
/var/lib/icinga2/
rm
-rf
/var/log/icinga2/
rm
-rf
/var/cache/icinga2/
rm
-rf
/var/spool/icinga2/
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear
)
;;
*
)
echo
"postrm called with unknown argument
\`
$1
'"
>
&2
exit
1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit
0
stretch/debian/icinga2-common.preinst
deleted
100644 → 0
View file @
34655986
#!/bin/sh
set
-e
dpkg-maintscript-helper rm_conffile
\
"/etc/bash_completion.d/icinga2"
"2.4.1-2~"
--
"
$@
"
#DEBHELPER#
exit
0
stretch/debian/icinga2-common.prerm
deleted
100644 → 0
View file @
34655986
#!/bin/sh
set
-e
dpkg-maintscript-helper rm_conffile
\
"/etc/bash_completion.d/icinga2"
"2.4.1-2~"
--
"
$@
"
#DEBHELPER#
exit
0
stretch/debian/icinga2-doc.install
deleted
100644 → 0
View file @
34655986
usr
/
share
/
doc
/
icinga2
/
markdown
stretch/debian/icinga2-ido-mysql.config
deleted
100644 → 0
View file @
34655986
#!/bin/sh
set
-
e
. /
usr
/
share
/
debconf
/
confmodule
if
[ -
f
/
usr
/
share
/
dbconfig
-
common
/
dpkg
/
config
.
mysql
];
then
. /
usr
/
share
/
dbconfig
-
common
/
dpkg
/
config
.
mysql
dbc_dbname
=
icinga2
dbc_dbuser
=
icinga2
dbc_go
icinga2
-
ido
-
mysql
$@
fi
# check if the feature is enabled
if
test
-
L
/
etc
/
icinga2
/
features
-
enabled
/
ido
-
mysql
.
conf
;
then
db_set
icinga2
-
ido
-
mysql
/
enable
"true"
else
db_set
icinga2
-
ido
-
mysql
/
enable
"false"
fi
db_input
high
icinga2
-
ido
-
mysql
/
enable
||
true
db_go
||
true
stretch/debian/icinga2-ido-mysql.install
deleted
100644 → 0
View file @
34655986
lib
/
db_ido_mysql
/
schema
/*.sql usr/share/icinga2-ido-mysql/schema
debian/ido-mysql.conf-sample usr/share/icinga2/tmpl
usr/lib/*/
icinga2
/
libmysql_shim
*
lib
/
db_ido_mysql
/
schema
/
upgrade
/*.
sql
usr
/
share
/
icinga2
-
ido
-
mysql
/
schema
/
upgrade
stretch/debian/icinga2-ido-mysql.postinst
deleted
100644 → 0
View file @
34655986
#!/bin/sh
set
-e
.
/usr/share/debconf/confmodule
.
/usr/share/dbconfig-common/dpkg/postinst
#dbc_debug='1'
dbc_generate_include
=
'template:/etc/icinga2/features-available/ido-mysql.conf'
dbc_generate_include_owner
=
'nagios:nagios'
dbc_generate_include_args
=
'--ucf -o template_infile=/usr/share/icinga2/tmpl/ido-mysql.conf-sample'
dbc_go icinga2-ido-mysql
$@
if
[
"
$1
"
=
configure
]
;
then
# get values from debconf db
db_get icinga2-ido-mysql/enable
if
[
"
$RET
"
=
"false"
]
;
then
if
[
-L
/etc/icinga2/features-enabled/ido-mysql.conf
]
then
echo
"disable ido mysql feature"
icinga2 feature disable ido-mysql
echo
"reloading icinga2"
[
-x
$(
which invoke-rc.d
)
]
&&
invoke-rc.d icinga2 reload
fi
else
if
[
!
-L
/etc/icinga2/features-enabled/ido-mysql.conf
]
then
echo
"enable ido mysql feature"
icinga2 feature
enable
ido-mysql
echo
"reloading icinga2"
[
-x
$(
which invoke-rc.d
)
]
&&
invoke-rc.d icinga2 reload
fi
fi
fi
#DEBHELPER#
db_stop
stretch/debian/icinga2-ido-mysql.postrm
deleted
100644 → 0
View file @
34655986
#!/bin/sh
set
-e
if
[
-f
/usr/share/debconf/confmodule
]
;
then
.
/usr/share/debconf/confmodule
fi
if
[
-f
/usr/share/dbconfig-common/dpkg/postrm
]
;
then
.
/usr/share/dbconfig-common/dpkg/postrm
dbc_go icinga2-ido-mysql
$@
fi
if
[
"
$1
"
=
"purge"
]
;
then
rm
-f
/etc/icinga2/features-available/ido-mysql.conf
rm
-f
/etc/icinga2/features-enabled/ido-mysql.conf
if
which ucf
>
/dev/null
;
then
ucf
--purge
/etc/icinga2/features-available/ido-mysql.conf
fi
db_purge
fi
#DEBHELPER#
stretch/debian/icinga2-ido-mysql.prerm
deleted
100644 → 0
View file @
34655986
#!/bin/sh
set
-e
.
/usr/share/debconf/confmodule
.
/usr/share/dbconfig-common/dpkg/prerm
dbc_go icinga2-ido-mysql
$@
#DEBHELPER#
stretch/debian/icinga2-ido-mysql.templates
deleted
100644 → 0
View file @
34655986
# These templates have been reviewed by the debian-l10n-english
# team