#!/bin/bash
#resurrect rtorrent when it dies and restart every 6 hours
hour=`date | grep -Po "\d\d:\d\d:\d\d" | grep -Po "^\d\d:\d\d"`

if [ "$hour" = "00:00" ] || [ "$hour" = "06:00" ] || [ "$hour" = "12:00" ] || [ "$hour" = "18:00" ];then
  systemctl restart windscribe.service
  cp /opt/resolv.conf /etc/resolv.conf
  systemctl restart transmission.service
fi