mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Merge remote-tracking branch 'github/develop' into develop
This commit is contained in:
commit
04f9f8e176
@ -37,6 +37,7 @@ mkdir -p temp_package/usr/sbin/
|
|||||||
mkdir -p temp_package/etc/pandora/plugins
|
mkdir -p temp_package/etc/pandora/plugins
|
||||||
mkdir -p temp_package/etc/pandora/collections
|
mkdir -p temp_package/etc/pandora/collections
|
||||||
mkdir -p temp_package/etc/init.d/
|
mkdir -p temp_package/etc/init.d/
|
||||||
|
mkdir -p temp_package/lib/systemd/system/
|
||||||
mkdir -p temp_package/var/log/pandora/
|
mkdir -p temp_package/var/log/pandora/
|
||||||
mkdir -p temp_package/var/spool/pandora/data_out
|
mkdir -p temp_package/var/spool/pandora/data_out
|
||||||
mkdir -p temp_package/usr/share/man/man1/
|
mkdir -p temp_package/usr/share/man/man1/
|
||||||
@ -63,6 +64,7 @@ cp -aRf tentacle_client temp_package/usr/bin/
|
|||||||
cp -aRf pandora_agent temp_package/usr/bin/
|
cp -aRf pandora_agent temp_package/usr/bin/
|
||||||
cp -aRf pandora_agent_exec temp_package/usr/bin/pandora_agent_exec
|
cp -aRf pandora_agent_exec temp_package/usr/bin/pandora_agent_exec
|
||||||
cp -aRf pandora_agent_daemon temp_package/etc/init.d/pandora_agent_daemon
|
cp -aRf pandora_agent_daemon temp_package/etc/init.d/pandora_agent_daemon
|
||||||
|
cp -aRf pandora_agent_daemon.service temp_package/lib/systemd/system/pandora_agent_daemon.service
|
||||||
cp -aRf pandora_agent_logrotate temp_package/etc/logrotate.d/pandora_agent
|
cp -aRf pandora_agent_logrotate temp_package/etc/logrotate.d/pandora_agent
|
||||||
cp Linux/pandora_agent.conf temp_package/etc/pandora/
|
cp Linux/pandora_agent.conf temp_package/etc/pandora/
|
||||||
|
|
||||||
|
@ -22,7 +22,12 @@ chgrp root $PANDORA_LOG
|
|||||||
chown -R root:root $PANDORA_BIN
|
chown -R root:root $PANDORA_BIN
|
||||||
chown -R root:root $PANDORA_EXEC_BIN
|
chown -R root:root $PANDORA_EXEC_BIN
|
||||||
|
|
||||||
echo "Linking start-up daemon script to /etc/rc$INITLV.d";
|
echo "Enabling start-up agent daemon";
|
||||||
update-rc.d pandora_agent_daemon defaults
|
if [ -x `command -v systemctl` ]; then
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable pandora_agent_daemon
|
||||||
|
else
|
||||||
|
update-rc.d pandora_agent_daemon defaults
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Please, now setup the $PANDORA_HOME/pandora_agent.conf and before start the /etc/init.d/pandora_agent_daemon"
|
echo "Please, now setup the $PANDORA_HOME/pandora_agent.conf and before start the pandora_agent_daemon service"
|
||||||
|
@ -8,4 +8,9 @@ PANDORA_CFG=/etc/pandora
|
|||||||
#rm -rf $PANDORA_CFG/plugins
|
#rm -rf $PANDORA_CFG/plugins
|
||||||
#rm -rf $PANDORA_CFG/pandora_agent.conf
|
#rm -rf $PANDORA_CFG/pandora_agent.conf
|
||||||
|
|
||||||
update-rc.d -f pandora_agent_daemon remove
|
if [ -x `command -v systemctl` ]; then
|
||||||
|
systemctl disable pandora_agent_daemon
|
||||||
|
systemctl daemon-reload
|
||||||
|
else
|
||||||
|
update-rc.d -f pandora_agent_daemon remove
|
||||||
|
fi
|
||||||
|
@ -27,6 +27,10 @@ DAEMON_TENTACLE=/usr/bin/tentacle_server
|
|||||||
LOGFILE=/var/log/pandora/pandora_agent.log
|
LOGFILE=/var/log/pandora/pandora_agent.log
|
||||||
PANDORA_USER=root
|
PANDORA_USER=root
|
||||||
|
|
||||||
|
if [ -x /lib/lsb/init-functions ]; then
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
fi
|
||||||
|
|
||||||
# This function replace pidof, not working in the same way in different linux distros
|
# This function replace pidof, not working in the same way in different linux distros
|
||||||
|
|
||||||
pidof_pandora () {
|
pidof_pandora () {
|
||||||
|
9
pandora_agents/unix/pandora_agent_daemon.service
Normal file
9
pandora_agents/unix/pandora_agent_daemon.service
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Pandora FMS agent daemon
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/pandora_agent /etc/pandora
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -67,6 +67,7 @@ then
|
|||||||
mkdir -p temp_package/usr/bin/
|
mkdir -p temp_package/usr/bin/
|
||||||
mkdir -p temp_package/usr/sbin/
|
mkdir -p temp_package/usr/sbin/
|
||||||
mkdir -p temp_package/etc/init.d/
|
mkdir -p temp_package/etc/init.d/
|
||||||
|
mkdir -p temp_package/lib/systemd/system/
|
||||||
mkdir -p temp_package/etc/pandora/
|
mkdir -p temp_package/etc/pandora/
|
||||||
mkdir -p temp_package/var/spool/pandora/data_in
|
mkdir -p temp_package/var/spool/pandora/data_in
|
||||||
chmod 770 temp_package/var/spool/pandora/data_in
|
chmod 770 temp_package/var/spool/pandora/data_in
|
||||||
@ -97,6 +98,9 @@ then
|
|||||||
cp -aRf util/pandora_server temp_package/etc/init.d/
|
cp -aRf util/pandora_server temp_package/etc/init.d/
|
||||||
cp -aRf util/tentacle_serverd temp_package/etc/init.d/
|
cp -aRf util/tentacle_serverd temp_package/etc/init.d/
|
||||||
|
|
||||||
|
cp -aRf util/pandora_server.service temp_package/lib/systemd/system/
|
||||||
|
cp -aRf util/tentacle_serverd.service temp_package/lib/systemd/system/
|
||||||
|
|
||||||
cp -aRf man/man1/* temp_package/usr/share/man/man1/
|
cp -aRf man/man1/* temp_package/usr/share/man/man1/
|
||||||
|
|
||||||
cp -aRf util/pandora_server_logrotate temp_package/etc/logrotate.d/pandora_server
|
cp -aRf util/pandora_server_logrotate temp_package/etc/logrotate.d/pandora_server
|
||||||
|
@ -81,12 +81,15 @@ else
|
|||||||
echo "Skipping creation of pandora_server.conf: there is already one."
|
echo "Skipping creation of pandora_server.conf: there is already one."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Linking startup script to /etc/rc2.d"
|
echo "Enabling start-up pandora & tentacle server daemons";
|
||||||
update-rc.d pandora_server defaults
|
if [ -x `command -v systemctl` ]; then
|
||||||
|
systemctl daemon-reload
|
||||||
# Tentacle server install
|
systemctl enable pandora_server
|
||||||
echo "Installing tentacle server in /etc/rc2.d/S80tentacle_serverd"
|
systemctl enable tentacle_serverd
|
||||||
update-rc.d tentacle_serverd defaults
|
else
|
||||||
|
update-rc.d pandora_server defaults
|
||||||
|
update-rc.d tentacle_serverd defaults
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d /etc/cron.hourly ]
|
if [ -d /etc/cron.hourly ]
|
||||||
then
|
then
|
||||||
|
@ -60,10 +60,14 @@ get_distro () {
|
|||||||
GET_DISTRO="`get_distro`"
|
GET_DISTRO="`get_distro`"
|
||||||
DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"`
|
DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"`
|
||||||
|
|
||||||
rm /etc/init.d/pandora_server
|
if [ -x `command -v systemctl` ]; then
|
||||||
rm /etc/init.d/tentacle_serverd
|
systemctl disable pandora_server
|
||||||
update-rc.d pandora_server remove
|
systemctl disable tentacle_serverd
|
||||||
update-rc.d tentacle_serverd remove
|
systemctl daemon-reload
|
||||||
|
else
|
||||||
|
update-rc.d pandora_server remove
|
||||||
|
update-rc.d tentacle_serverd remove
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d /etc/cron.hourly ]
|
if [ -d /etc/cron.hourly ]
|
||||||
then
|
then
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
# Description: Pandora FMS Server startup script
|
# Description: Pandora FMS Server startup script
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
if [ -x /lib/lsb/init-functions ]; then
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
fi
|
||||||
|
|
||||||
# If you want to run several pandora servers in this machine, just copy
|
# If you want to run several pandora servers in this machine, just copy
|
||||||
# this script to another name, editing PANDORA_HOME to the new .conf
|
# this script to another name, editing PANDORA_HOME to the new .conf
|
||||||
|
|
||||||
|
10
pandora_server/util/pandora_server.service
Normal file
10
pandora_server/util/pandora_server.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Pandora FMS server daemon
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/pandora_server /etc/pandora/pandora_server.conf -D
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -24,6 +24,10 @@
|
|||||||
# Description: Tentacle Server startup script
|
# Description: Tentacle Server startup script
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
if [ -x /lib/lsb/init-functions ]; then
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
fi
|
||||||
|
|
||||||
# Uses a wait limit before sending a KILL signal, before trying to stop
|
# Uses a wait limit before sending a KILL signal, before trying to stop
|
||||||
# Pandora FMS server nicely. Some big systems need some time before close
|
# Pandora FMS server nicely. Some big systems need some time before close
|
||||||
# all pending tasks / threads.
|
# all pending tasks / threads.
|
||||||
|
11
pandora_server/util/tentacle_serverd.service
Normal file
11
pandora_server/util/tentacle_serverd.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Tentacle server daemon
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/tentacle_server -a 0.0.0.0 -p 41121 -s /var/spool/pandora/data_in -i.*\.conf:conf;.*\.md5:md5;.*\.zip:collections -d
|
||||||
|
User=pandora
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user