App-Munner
view release on metacpan or search on metacpan
sub _make_run_script {
my $app_name = shift;
my $command = shift
or die "$app_name is MISSING RUN COMMAND.";
my $filename = shift;
my $fh = shift;
print $fh "#!/bin/sh\n";
print $fh $command;
close $fh;
chmod 0700, $filename;
}
sub killer {
foreach my $app_name (@apps) {
my $app_config = $apps{$app_name};
my $pid = delete $app_config->{pid}
or next;
kill sig_num("INT"), $pid;
}
exit;
lib/App/Munner/Runner.pm view on Meta::CPAN
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;
( run in 0.341 second using v1.01-cache-2.11-cpan-496ff517765 )