Lines 1-4
Link Here
|
1 |
#!/usr/bin/perl -t |
1 |
#!@GENTOO_PORTAGE_EPREFIX@/usr/bin/perl -t |
2 |
|
2 |
|
3 |
# ----------------------------------------------------------------------------- |
3 |
# ----------------------------------------------------------------------------- |
4 |
# |
4 |
# |
Lines 50-56
else {
Link Here
|
50 |
sub main { |
50 |
sub main { |
51 |
# - Parse config > |
51 |
# - Parse config > |
52 |
my %config = (); |
52 |
my %config = (); |
53 |
$config{'cfgfiledata'} = $pxs->getFileContents("/etc/pxs/portagexsd.conf"); |
53 |
$config{'cfgfiledata'} = $pxs->getFileContents("@GENTOO_PORTAGE_EPREFIX@/etc/pxs/portagexsd.conf"); |
54 |
$config{'Port'} = $pxs->getParamFromFile($config{'cfgfiledata'},"Port","lastseen"); |
54 |
$config{'Port'} = $pxs->getParamFromFile($config{'cfgfiledata'},"Port","lastseen"); |
55 |
$config{'SSLpasswd'} = $pxs->getParamFromFile($config{'cfgfiledata'},"SSLpasswd","lastseen"); |
55 |
$config{'SSLpasswd'} = $pxs->getParamFromFile($config{'cfgfiledata'},"SSLpasswd","lastseen"); |
56 |
$config{'PidFile'} = $pxs->getParamFromFile($config{'cfgfiledata'},"PidFile","lastseen"); |
56 |
$config{'PidFile'} = $pxs->getParamFromFile($config{'cfgfiledata'},"PidFile","lastseen"); |
Lines 60-66
sub main {
Link Here
|
60 |
$config{'cfgfiledata'} = undef; |
60 |
$config{'cfgfiledata'} = undef; |
61 |
|
61 |
|
62 |
if (!$config{'I_AM_ROOT_AND_I_KNOW_WHAT_I_AM_DOING'}) { |
62 |
if (!$config{'I_AM_ROOT_AND_I_KNOW_WHAT_I_AM_DOING'}) { |
63 |
syslog("info", 'Not starting server as it seems that you did not have a look at the configs yet! (/etc/pxs/portagexsd.conf)'); |
63 |
syslog("info", 'Not starting server as it seems that you did not have a look at the configs yet! (@GENTOO_PORTAGE_EPREFIX@/etc/pxs/portagexsd.conf)'); |
64 |
exit(0); |
64 |
exit(0); |
65 |
} |
65 |
} |
66 |
|
66 |
|
Lines 70-78
sub main {
Link Here
|
70 |
Reuse => 1, |
70 |
Reuse => 1, |
71 |
SSL_verify_mode => 0x01, |
71 |
SSL_verify_mode => 0x01, |
72 |
SSL_passwd_cb => sub {return $config{'SSLpasswd'}}, |
72 |
SSL_passwd_cb => sub {return $config{'SSLpasswd'}}, |
73 |
SSL_key_file => '/etc/pxs/certs/server-key.pem', |
73 |
SSL_key_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/server-key.pem', |
74 |
SSL_cert_file => '/etc/pxs/certs/server-cert.pem', |
74 |
SSL_cert_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/server-cert.pem', |
75 |
SSL_ca_file => '/etc/pxs/certs/my-ca.pem' |
75 |
SSL_ca_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/my-ca.pem' |
76 |
)) ) { |
76 |
)) ) { |
77 |
syslog("info", "Unable to create socket: ", &IO::Socket::SSL::errstr); |
77 |
syslog("info", "Unable to create socket: ", &IO::Socket::SSL::errstr); |
78 |
exit(0); |
78 |
exit(0); |