Difference between revisions of "Rp"

From Organic Design wiki
(new "rp" which is in init.d)
m
Line 2: Line 2:
  
 
# kill currently running instances of peerd
 
# kill currently running instances of peerd
for ( split /\n/, qx( ps x|egrep \"husk[.]bin$\" ) ) {
+
for ( split /\n/, qx( ps x|egrep \"husk[.]bin$\" ) ) { # damn " never work :-(
 
qx( kill $1 ) if /^\s*([0-9]+).+?\d+:\d\d\s*(.+)/;
 
qx( kill $1 ) if /^\s*([0-9]+).+?\d+:\d\d\s*(.+)/;
 
}
 
}

Revision as of 11:17, 1 July 2006

  1. !/usr/bin/perl
  1. kill currently running instances of peerd

for ( split /\n/, qx( ps x|egrep \"husk[.]bin$\" ) ) { # damn " never work :-( qx( kill $1 ) if /^\s*([0-9]+).+?\d+:\d\d\s*(.+)/; }

  1. compile husk logging output

qx( date >> /home/peerd/peerd.log ); qx( gcc -o /home/peerd/husk.bin /home/peerd/husk.c 2>> /home/peerd/peerd.log ); exec '/home/peerd/husk.bin &';