MERVBot script

From ASSS Wiki
Revision as of 06:21, 6 March 2005 by Smong (talk | contribs) (a script for running mervbot in linux. taken from mgb forums.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#!/usr/bin/perl -w
#Zim: http://forums.minegoboom.com/viewtopic.php?p=34608#34608

use strict;
use warnings;

my $pid;

if ($pid = fork)
{
  #parent
}
else
{
die "CANNOT FORK!!\n" unless defined $pid;
open(STDIN, "/dev/tty1");  # get it a real tty for input
open(STDOUT, "/dev/null"); # suppress output
open(STDERR, "/dev/null"); # suppress output
{
  system("wineconsole /home/MERVBot/MERVBot.exe");
};
exit(1);
}