Convos
view release on metacpan or search on metacpan
lib/Convos/Manual/Running.pod view on Meta::CPAN
$ convos help daemon
=head2 Separate backend
Starting up the backend separately is a big win, since it allows you to
upgrade and restart the frontend without tearing down the connections to the
IRC servers. There are two ways to start the backend, either in foreground
or fork to background:
# Start in foreground
$ convos backend -f
# Fork to background
$ convos backend start
After you have forked to background, you can investigate the status of
the process, stop or restart it:
$ convos backend status
$ convos backend stop
$ convos backend restart
=head2 Hypnotoad
L<Hypnotoad|http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad> is a full
featured, UNIX optimized, preforking non-blocking webserver. Using Hypnotoad
is what we suggest, since it can handle a lot more requests, than what
L</Single process mode> can offer. Starting with Hypnotoad can be done with
the following command:
$ convos frontend start
It is possible to L<hot reload|http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad#USR2>
the server, without losing any HTTP connections:
$ convos frontend reload
Like the L<backend|/Separate backend>, you can also investigate the status of
the process, stop or restart it:
$ convos frontend status
$ convos frontend stop
$ convos frontend restart
We strongly suggest starting with L<MOJO_CONFIG|Convos::Manual::Environment/MOJO_CONFIG>
set, so you can change the environment during L<hot reload|Mojo::Server::Hypnotoad/DESCRIPTION>.
This can also be set in L</Init script> environment.
$ MOJO_CONFIG=/path/to/config.pl convos frontend start
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
CONVOS_FRONTEND_PID_FILE=/var/run/convos-frontend.log
CONVOS_FRONTEND_LOGFILE=/var/log/convos/frontend.log
CONVOS_BACKEND_PID_FILE=/var/run/convos-backend.pid
CONVOS_BACKEND_LOGFILE=/var/log/convos/backend.log
CONVOS_REDIS_URL=redis://localhost:6397/1
Note: L<Hypnotoad> only reads these environment variables on start/restart,
and not on reload.
=head1 AUTHOR
Jan Henning Thorsen - C<jhthorsen@cpan.org>
=cut
( run in 0.867 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )