Fix apptask error because of multiple collectd restarts

Everyone gets in a rush to restart collectd and apptask update/restore
fails during infra updates
This commit is contained in:
Girish Ramakrishnan
2016-05-10 09:51:04 -07:00
parent f36641b443
commit a54466f8c2

View File

@@ -13,6 +13,17 @@ if [[ $# == 1 && "$1" == "--check" ]]; then
fi
if [[ "${BOX_ENV}" == "cloudron" ]]; then
/etc/init.d/collectd restart
for i in {1..10}; do
if systemctl is-active collectd.service; then
systemctl restart collectd
exit 0
fi
echo "Collectd is not active. Maybe some other apptask is restarting it"
sleep 6
done
echo "collectd not running"
exit 1
fi