1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-06 13:17:42 +03:00
one/share/pkgs/services/systemd/opennebula-hem.service
Jan Orel 8689d5d49b
B #6034 Fix log rotation (#2415)
* Revert "F #5328: Update logrotate behavior to avoid long restarts (#2275)". This reverts commit 6b1127f180.

* B #5328: Don't wait for log compressing
* B #6034: Don't overwrite logs

While having already `copytruncate` in logroate we don't need to implement signaling and re-openning files.

* L #-: Linting
2022-12-12 11:50:54 +01:00

22 lines
570 B
Desktop File

[Unit]
Description=OpenNebula Hook Execution Service
After=syslog.target network.target
After=opennebula.service
[Service]
Type=simple
Group=oneadmin
User=oneadmin
EnvironmentFile=-/var/run/one/ssh-agent.env
ExecStartPre=-/usr/sbin/logrotate -f /etc/logrotate.d/opennebula-hem -s /var/lib/one/.logrotate.status
ExecStartPre=-sh 'gzip -9 /var/log/one/onehem.log-* &'
ExecStart=/usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb
StartLimitInterval=60
StartLimitBurst=3
Restart=on-failure
RestartSec=5
SyslogIdentifier=opennebula-hem
[Install]
WantedBy=multi-user.target