-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
centreon-agent => centreon-monitoring-agent
- Loading branch information
1 parent
baa00c2
commit 1edd669
Showing
24 changed files
with
138 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ ReloadPropagatedFrom=centreon.service | |
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@CENTREON_AGENT@ @PREFIX_AGENT_CONF@/@[email protected] | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
Type=simple | ||
User=centreon-agent | ||
User=@USER_AGENT@ | ||
|
||
[Install] | ||
WantedBy=default.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "centreon-monitoring-agent-selinux" | ||
arch: "${ARCH}" | ||
platform: "linux" | ||
version_schema: "none" | ||
version: "${VERSION}" | ||
release: "${RELEASE}${DIST}" | ||
section: "default" | ||
priority: "optional" | ||
maintainer: "Centreon <[email protected]>" | ||
description: | | ||
SELinux context for centreon-monitoring-agent | ||
vendor: "Centreon" | ||
homepage: "https://centreon.com" | ||
license: "Apache-2.0" | ||
|
||
depends: | ||
- policycoreutils | ||
- centreon-common-selinux | ||
replaces: | ||
- centreon-monitoring-agent-selinux-debuginfo | ||
conflicts: | ||
- centreon-monitoring-agent-selinux-debuginfo | ||
provides: | ||
- centreon-monitoring-agent-selinux-debuginfo | ||
|
||
contents: | ||
- src: "../selinux/centreon-monitoring-agent/centreon-monitoring-agent.pp" | ||
dst: "/usr/share/selinux/packages/centreon/centreon-monitoring-agent.pp" | ||
file_info: | ||
mode: 0655 | ||
|
||
scripts: | ||
postinstall: ./scripts/centreon-monitoring-agent-selinux-postinstall.sh | ||
preremove: ./scripts/centreon-monitoring-agent-selinux-preremove.sh | ||
|
||
rpm: | ||
summary: SELinux context for centreon-monitoring-agent | ||
signature: | ||
key_file: ${RPM_SIGNING_KEY_FILE} | ||
key_id: ${RPM_SIGNING_KEY_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packaging/scripts/centreon-monitoring-agent-postinstall.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
startCentagent() { | ||
systemctl daemon-reload ||: | ||
systemctl unmask centagent.service ||: | ||
systemctl preset centagent.service ||: | ||
systemctl enable centagent.service ||: | ||
systemctl restart centagent.service ||: | ||
} | ||
|
||
|
||
debianLinkNagios() { | ||
if [ ! -r /usr/lib64/nagios/plugins ]; then | ||
ln -s /usr/lib/nagios/plugins /usr/lib64/nagios/plugins | ||
fi | ||
} | ||
|
||
#In debian nagios plugins are stored in /usr/lib/nagios/plugins instead of /usr/lib64/nagios/plugins | ||
#so we create a link /usr/lib/nagios/plugins instead => /usr/lib64/nagios/plugins in order to have | ||
#the same commands configuration for all pollers | ||
if [ "$1" = "configure" ]; then | ||
debianLinkNagios | ||
fi | ||
|
||
|
||
startCentagent | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
case "$1" in | ||
purge) | ||
deluser centreon-monitoring-agent || : | ||
delgroup centreon-monitoring-agent || : | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
if ! id centreon-monitoring-agent > /dev/null 2>&1; then | ||
useradd -r centreon-monitoring-agent > /dev/null 2>&1 | ||
fi | ||
|
||
if id -g nagios > /dev/null 2>&1; then | ||
usermod -a -G centreon-monitoring-agent nagios | ||
fi | ||
|
File renamed without changes.
Oops, something went wrong.