projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rsync Mikey & Kent
[clearscm.git]
/
clearadm
/
processrunning.pl
diff --git
a/clearadm/processrunning.pl
b/clearadm/processrunning.pl
index
c5a2a4f
..
cca1d7c
100755
(executable)
--- a/
clearadm/processrunning.pl
+++ b/
clearadm/processrunning.pl
@@
-64,7
+64,7
@@
use Utils;
my $VERSION = '$Revision: 1.2 $';
($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
my $VERSION = '$Revision: 1.2 $';
($VERSION) = ($VERSION =~ /\$Revision: (.*) /);
-sub restart
($) {
\r
+sub restart($) {
\r
my ($restart) = @_;
my ($status, @output) = Execute "$restart 2>&1";
my ($restart) = @_;
my ($status, @output) = Execute "$restart 2>&1";
@@
-72,11
+72,11
@@
sub restart ($) {
unless ($status) {
display "Successfully executed restart option: $restart";
unless ($status) {
display "Successfully executed restart option: $restart";
- display $_ for
each
(@output);
+ display $_ for (@output);
} else {
display "Unable to restart process using $restart (Status: $status)";
} else {
display "Unable to restart process using $restart (Status: $status)";
- display $_ for
each
(@output);
+ display $_ for (@output);
} # unless
return $status;
} # unless
return $status;
@@
-122,19
+122,15
@@
unless ($status) {
. join ("\n", @output), $status;
} # if
. join ("\n", @output), $status;
} # if
-foreach (@output) {
- next
- if /grep -i '$name'/;
-
- next
- if /grep -i $name/;
-
- next
- if /$FindBin::Script/;
+for (@output) {
+ next if /grep -i '$name'/;
+ next if /grep -i $name/;
+ next if /$FindBin::Script/;
display "Found processes named $name";
display "Found processes named $name";
+
exit 0;
exit 0;
-} # for
each
+} # for
display "Did not find any processes named $name";
display "Did not find any processes named $name";