mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
F OpenNebula/one#5178: Add logrotate to supervisor (#579)
Enforce logrotate before the start of any opennebula's supervisor service - as is done similarly in the systemd services. Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
This commit is contained in:
parent
bb8e071348
commit
36e6cbe546
@ -35,5 +35,9 @@ else
|
||||
msg "File created - continue"
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-fireedge
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/node /usr/lib/one/fireedge/dist/index.js
|
||||
|
@ -35,5 +35,9 @@ else
|
||||
msg "File created - continue"
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-flow
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/ruby /usr/lib/one/oneflow/oneflow-server.rb
|
||||
|
@ -35,5 +35,9 @@ else
|
||||
msg "File created - continue"
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-gate
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/ruby /usr/lib/one/onegate/onegate-server.rb
|
||||
|
@ -38,5 +38,9 @@ done
|
||||
|
||||
export SSH_AUTH_SOCK
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-hem
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/ruby /usr/lib/one/onehem/onehem-server.rb
|
||||
|
@ -62,6 +62,10 @@ if ! _pid=$(check_vnc) ; then
|
||||
/usr/bin/novnc-server start
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-novnc
|
||||
|
||||
# now we will stay in a loop monitoring and faking the foreground process...
|
||||
while sleep 1 ; do
|
||||
if ! _pid=$(check_vnc) ; then
|
||||
|
@ -35,5 +35,9 @@ else
|
||||
msg "File created - continue"
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-scheduler
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/mm_sched
|
||||
|
@ -35,5 +35,9 @@ else
|
||||
msg "File created - continue"
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula-sunstone
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb
|
||||
|
@ -63,5 +63,9 @@ if [ -e /var/lock/one/one ] ; then
|
||||
rm -f /var/lock/one/one
|
||||
fi
|
||||
|
||||
msg "Rotate log to start with an empty one"
|
||||
/usr/sbin/logrotate -s /var/lib/one/.logrotate.status \
|
||||
-f /etc/logrotate.d/opennebula
|
||||
|
||||
msg "Service started!"
|
||||
exec /usr/bin/oned -f
|
||||
|
Loading…
Reference in New Issue
Block a user