Sorry to trouble you but I do have a small issue with one of my bash files
I do have a crontab task which runs below task each 5 minutes to make sure my deluge server keeps running:
(deluge keeps giving me some issues that once it will upload too much of data, it keeps crashing)
Code: Select all
#!/bin/bash
#make-run.sh
#make sure deluge is running
export DISPLAY=:0 #needed if you are running a simple gui app.
process=deluged
makerun="service deluge restart" && "deluged"
if ps ax | grep -v grep | grep $process > /dev/null
then
exit
else
$makerun &
echo "Date: " $(date) >> /media/Intenso/Raspberry_Pi/deluge-crash.log & sendEmail -f "edmun@mailserver.com" -t "notificationemail@gmail.com" -u "Raspberry Pi Notification" -m "Deluge server and Deluge Web Access Interface has been restarted" -s "mailserver":587 -o tls=no -xu "username" -xp "password" -a "/media/Intenso/Raspberry_Pi/deluge-crash.log"
fi
exit
Somehow, I am not getting e-mails, however when I send manually (when I do paste my "sendEmail" command into ssh) the command - everything seems to be working fine.
I am kind of lost