I have a script which executes on certain conditions, whenever I manually execute the script, the popup appears, however if i try to aumotate the script(i.e. run the script right after system is resumed from suspend) the popup does not appear, however the script does other tasks.
Here is my script.
export DISPLAY=:0
#!/bin/bash
sleep 7s
echo "gotfile" $file1
lynx --dump link1 >> file1
lynx --dump link2 >> file1
lynx --dump link3 >> file1
grep "magnet:?xt=u:btih:" file1 > file2
sed -i 's/^......//' file2
awk '/org%3A1337%2Fannounce/{print;print "";next}1' file2 >> file3
lines=$(wc -l < file3)
echo "no. of line $lines"
if grep somepatte file3;
then
lineno=$(grep -n somepatte file3 | cut -d : -f 1)
echo "current line no :-" $lineno
link=$(head -n $lineno file3 | tail -1)
echo $link
notify-send -i /home/hasan/Desktop/flash/Flash.ico 'Flash is Running' 'Getting 3'
notify-send -u critical 'Getting 3'
transmission-remote -a $link
echo $link >> flush
echo "nn" >> flush
fi
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 202
تاريخ: دوشنبه
3 خرداد
1395 ساعت: 17:14