How do I run a shell command in a while loop?
I am running an IRC client in OpenBSD and I choose sic because with such short amount of lines it seems very audit-able for security as opposed to larger clients such as irssi.
I usually perform:
sic -h irc.freenode.net 2>&1 | tee -a irc.log
I'm trying to handle reconnects by running it in a while loop in the shell process and cat the initial commands into sic's stdin.
I would think to approach this by using a fifo (using the mkfifo(1) command) to redirect sic's stdin, but I'm not sure if there's a more elegant way to reconnect on ping timeouts, kills, servers going down, and just disconnects in general.
How do you suggest I go about doing this?
|Thread||Thread Starter||Forum||Replies||Last Post|
|Running a command as a different user w/o starting the login shell||Carpetsmoker||General software and network||4||1st July 2011 10:33 PM|
|DHCP client allows shell command injection||J65nko||News||0||7th April 2011 01:09 AM|
|Full disk encryption with Loop-AES||deviant085||OpenBSD Security||9||22nd November 2009 11:51 PM|
|Reboot loop on 7.0 upgraded to 7.1||EricM||FreeBSD Installation and Upgrading||3||25th March 2009 03:25 AM|
|ibm eserver x225 - 7.0 installation when btx halted / endless loop||underlig||FreeBSD Installation and Upgrading||3||3rd August 2008 02:19 PM|