#!/bin/bash
# Restart printing cronjob
if [[ $(pgrep -fl 'cron.sh' | wc -l) -lt 1 ]]; then
	cd /home/insuraz1/public_html/_bildr/
	nohup ./cron.sh &
fi

# Kill stucking chrome
if (( $(ls -l printing.queue | cut -d" " -f5) > 0 )) && (( $(( $(date +%s) - $(date +%s -r printing.queue))) > 180 )); then
	pkill chrome
fi
