MERVBot script

From ASSS Wiki
Jump to: navigation, search

Below is a Perl script for running MERVBot under Wine on Linux.

#!/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);
}