my $pidfile; # pid file
my $portfile; # port number file
my $logfile; # log file
+my $cmdfile; # command file
my $connect; # IP to connect to on CONNECT
my $srcdir;
my $gopher = 0;
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--config') {
+ if($ARGV[1]) {
+ $cmdfile = $ARGV[1];
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--logfile') {
if($ARGV[1]) {
$logfile = $ARGV[1];
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\" ".
+ "--cmdfile \"$cmdfile\" ".
"--logfile \"$logfile\" ".
+ "--logdir \"$logdir\" ".
"--portfile \"$portfile\" ";
$flags .= "--gopher " if($gopher);
$flags .= "--connect $connect " if($connect);
use Cwd 'abs_path';
use File::Basename;
-my $pidfile = "log/nghttpx.pid";
-my $logfile = "log/http2.log";
+my $logdir = "log";
+my $pidfile = "$logdir/nghttpx.pid";
+my $logfile = "$logdir/http2.log";
my $nghttpx = "nghttpx";
my $listenport = 9015;
my $listenport2 = 9016;
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--logdir') {
+ if($ARGV[1]) {
+ $logdir = $ARGV[1];
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--conf') {
if($ARGV[1]) {
$conf = $ARGV[1];
use Cwd 'abs_path';
use File::Basename;
-my $pidfile = "log/nghttpx.pid";
-my $logfile = "log/http3.log";
+my $logdir = "log";
+my $pidfile = "$logdir/nghttpx.pid";
+my $logfile = "$logdir/http3.log";
my $nghttpx = "nghttpx";
my $listenport = 9015;
my $connect = "127.0.0.1,8990";
shift @ARGV;
}
}
+ elsif($ARGV[0] eq '--logdir') {
+ if($ARGV[1]) {
+ $logdir = $ARGV[1];
+ shift @ARGV;
+ }
+ }
elsif($ARGV[0] eq '--conf') {
if($ARGV[1]) {
$conf = $ARGV[1];
$flags .= "--nghttpx \"$ENV{'NGHTTPX'}\" ";
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--logdir \"$LOGDIR\" ";
$flags .= "--connect $HOSTIP:" . protoport("http") . " ";
$flags .= $verbose_flag if($debugprotocol);
$flags .= "--nghttpx \"$ENV{'NGHTTPX'}\" ";
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--logdir \"$LOGDIR\" ";
$flags .= "--connect $HOSTIP:" . protoport("http") . " ";
$flags .= "--cert \"$cert\" " if($cert);
$flags .= $verbose_flag if($debugprotocol);
$flags .= "--connect $HOSTIP " if($alt eq "proxy");
$flags .= $verbose_flag if($debugprotocol);
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
+ $flags .= "--logdir \"$LOGDIR\" ";
$flags .= "--portfile $portfile ";
+ $flags .= "--config $FTPDCMD ";
$flags .= "--id $idnum " if($idnum > 1);
if($ipvnum eq "unix") {
$flags .= "--unix-socket '$port_or_path' ";