mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
add systemd to packages
This commit is contained in:
parent
3c5a893c71
commit
c77ccae89a
@ -108,8 +108,18 @@ mkdir -p /var/spool/pandora/data_out
|
|||||||
if [ ! -d /var/log/pandora ]; then
|
if [ ! -d /var/log/pandora ]; then
|
||||||
mkdir -p /var/log/pandora
|
mkdir -p /var/log/pandora
|
||||||
fi
|
fi
|
||||||
/sbin/chkconfig --add pandora_agent_daemon
|
|
||||||
/sbin/chkconfig pandora_agent_daemon on
|
if [ `command -v sysctl` ];
|
||||||
|
then
|
||||||
|
cp /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
|
||||||
|
chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
|
||||||
|
# Enable the services on SystemD
|
||||||
|
systemctl enable pandora_agent_daemon.service
|
||||||
|
else
|
||||||
|
/sbin/chkconfig --add pandora_agent_daemon
|
||||||
|
/sbin/chkconfig pandora_agent_daemon on
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
|
||||||
|
@ -98,11 +98,20 @@ fi
|
|||||||
|
|
||||||
cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent
|
cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent
|
||||||
|
|
||||||
# Enable the service on SystemD
|
|
||||||
systemctl enable pandora_agent_daemon.service
|
|
||||||
|
|
||||||
mkdir -p /var/spool/pandora/data_out
|
mkdir -p /var/spool/pandora/data_out
|
||||||
chkconfig pandora_agent_daemon on
|
|
||||||
|
if [ `command -v sysctl` ];
|
||||||
|
then
|
||||||
|
cp /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
|
||||||
|
chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
|
||||||
|
# Enable the services on SystemD
|
||||||
|
systemctl enable pandora_agent_daemon.service
|
||||||
|
else
|
||||||
|
chkconfig pandora_agent_daemon on
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@ After=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/pandora_agent /etc/pandora
|
ExecStart=/usr/bin/pandora_agent /etc/pandora
|
||||||
|
Restart=on-failure
|
||||||
|
RestartPreventExitStatus=1
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -111,10 +111,21 @@ exit 0
|
|||||||
%post
|
%post
|
||||||
# Initial installation
|
# Initial installation
|
||||||
if [ "$1" = 1 ]; then
|
if [ "$1" = 1 ]; then
|
||||||
/sbin/chkconfig --add pandora_server
|
if [ `command -v sysctl` ];
|
||||||
/sbin/chkconfig --add tentacle_serverd
|
then
|
||||||
/sbin/chkconfig pandora_server on
|
cp /usr/share/pandora_server/util/tentacle_serverd.service /usr/lib/systemd/system/
|
||||||
/sbin/chkconfig tentacle_serverd on
|
chmod -x /usr/lib/systemd/system/tentacle_serverd.service
|
||||||
|
# Enable the services on SystemD
|
||||||
|
systemctl enable tentacle_serverd.service
|
||||||
|
else
|
||||||
|
/sbin/chkconfig --add tentacle_serverd
|
||||||
|
/sbin/chkconfig tentacle_serverd on
|
||||||
|
fi
|
||||||
|
|
||||||
|
/sbin/chkconfig --add pandora_server
|
||||||
|
/sbin/chkconfig pandora_server on
|
||||||
|
|
||||||
|
systemctl enable pandora_server.service
|
||||||
|
|
||||||
echo "Pandora FMS Server configuration is %{_sysconfdir}/pandora/pandora_server.conf"
|
echo "Pandora FMS Server configuration is %{_sysconfdir}/pandora/pandora_server.conf"
|
||||||
echo "Pandora FMS Server main directory is %{prefix}/pandora_server/"
|
echo "Pandora FMS Server main directory is %{prefix}/pandora_server/"
|
||||||
|
@ -102,11 +102,20 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
chkconfig pandora_server on
|
if [ `command -v sysctl` ];
|
||||||
chkconfig tentacle_serverd on
|
then
|
||||||
|
cp /usr/share/pandora_server/util/tentacle_serverd.service /usr/lib/systemd/system/
|
||||||
|
chmod -x /usr/lib/systemd/system/tentacle_serverd.service
|
||||||
|
|
||||||
# Enable the services on SystemD
|
# Enable the service on SystemD
|
||||||
systemctl enable tentacle_serverd.service
|
systemctl enable tentacle_serverd.service
|
||||||
|
else
|
||||||
|
chkconfig tentacle_serverd on
|
||||||
|
fi
|
||||||
|
|
||||||
|
chkconfig pandora_server on
|
||||||
|
|
||||||
|
# Enable the service on SystemD
|
||||||
systemctl enable pandora_server.service
|
systemctl enable pandora_server.service
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Tentacle server daemon
|
Description=Tentacle server daemon
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
Requires=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/bin/tentacle_server -F /etc/tentacle/tentacle_server.conf
|
ExecStart=/usr/bin/tentacle_server -F /etc/tentacle/tentacle_server.conf
|
||||||
User=pandora
|
User=pandora
|
||||||
|
Restart=on-failure
|
||||||
|
RestartPreventExitStatus=1
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user