Packages: added Perl package.
This commit is contained in:
12
pkg/rpm/rpmbuild/SOURCES/unit.example-perl-app
Normal file
12
pkg/rpm/rpmbuild/SOURCES/unit.example-perl-app
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
my $app = sub {
|
||||
my $env = shift;
|
||||
return [
|
||||
'200',
|
||||
[ 'Content-Type' => 'text/plain' ],
|
||||
[ "Hello from Unit, Perl $^V, environment:\n\n", Dumper($env) ],
|
||||
];
|
||||
};
|
||||
17
pkg/rpm/rpmbuild/SOURCES/unit.example-perl-config
Normal file
17
pkg/rpm/rpmbuild/SOURCES/unit.example-perl-config
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"applications": {
|
||||
"example_perl": {
|
||||
"type": "perl",
|
||||
"user": "nobody",
|
||||
"processes": 1,
|
||||
"working_directory": "/usr/share/doc/unit-perl/examples/perl-app",
|
||||
"script": "/usr/share/doc/unit-perl/examples/perl-app/index.pl"
|
||||
}
|
||||
},
|
||||
|
||||
"listeners": {
|
||||
"*:8600": {
|
||||
"application": "example_perl"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,14 @@
|
||||
"type": "go",
|
||||
"user": "nobody",
|
||||
"executable": "/tmp/go-app"
|
||||
},
|
||||
|
||||
"example_perl": {
|
||||
"type": "perl",
|
||||
"user": "nobody",
|
||||
"processes": 1,
|
||||
"working_directory": "/usr/share/doc/unit-perl/examples/perl-app",
|
||||
"script": "/usr/share/doc/unit-perl/examples/perl-app/index.pl"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -34,6 +42,10 @@
|
||||
|
||||
"*:8500": {
|
||||
"application": "example_go"
|
||||
},
|
||||
|
||||
"*:8600": {
|
||||
"application": "example_perl"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user