version 1.3, 2005/03/25 03:13:45 |
version 1.6, 2005/04/07 00:00:31 |
|
|
} |
} |
StartTorrent($last_dir); |
StartTorrent($last_dir); |
|
|
sleep(90); |
sleep(300); |
|
|
StartTorrent('skip'); |
StartTorrent('skip'); |
|
|
|
|
return undef unless $dir; |
return undef unless $dir; |
|
|
if ($dir ne 'skip') { |
if ($dir ne 'skip') { |
$dir = "$BaseName/$dir"; |
$dir = $OBT->{BASENAME} . "/$dir"; |
|
} else { |
|
$dir = ''; |
} |
} |
|
|
# This actually needs to be a sub that forks off |
# This actually needs to be a sub that forks off |
# the generation of this, and the running of the update script. |
# the generation of this, and the running of the update script. |
print "MakeTorrents.pl $BaseName/$dir\n"; |
|
|
|
defined(my $pid = fork) or die "Can't fork: $!"; |
#defined(my $pid = fork) or die "Can't fork: $!"; |
|
|
return if $pid; |
#return if $pid; |
|
|
chdir $HomeDir or die "Can't chdir to $HomeDir: $!"; |
#chdir $HomeDir or die "Can't chdir to $HomeDir: $!"; |
|
|
setsid or die "Can't start a new session: $!"; |
#setsid or die "Can't start a new session: $!"; |
#open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; |
##open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; |
#open STDOUT, '>/dev/null' |
##open STDOUT, '>/dev/null' |
# or die "Can't write /dev/null: $!"; |
## or die "Can't write /dev/null: $!"; |
#open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; |
##open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; |
|
|
exec('/home/andrew/OpenBSDTorrents/regen.sh', "$dir"); |
print "Making torrents for $dir\n"; |
|
exec($OBT->{DIR_HOME} . '/regen.sh' . " $dir &"); |
|
#exec($HomeDir . '/regen.sh', "$dir"); |
} |
} |