Article View: news.software.readers
Article #42483tin - a bug, or am I doing something wrong??? help needed.
From: Rafal Dylong
Date: Sat, 01 Aug 1998 00:00
Date: Sat, 01 Aug 1998 00:00
114 lines
5820 bytes
5820 bytes
Hi.
Let me introduce a little into my situation.
I want to read news on my linux system(RH5.0). I've decided to install
inn'server on my local linux-machine. I've decided, that I'll automaticly(using
tin) download the news into my provider-server, and than I'll pack them on the
remote machine, and download them via an ftp into my linux system.
Don't ask me, why I want to do news-downloading like this - it's becouse the
costs of the phones here.
Anyway, this the short introduction - and know the problem.
Since I don't have the access to the 'cron' on the remote machine, I've decided
to write a short script to 'emulate' the cron, and to make the automatic
downloading on the news.
The script looks like:
begin-of================automatic_news-reciving_script==========================
while true; do
cd /tmp;
mkdir kndz;
chmod 700 kndz;
mkdir kndz/News;
tin -crS -s /tmp/kndz/News > /dev/null 2> /dev/null;
cd /tmp/kndz;
tar cf - News/* > $HOME/newsy`date +%m%d`.tar;
rm -fR /tmp/kndz/News/* ;
sleep 21600s;
done;
end-of================automatic_news-reciving_script============================
Initially I wanted run this script in the background, and logout from the remote
server machine.
So after I've loged in on the remote machine, I've tped under
bash-shell:'automatic_news-reciving_script &'. On the next day I've recived
e-mail from the sysadmin from the remote server, if am I seek, 'cause I've been
using almost the 100% of the 'power' from the remote muhcine(running under
Hp_Ux). ANyway, I sterted looking for, what in that script failed, and I found.
The main problem is, that tin cannot work as a backround process(without a
terminal access).
After runnung this script in the backgruond, tin download the news in the
/tmp/kndz/News directory. Even write that a log into ~/.tin/log, but that he
could not end.
Now I've tried all the tin futeres at home(on my linux), and even this kind of
script do not work(correct) in the background:
begin-testscript=======================
tin -crS -s /tmp/kndz/News > /dev/null 2> /dev/null;
ls -la > $HOME/list.txt
end-testscript=========================
running this script as 'testscript &' under the bash, tin download the requested
news in the /tmp/kndz/News directory, that write a log file, but after this he
do not end, he want to do something more...? So the 'ls -la.....' could not
execute.
If I run the script as 'testscript' (not in the background), the script works
correct.
A friend o'mine(which is a much better programmer than me) told me, that after
reciving nes, writing the log, tin wants to call an 'ioctl'(or simthing similar
to this name) function, but when he is in background, he could not do this.
So the question is in the subject. Is there any possibility, to run 'tin' in the
background, so he could download the news, when I'm not logged in on the remote
machine.
As far as I know, tin should work properly in this situation, 'cause the 'man
tin' says:
-------------
AUTOMATIC MAILING AND SAVING NEW NEWS
Tin allows new/unread news articles to be mailed (-M
option)/saved (-S option) in batch mode for later reading.
Useful when going on holiday and you don't want to return and
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ !!!!
find that expire has removed a whole load of unread articles.
Best to run from crontab everyday while away, after which you
will be mailed a report of which articles were mailed/saved from
which newsgroups and the total number of articles mailed/saved.
Articles are saved in a private news structure under your
<savedir> directory (default is $HOME/News). Be careful of using
this option if you read a lot of groups because you could
overflow your filesystem. If you only want to save a few groups
it would be best to backup your full $HOME/.newsrc and create a
new one that only contains the newsgroups you want to mail/save.
Saved news can be read later by tin -R.
tin -M iain -c -f newsrc.mail
(mail any unread articles in newgroups
specified in file newsrc.mail)
tin -S -c -f newsrc.save
(save any unread articles in newgroups
specified in file newsrc.save)
tin -R (read any articles saved by tin -S)
-------------
As it is mentioned in the documentation, I've tried the latest beta release of
the tin, and it still do not work corectly.
If someone could help me, it would be nice.
ps.It would be nice, if You could send me a copy of Your answer, to my e-mail.
Rafal Dylong
rdylongr@zeus.polsl.gliwice.pl
Please, remove the .NOSPAM for e-mail replies.
Technical Details
Message-ID:
<35c81377.1195729@news.task.gda.pl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <35c81377.1195729@news.task.gda.pl> Subject: tin - a bug, or am I doing something wrong??? help needed. Date: Sat, 01 Aug 1998 00:00:00 +0000 From: rdylongr@zeus.polsl.gliwice.pl (Rafal Dylong) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 377037531 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@spamfilter.task.gda.pl X-Trace: korweta.task.gda.pl 902000305 6379 194.204.181.89 (1 Aug 1998 19:38:25 GMT) Organization: Silesian Technical University Mime-Version: 1.0 Reply-To: rdylongr@zeus.polsl.gliwice.pl NNTP-Posting-Date: 1 Aug 1998 19:38:25 GMT Newsgroups: news.software.readers