1 |
commit: c83a82109aac924c7c574e5dee27f1ac509a64a0 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Mar 30 15:51:31 2019 +0000 |
4 |
Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 30 21:22:46 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83a8210 |
7 |
|
8 |
net-analyzer/icinga2: remove unused file |
9 |
|
10 |
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com> |
11 |
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/icinga2/files/icinga2.initd-2 | 91 ------------------------------ |
14 |
1 file changed, 91 deletions(-) |
15 |
|
16 |
diff --git a/net-analyzer/icinga2/files/icinga2.initd-2 b/net-analyzer/icinga2/files/icinga2.initd-2 |
17 |
deleted file mode 100644 |
18 |
index b12716d4d44..00000000000 |
19 |
--- a/net-analyzer/icinga2/files/icinga2.initd-2 |
20 |
+++ /dev/null |
21 |
@@ -1,91 +0,0 @@ |
22 |
-#!/sbin/openrc-run |
23 |
-# Copyright 1999-2018 Gentoo Foundation |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-extra_started_commands="reload" |
27 |
- |
28 |
-# Set defaults, see /etc/conf.d/icinga2 to override |
29 |
-: ${DAEMON:=/usr/sbin/icinga2} |
30 |
-: ${ICINGA2_CONFIG_FILE:=/etc/icinga2/icinga2.conf} |
31 |
-: ${ICINGA2_RUN_DIR:=/run/icinga2} |
32 |
-: ${ICINGA2_STATE_DIR:=/var/cache/icinga2} |
33 |
-: ${ICINGA2_PID_FILE:=${ICINGA2_RUN_DIR}/icinga2.pid} |
34 |
-: ${ICINGA2_CMD_DIR:=${ICINGA2_RUN_DIR}/cmd} |
35 |
-: ${ICINGA2_LOG_DIR:=/var/log/icinga2} |
36 |
-: ${ICINGA2_ERROR_LOG:=/var/log/icinga2/error.log} |
37 |
-: ${ICINGA2_STARTUP_LOG:=/var/log/icinga2/startup.log} |
38 |
-: ${ICINGA2_LOG:=/var/log/icinga2/icinga2.log} |
39 |
-: ${ICINGA2_CACHE_DIR:=/var/cache/icinga2} |
40 |
-: ${ICINGA2_USER:=icinga} |
41 |
-: ${ICINGA2_GROUP:=icingacmd} |
42 |
-: ${ICINGA2_COMMAND_GROUP:=icingacmd} |
43 |
- |
44 |
-ICINGA2_DAEMON_ARGS="daemon -c $ICINGA2_CONFIG_FILE -e $ICINGA2_ERROR_LOG -d" |
45 |
- |
46 |
-depend() { |
47 |
- need net |
48 |
-} |
49 |
- |
50 |
-checkconfig() { |
51 |
- if [ ! -e "$ICINGA2_CONFIG_FILE" ]; then |
52 |
- ewarn "Config file '$ICINGA2_CONFIG_FILE' does not exist." |
53 |
- eend 1 |
54 |
- fi |
55 |
- |
56 |
- ICINGA2_USER=$($DAEMON variable get --current RunAsUser) |
57 |
- if [ $? != 0 ]; then |
58 |
- eerror "Could not fetch RunAsUser variable: '$ICINGA2_USER'." |
59 |
- return 1 |
60 |
- fi |
61 |
- ICINGA2_GROUP=$($DAEMON variable get --current RunAsGroup) |
62 |
- if [ $? != 0 ]; then |
63 |
- eerror "Could not fetch RunAsGroup variable: '$ICINGA2_GROUP'." |
64 |
- return 1 |
65 |
- fi |
66 |
- |
67 |
- checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_RUN_DIR |
68 |
- checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_STATE_DIR |
69 |
- checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR |
70 |
- |
71 |
- if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 2>&1; then |
72 |
- eerror "Icinga2 detected configuration errors. Check '$ICINGA2_STARTUP_LOG' for details." |
73 |
- return 1 |
74 |
- fi |
75 |
-} |
76 |
- |
77 |
-start() { |
78 |
- checkconfig || return 1 |
79 |
- |
80 |
- ebegin "Starting icinga2" |
81 |
- start-stop-daemon --start --exec "${DAEMON}" \ |
82 |
- --pidfile "${ICINGA2_PID_FILE}" \ |
83 |
- -- $ICINGA2_DAEMON_ARGS > $ICINGA2_STARTUP_LOG 2>&1 |
84 |
- local retval=$? |
85 |
- if [ $retval -ne 0 ]; then |
86 |
- ewarn "Error starting icinga2. '$ICINGA2_STARTUP_LOG' for details." |
87 |
- fi |
88 |
- eend $retval |
89 |
-} |
90 |
- |
91 |
-stop() { |
92 |
- ebegin "Stopping icinga2" |
93 |
- start-stop-daemon \ |
94 |
- --stop \ |
95 |
- --pidfile $ICINGA2_PID_FILE \ |
96 |
- --retry "SIGTERM/15 SIGKILL/30" \ |
97 |
- --progress |
98 |
- eend $? |
99 |
-} |
100 |
- |
101 |
-reload() { |
102 |
- checkconfig || return 1 |
103 |
- |
104 |
- ebegin "Reloading icinga2" |
105 |
- start-stop-daemon --signal HUP --pidfile "$ICINGA2_PID_FILE" |
106 |
- |
107 |
- local retval=$? |
108 |
- if [ $retval -ne 0 ]; then |
109 |
- ewarn "Error reloading icinga2." |
110 |
- fi |
111 |
- eend $retval |
112 |
-} |