#!/bin/bash

TYPE_SERVER=$(/bin/cat /etc/yandex/environment.type)

if [[ $TYPE_SERVER != "production" && $TYPE_SERVER != "testing" ]]; then exit 0; fi

for i in `find /etc/sv/ -iname dt* -printf "%f\n"`; do
	/bin/ln -s /etc/sv/$i /etc/service/ ||:
	/usr/bin/sv -w 120 restart $i ||:
done
/etc/init.d/rsyslog restart ||:
