Changeset 11734 for lang/perl/Punc
- Timestamp:
- 05/17/08 14:22:06 (6 months ago)
- Location:
- lang/perl/Punc/trunk
- Files:
-
- 4 modified
-
. (modified) (1 prop)
-
Makefile.PL (modified) (1 diff)
-
bin/puncmasterd (modified) (2 diffs)
-
lib/Punc/Master/Daemon.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Punc/trunk
- Property svn:ignore
-
old new 1 1 META.yml 2 Makefile 2 3 Makefile.old 3 4 _Inline
-
- Property svn:ignore
-
lang/perl/Punc/trunk/Makefile.PL
r11104 r11734 21 21 Moose 22 22 MooseX::ClassAttribute 23 Class::ErrorHandler 23 24 /); 24 25 -
lang/perl/Punc/trunk/bin/puncmasterd
r10103 r11734 9 9 use Punc::Master::Daemon; 10 10 use Getopt::Long; 11 use Punc::ConfigLoader; 11 12 12 13 GetOptions( 13 '--port=i' => \my $port, 14 '--confdir=s' => \my $confdir, 14 '--port=i' => \my $port, 15 '--confdir=s' => \my $confdir, 16 '--autosign=s' => \my $autosign, 15 17 ); 16 18 … … 18 20 $confdir ||= "$FindBin::Bin/../etc"; 19 21 22 my $yaml = File::Spec->catfile($confdir, 'puncmasterd.yaml'); 23 24 my $conf = -f $yaml ? Punc::ConfigLoader->new->load($yaml) : {}; 25 $conf->{autosign} ||= $autosign; 26 20 27 my $daemon = Punc::Master::Daemon->new({ 21 28 port => $port, 22 29 confdir => $confdir, 23 30 context => Punc->new->context, 31 conf => $conf, 24 32 }); 25 33 -
lang/perl/Punc/trunk/lib/Punc/Master/Daemon.pm
r11518 r11734 86 86 $self->{ca}->save_csr($csr); 87 87 88 ### TODO: 自動署名 89 while ( 1 ) { 90 last if $self->{ca}->is_signed($csr); 91 sleep 1; 88 my $autosign = $self->{conf}->{autosign} || ''; 89 $autosign =~ s/\*/\.\*/g; 90 if ( $hostname =~ /$autosign/ ) { 91 $self->{ca}->sign($hostname); 92 } 93 else { 94 while ( 1 ) { 95 last if $self->{ca}->is_signed($csr); 96 sleep 1; 97 } 92 98 } 93 99
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)