Convos
view release on metacpan or search on metacpan
lib/Convos/Manual/Running.pod view on Meta::CPAN
L</Hypnotoad> mode require the backend to be started as a separate process.
=head2 Init script
It's possible to generate init scripts for L<Convos> now. To do that, you can
run these commands:
for i in frontend backend; do
convos $i get_init_file > /etc/init.d/convos-$i
chmod +x /etc/init.d/convos-$i
update-rc.d convos-$i defaults
done
The backend and frontend can be supplied with environment variables from
C</etc/default/convos>. Example:
MOJO_CONFIG=/path/to/convos.conf
RUN_AS_USER=convos
RUN_AS_GROUP=nobody
t/init-script.t view on Meta::CPAN
sub get_init_file {
my $type = shift;
my $asset = Mojo::Asset::File->new;
open my $INIT_FILE, '-|', $convos => $type => 'get_init_file' or die $!;
$asset->add_chunk($_) while <$INIT_FILE>;
$asset;
}
sub run {
my $output = '';
chmod 0750, $_[0];
open my $CMD, '-|', @_ or die "@_: $!";
$output .= $_ while <$CMD>;
$output;
}
( run in 0.252 second using v1.01-cache-2.11-cpan-8d75d55dd25 )