App-Munner
view release on metacpan or search on metacpan
+ Optionally using Process::Child::Leash to make sure the remain children processes are all terminated.
2015-01-18 - 0.57
+ Let user to set timeout to the process
2014-10-30 - 0.56
+ Use environment variable to override PID_FILE, ERROR_LOG and ACCESS_LOG
+ bugfix
2014-07-08 - 0.55
+ Set environment variable USER to chown the running process
+ Set environment variable PID_FILE to specify the pid file location as well as ACCESS_LOG and ERROR_LOG
+ Set environment variable TERMINAL to leave TTY / PTTY on at the background
2014-05-25 - 0.5
+ Added stop / start / restart / graceful etc...
2014-05-24 - 0.4
+ inject environment variables
+ can run at non stop mode either sleep or pause
+ start apps in a group
lib/App/Munner/Runner.pm view on Meta::CPAN
sub _set_file_permission {
my $self = shift;
my $file = shift
or die "FIXME: Missing file name";
die "FIXME: file is not found"
if !-f $file;
my $info = $self->sys_user_info;
my $uid = $info->{uid};
my $gid = $info->{gid};
chown $uid, $gid, $file
or die "Unable to chown $file\n";
chmod 0700, $file
or die "Unable to chown $file to 0700\n";
}
sub _touch {
my $self = shift;
my $file = shift;
open my $FH, ">>", $file
or die "Unable to touch file $file because $!\n";
print $FH q{};
close $FH;
$self->_set_file_permission($file);
( run in 0.460 second using v1.01-cache-2.11-cpan-71847e10f99 )