salt/states/roles/maintain/transmission/restart_transmission.sh

10 lines
363 B
Bash
Raw Normal View History

2019-12-28 21:41:25 -06:00
#!/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
2019-12-28 21:41:25 -06:00
systemctl restart transmission.service
fi