Remove an unneeded for loop from the ceph logrotate.conf, and
update the new rgw logrotate.conf to reload the radosgw serivce.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
if which initctl > /dev/null && [ -x `which initctl` ]; then
# upstart reload isn't very helpful here:
# https://bugs.launchpad.net/upstart/+bug/1012938
- for type in mon osd mds; do
- initctl list \
- | sed -n 's/^\(ceph-\(mon\|osd\|mds\)\+\)[ \t]\+(\([^ \/]\+\)\/\([^ \/]\+\))[ \t]\+start\/.*$/\1 cluster=\3 id=\4/p' \
- | while read l; do
- initctl reload -- $l 2>/dev/null || :
- done
- done
+ initctl list \
+ | sed -n 's/^\(ceph-\(mon\|osd\|mds\)\+\)[ \t]\+(\([^ \/]\+\)\/\([^ \/]\+\))[ \t]\+start\/.*$/\1 cluster=\3 id=\4/p' \
+ | while read l; do
+ initctl reload -- $l 2>/dev/null || :
+ done
fi
endscript
missingok
elif which service > /dev/null && [ -x `which service` ]; then
service radosgw reload >/dev/null
fi
+ # Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
+ if which initctl > /dev/null && [ -x `which initctl` ]; then
+ # upstart reload isn't very helpful here:
+ # https://bugs.launchpad.net/upstart/+bug/1012938
+ initctl list \
+ | sed -n 's/^\(radosgw\+\)[ \t]\+(\([^ \/]\+\)\/\([^ \/]\+\))[ \t]\+start\/.*$/\1 cluster=\2 id=\3/p' \
+ | while read l; do
+ initctl reload -- $l 2>/dev/null || :
+ done
+ fi
endscript
missingok
}