Narada
view release on metacpan or search on metacpan
bin/narada-lock view on Meta::CPAN
#!/usr/bin/env perl
use 5.010001;
use warnings;
use strict;
use utf8;
our $VERSION = 'v2.3.8';
use FindBin;
use lib "$FindBin::Bin/../lib/perl5";
use Narada;
use Narada::Lock qw( shared_lock child_inherit_lock );
Narada::detect();
local @ARGV = @ARGV ? @ARGV : ('env', 'PS1=[SHARED] \u@\h \w \$ ', 'bash', '--norc');
shared_lock();
child_inherit_lock(1);
exec @ARGV;
__END__
=encoding utf8
=head1 NAME
narada-lock - run command under shared lock
=head1 VERSION
This document describes narada-lock version v2.3.8
=head1 USAGE
narada-lock [/path/to/commands param ...]
=head1 DESCRIPTION
Should be executed in project deploy directory (or Narada 1.x project root
directory).
Wrapper for running other processes (usually shell-script) with shared_lock().
When executed without params will run `bash --norc` with '[SHARED]' prefix
in $PS1.
Exit status of narada-lock will be same as exit status of executed command.
=head1 CONFIGURATION AND ENVIRONMENT
.lock
.lock.new
=head1 COMPATIBILITY
Narada 1.x project use C<var/.lock> instead of C<.lock>.
Narada 1.x project use C<var/.lock.new> instead of C<.lock.new>.
=head1 SUPPORT
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
at L<https://github.com/powerman/Narada/issues>.
You will be notified automatically of any progress on your issue.
=head2 Source Code
( run in 0.862 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )