shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--logdir') {
+ if($ARGV[1]) {
+ $logdir = $ARGV[1];
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--srcdir') {
if($ARGV[1]) {
$srcdir = $ARGV[1];
$flags .= "--pidfile \"$pidfile\" ".
"--portfile \"$portfile\" ".
- "--logfile \"$logfile\" ";
+ "--logfile \"$logfile\" ".
+ "--logdir \"$logdir\" ";
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
$| = 1;
$flags .= "--verbose " if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--logdir \"$LOGDIR\" ";
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --proto $proto ";
$flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
$flags .= "--verbose " if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--logdir \"$LOGDIR\" ";
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --proto $proto ";
$flags .= "--certfile \"$certfile\" " if($certfile ne 'stunnel.pem');
$flags .= "--verbose " if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" ".
"--portfile \"$portfile\" ".
- "--logfile \"$logfile\" ";
+ "--logfile \"$logfile\" ".
+ "--logdir \"$LOGDIR\" ";
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
$flags .= "--verbose " if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" ".
"--portfile \"$portfile\" ".
- "--logfile \"$logfile\" ";
+ "--logfile \"$logfile\" ".
+ "--logdir \"$LOGDIR\" ";
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --port 0 --srcdir \"$srcdir\"";
$flags .= "--verbose " if($verb);
$flags .= "--debugprotocol " if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" ";
+ $flags .= "--logdir \"$LOGDIR\" ";
$flags .= "--id $idnum " if($idnum > 1);
$flags .= "--ipv$ipvnum --addr \"$ip\" ";
$flags .= "--user \"$USER\"";
" --port 0 ".
" --pidfile $pidfile".
" --portfile $portfile".
- " --config $FTPDCMD";
+ " --config $FTPDCMD".
+ " --logfile $logfile".
+ " --logdir $LOGDIR";
my ($sockspid, $pid2) = startnew($cmd, $pidfile, 30, 0);
if($sockspid <= 0 || !pidexists($sockspid)) {
if($is_unix) {
$cmd="server/socksd".exe_ext('SRV').
" --pidfile $pidfile".
+ " --reqfile $SOCKSIN".
+ " --logfile $logfile".
" --unix-socket $SOCKSUNIXPATH".
" --backend $HOSTIP".
" --config $FTPDCMD";
" --port 0 ".
" --pidfile $pidfile".
" --portfile $portfile".
+ " --reqfile $SOCKSIN".
+ " --logfile $logfile".
" --backend $HOSTIP".
" --config $FTPDCMD";
}
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--logdir') {
+ if($ARGV[1]) {
+ $logdir = "$path/". $ARGV[1];
+ shift @ARGV;
+ }
+ }
else {
print STDERR "\nWarning: secureserver.pl unknown parameter: $ARGV[0]\n";
}
$logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
}
-$conffile = "$path/${proto}_stunnel.conf";
+$conffile = "$logdir/${proto}_stunnel.conf";
$capath = abs_path($path);
$certfile = "$srcdir/". ($stuncert?"certs/$stuncert":"stunnel.pem");
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--logdir') {
+ if($ARGV[1]) {
+ $logdir = $ARGV[1];
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--srcdir') {
if($ARGV[1]) {
$srcdir = $ARGV[1];
$flags .= "--pidfile \"$pidfile\" ".
"--portfile \"$portfile\" ".
- "--logfile \"$logfile\" ";
+ "--logfile \"$logfile\" ".
+ "--logdir \"$logdir\" ";
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
$| = 1;