diff options
Diffstat (limited to '')
-rw-r--r-- | pkg/deb/debian.module/unit.example-perl-app | 12 | ||||
-rw-r--r-- | pkg/deb/debian.module/unit.example-perl-config | 17 | ||||
-rw-r--r-- | pkg/deb/debian/unit.example.config | 12 |
3 files changed, 41 insertions, 0 deletions
diff --git a/pkg/deb/debian.module/unit.example-perl-app b/pkg/deb/debian.module/unit.example-perl-app new file mode 100644 index 00000000..33be1d3e --- /dev/null +++ b/pkg/deb/debian.module/unit.example-perl-app @@ -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) ], + ]; +}; diff --git a/pkg/deb/debian.module/unit.example-perl-config b/pkg/deb/debian.module/unit.example-perl-config new file mode 100644 index 00000000..0329b78a --- /dev/null +++ b/pkg/deb/debian.module/unit.example-perl-config @@ -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" + } + } +} diff --git a/pkg/deb/debian/unit.example.config b/pkg/deb/debian/unit.example.config index 6dbae2b6..f3126457 100644 --- a/pkg/deb/debian/unit.example.config +++ b/pkg/deb/debian/unit.example.config @@ -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"
}
}
}
|