From: Peng Li Date: Wed, 8 Mar 2017 13:51:02 +0000 (+0800) Subject: Rename scripts to bin X-Git-Url: http://47.100.26.94:8080/?a=commitdiff_plain;ds=sidebyside;h=13a31c5cdbb0bc24b8cd51776d32d73561294622;p=dotfiles.git Rename scripts to bin --- diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..3d9c7fa --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,2 @@ +jabber.log* +*.log \ No newline at end of file diff --git a/bin/README.md b/bin/README.md new file mode 100644 index 0000000..1ad3795 --- /dev/null +++ b/bin/README.md @@ -0,0 +1,3 @@ +The files under this folder are the scripts (most are perl scripts) for command line. + +link it to ~/.bin and add ~/.bin into PATH diff --git a/bin/change_dylib_path.pl b/bin/change_dylib_path.pl new file mode 100755 index 0000000..5ab2c9d --- /dev/null +++ b/bin/change_dylib_path.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl -w +# +use strict; +#use v5.10; + +my @cpve_libs = ( 'libpme.0.dylib', 'libpmexy.1.dylib', 'libpmpxy.1.dylib', 'libtaf.0.dylib', 'libtafxy.1.dylib','libsrtp.dylib' ); + +my @lib_to_change = ( 'libxml2.2.dylib', 'libssl.dylib', 'libcrypto.dylib' ); + +for my $ff (@cpve_libs){ + !system '/usr/bin/install_name_tool -change @executable_path/../Frameworks/' . $_ . ' @executable_path/' . $_ . ' ./' . $ff or die "$!" for @lib_to_change; +} + +print "==DONE==" . "\n"; + diff --git a/bin/cpve_linux.pl b/bin/cpve_linux.pl new file mode 100755 index 0000000..d88fca1 --- /dev/null +++ b/bin/cpve_linux.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl -w +# +use strict; +#use Net::SSH::Perl; + +my $diff_file = "temp.diff"; +my $remote_machine = 'cpvedev@cpvedev'; + +!system "svn diff > $diff_file" or die "$!"; +!system 'scp ' . $diff_file . ' cpvedev@cpvedev:cpve_trunk/' or die "$!"; +my $remote_cmd = '' +!system "ssh -l cpvedev cpvedev \'cd ~/cpve_trunk && svn revert -R . && patch -p0 < temp.diff\'" or die "$!"; diff --git a/bin/cpve_log.pl b/bin/cpve_log.pl new file mode 100755 index 0000000..cb8979d --- /dev/null +++ b/bin/cpve_log.pl @@ -0,0 +1,64 @@ +#!/usr/bin/perl -w +# +use strict; +use warnings; +use v5.10; ## say + +#my $log_file = @ARGV[0]; +# +# TODO: +# 1. append cpve version to the file name of full log +# 2. output critical error of CPVE/PME such as "camera" camera error +# 3. split the full log as sub logs against the call time +# 4. plot the RTP stats + +my $k_start_call = 'originateCall|answercall'; +#my $k_start_call = 'originateCall'; + +# create jabber_full.log to add jabber.log, jabber.log.1, jabber.log.2 +my $out_dir = `pwd` . '/out/'; +my @logs = glob "jabber.log*"; +my $full_logs = "$out_dir/jabber_full.log"; + +#my $cpve_version; + +#foreach (@logs) { say; } +#say @logs; +#print @logs; + +#print for (reverse @logs); + +##open LOGS, ">>$full_logs" or die "$!"; +##for (reverse @logs){ +## open SUB_LOG, "<", $_ or die "$!"; +## print LOGS while() ; +## close SUB_LOG; +##} +##close LOGS; +## +##for (reverse @logs){ +## !system "cat $_ >> $full_logs" or die "$!"; +##} + +## merge log files +!system "cat $_ >> $full_logs" or die "$!" for reverse @logs; + +my $version= + +print "===== write done ====\n"; +## split file with each call +my $call = "call0.log"; + +open CALL, ">> $call" or die "$!"; +open LOG, "<", $full_logs or die "$!"; +my $index = 0; +while(){ +## print CALL $_; +## last if /originateCall/; + if ($_ =~ /originateCall/ ){ + close + $index = $index+1; + open LOG, ">>" "call$index" or die "$!"; + print LOG $_; + } +} diff --git a/bin/emacs_toggle.applescript b/bin/emacs_toggle.applescript new file mode 100644 index 0000000..7870b6d --- /dev/null +++ b/bin/emacs_toggle.applescript @@ -0,0 +1,53 @@ + +## this scirpt works together with Quicksilver +## copy/link this file to ~/Library/Application Support/Quicksilver/Action +## and set a toggle event on Quicksilver preference +# +## http://brettterpstra.com/2011/01/22/quick-tip-applescript-application-toggle/ +# +# +#Version 1.0 toggle emacs front + +set appName to "Emacs" +set startIt to false +tell application "System Events" + if not (exists process appName) then + set startIt to true + else if frontmost of process appName then + set visible of process appName to false + else + set frontmost of process appName to true + end if +end tell +if startIt then + tell application appName to activate +end if + +## version 2.0 - using emacs daemon and client +##set appName to "Emacs" +##set startIt to false +##tell application "System Events" +## try +## -- we look for <= 2 because Emacs --daemon seems to always have an entry in visibile-frame-list even if there isn't +## set frameVisible to do shell script "/usr/local/bin/emacsclient -e '(<= 2 (length (visible-frame-list)))'" +## if frameVisible is not "t" then +## -- there is a not a visible frame, launch one +## do shell script "/usr/local/bin/emacsclient -c -n" +## set startIt to true +## else if frontmost of process "Emacs" then +## set visible of process "Emacs" to false +## else +## set frontmost of process "Emacs" to true +## end if +## on error +## -- daemon is not running, start the daemon and open a frame +## do shell script "/usr/local/bin/emacs --daemon" +## do shell script "/usr/local/bin/emacsclient -c -n" +## set startIt to true +## end try +##end tell +## +##-- bring the visible frame to the front +##if startIt then +## tell application "Emacs" to activate +##end if diff --git a/bin/remote_build.sh b/bin/remote_build.sh new file mode 100755 index 0000000..149ac71 --- /dev/null +++ b/bin/remote_build.sh @@ -0,0 +1,12 @@ +#/bin/bash + +svn diff > temp.diff +scp temp.diff cpvedev@cpvedev:cpve_trunk/ + +ssh cpvedev@cpvedev 'cd ~/cpve_trunk && \ + svn revert -R . && \ + patch -p0 < temp.diff &&\ + scons arch=arm platform=android debug=True -j4 androidndk=/opt/android-ndk' +scp cpvedev@cpvedev:cpve_trunk/target/run/Debug/acpvetest.apk ~/CPVE/cpve_trunk/temp/run/Release/ +scp cpvedev@cpvedev:cpve_trunk/target/run/Debug/run_monkey.sh ~/CPVE/cpve_trunk/temp/run/Release/ +#scp cpvedev@cpvedev:cpve_trunk/target/run/Debug/monkeytalk-runner.jar ~/CPVE/cpve_trunk/temp/run/Release/ diff --git a/bin/update_cpve.pl b/bin/update_cpve.pl new file mode 100755 index 0000000..ae17398 --- /dev/null +++ b/bin/update_cpve.pl @@ -0,0 +1,61 @@ +#!/usr/bin/perl -w + +use strict; + +use Getopt::Std; + +my %options = (); +getopts("n", \%options); +print "-n $options{n}\n" if defined $options{n}; + +my $ip = (split / /, `ifconfig | grep "inet .*broadcast"`)[1]; + +my $cpve_dir = '/Users/peli3-imac/CPVE/cpve_trunk/'; +my $ecc_dir = '/Users/peli3-imac/JCC/ecc-p2p-mac/'; + +my $ecc_mac_libs = "$ecc_dir/contrib/cpve/lib/darwin/x86_64"; +my $cpve_mac_libs = "$cpve_dir/target/dist/lib/darwin/x86_64"; + + +#### +if($options{n}) +{ + print "==== don't build CPVE ======\n"; +} +else +{ + ## building CPVE + chdir $cpve_dir or die ": $!"; + !system "scons arch=x86_64 platform=darwin debug=True -j16 osxversion=10.10" or die "building CPVE failed : $!"; + + ## remove old cpve libs and replace in ECC +# !system "rm -rf $ecc_dir/contrib/cpve/lib/darwin/x86_64/*" or die "remove libs failed : $!"; + !system "rm -rf $ecc_mac_libs/*" or die "remove libs failed : $!"; + + mkdir $ecc_mac_libs unless -e $ecc_mac_libs; + + !system "/bin/cp -r $cpve_mac_libs/* $ecc_mac_libs/" or die "copy libs failed: $!"; + +} + +#### building ecc +chdir $ecc_dir or die ": $!"; +!system "rm $ecc_dir/contrib/cpve/SConstruct" or die "$!" if -e "$ecc_dir/contrib/cpve/SConstruct"; +!system "python runSconsBuild.py JabberMac64Bit -j 16 -t no --early_cpve --nofetch" or die " building ECC failed : $!"; + +print "copy bin-s bin-c\n"; +!system "rm -rf bin-s/* bin-c/*" or die "$!"; +!system "/bin/cp -r $ecc_dir/out/bin/* $ecc_dir/bin-c" or die "$!"; +!system "/bin/cp -r $ecc_dir/out/bin/* $ecc_dir/bin-s" or die "$!"; + +print "copy config files\n"; +!system "/bin/cp $ecc_dir/sss.txt $ecc_dir/bin-s/cucm-credentials.txt" or die ": $!"; +!system "/bin/cp $ecc_dir/ccc.txt $ecc_dir/bin-c/cucm-credentials.txt" or die ": $!"; + +print "add p2p server ip\n"; +open CONF, ">>", "$ecc_dir/bin-c/cucm-credentials.txt" or die "error $!"; +print CONF "P2P_SERVER_IP=" . $ip . "\n"; +close CONF; + + +print "####### DONE #######\n"; diff --git a/bin/update_cpve_2.pl b/bin/update_cpve_2.pl new file mode 100755 index 0000000..e569c61 --- /dev/null +++ b/bin/update_cpve_2.pl @@ -0,0 +1,63 @@ +#!/usr/bin/perl -w + +use strict; + +use Getopt::Std; + +my %options = (); +getopts("n", \%options); +print "-n $options{n}\n" if defined $options{n}; + +my $ip = (split / /, `ifconfig | grep "inet .*broadcast"`)[1]; + +my $cpve_dir = '/Users/peli3-imac/CPVE/cpve_trunk/'; +my $ecc_dir = '/Users/peli3-imac/JCC/ecc-p2p-mac/'; + + +#### +if($options{n}) +{ + print "==== don't build CPVE ======\n"; +} +else +{ + ## building CPVE + chdir $cpve_dir or die ": $!"; + !system "scons arch=x86_64 platform=darwin debug=True -j16 osxversion=10.10" or die "building CPVE failed : $!"; + + ## remove old cpve libs and replace in ECC +#### chdir $ecc_dir or die ": $!"; + !system "rm -rf $ecc_dir/contrib/cpve/lib/darwin/x86_64/*" or die "remove libs failed : $!"; + + !system "/bin/cp -r $cpve_dir/cpve_trunk/target/dist/lib/darwin/x86_64/* $ecc_dir/contrib/cpve/lib/darwin/x86_64/" or die "copy libs failed: $!"; + +} + +#### building ecc +chdir $ecc_dir or die ": $!"; +!system "python runSconsBuild.py JabberMac64Bit -j 16 -t no --early_cpve" or die " building ECC failed : $!"; + +print "copy bin-s bin-c\n"; +###system "rm -rf bin-s binn-c"; +!system "/bin/cp -r $ecc_dir/out/bin $ecc_dir/bin-c" or die "$!"; +!system "/bin/cp -r $ecc_dir/out/bin $ecc_dir/bin-s" or die "$!"; + +print "copy config files\n"; +!system "/bin/cp $ecc_dir/sss.txt $ecc_dir/bin-s/cucm-credentials.txt" or die ": $!"; +!system "/bin/cp $ecc_dir/ccc.txt $ecc_dir/bin-c/cucm-credentials.txt" or die ": $!"; + +print "add p2p server ip\n"; +open CONF, ">>", "$ecc_dir/bin-c/cucm-credentials.txt" or die "error $!"; +print CONF "P2P_SERVER_IP=" . $ip . "\n"; +close CONF; + + +print "####### DONE #######\n"; + +#sub get_local_ip{ +# my @cc = (split / /, `ifconfig | grep "inet .*broadcast"`)[1]; +## @cc[1]; ## return value +## return @cc[1]; +#} + +#print CONF "P2P_SERVER_IP=" . &get_local_ip . "\n"; diff --git a/scripts/.gitignore b/scripts/.gitignore deleted file mode 100644 index 3d9c7fa..0000000 --- a/scripts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -jabber.log* -*.log \ No newline at end of file diff --git a/scripts/change_dylib_path.pl b/scripts/change_dylib_path.pl deleted file mode 100755 index 5ab2c9d..0000000 --- a/scripts/change_dylib_path.pl +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/perl -w -# -use strict; -#use v5.10; - -my @cpve_libs = ( 'libpme.0.dylib', 'libpmexy.1.dylib', 'libpmpxy.1.dylib', 'libtaf.0.dylib', 'libtafxy.1.dylib','libsrtp.dylib' ); - -my @lib_to_change = ( 'libxml2.2.dylib', 'libssl.dylib', 'libcrypto.dylib' ); - -for my $ff (@cpve_libs){ - !system '/usr/bin/install_name_tool -change @executable_path/../Frameworks/' . $_ . ' @executable_path/' . $_ . ' ./' . $ff or die "$!" for @lib_to_change; -} - -print "==DONE==" . "\n"; - diff --git a/scripts/cpve_linux.pl b/scripts/cpve_linux.pl deleted file mode 100755 index d88fca1..0000000 --- a/scripts/cpve_linux.pl +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/perl -w -# -use strict; -#use Net::SSH::Perl; - -my $diff_file = "temp.diff"; -my $remote_machine = 'cpvedev@cpvedev'; - -!system "svn diff > $diff_file" or die "$!"; -!system 'scp ' . $diff_file . ' cpvedev@cpvedev:cpve_trunk/' or die "$!"; -my $remote_cmd = '' -!system "ssh -l cpvedev cpvedev \'cd ~/cpve_trunk && svn revert -R . && patch -p0 < temp.diff\'" or die "$!"; diff --git a/scripts/cpve_log.pl b/scripts/cpve_log.pl deleted file mode 100755 index cb8979d..0000000 --- a/scripts/cpve_log.pl +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/perl -w -# -use strict; -use warnings; -use v5.10; ## say - -#my $log_file = @ARGV[0]; -# -# TODO: -# 1. append cpve version to the file name of full log -# 2. output critical error of CPVE/PME such as "camera" camera error -# 3. split the full log as sub logs against the call time -# 4. plot the RTP stats - -my $k_start_call = 'originateCall|answercall'; -#my $k_start_call = 'originateCall'; - -# create jabber_full.log to add jabber.log, jabber.log.1, jabber.log.2 -my $out_dir = `pwd` . '/out/'; -my @logs = glob "jabber.log*"; -my $full_logs = "$out_dir/jabber_full.log"; - -#my $cpve_version; - -#foreach (@logs) { say; } -#say @logs; -#print @logs; - -#print for (reverse @logs); - -##open LOGS, ">>$full_logs" or die "$!"; -##for (reverse @logs){ -## open SUB_LOG, "<", $_ or die "$!"; -## print LOGS while() ; -## close SUB_LOG; -##} -##close LOGS; -## -##for (reverse @logs){ -## !system "cat $_ >> $full_logs" or die "$!"; -##} - -## merge log files -!system "cat $_ >> $full_logs" or die "$!" for reverse @logs; - -my $version= - -print "===== write done ====\n"; -## split file with each call -my $call = "call0.log"; - -open CALL, ">> $call" or die "$!"; -open LOG, "<", $full_logs or die "$!"; -my $index = 0; -while(){ -## print CALL $_; -## last if /originateCall/; - if ($_ =~ /originateCall/ ){ - close - $index = $index+1; - open LOG, ">>" "call$index" or die "$!"; - print LOG $_; - } -} diff --git a/scripts/emacs_toggle.applescript b/scripts/emacs_toggle.applescript deleted file mode 100644 index 7870b6d..0000000 --- a/scripts/emacs_toggle.applescript +++ /dev/null @@ -1,53 +0,0 @@ - -## this scirpt works together with Quicksilver -## copy/link this file to ~/Library/Application Support/Quicksilver/Action -## and set a toggle event on Quicksilver preference -# -## http://brettterpstra.com/2011/01/22/quick-tip-applescript-application-toggle/ -# -# -#Version 1.0 toggle emacs front - -set appName to "Emacs" -set startIt to false -tell application "System Events" - if not (exists process appName) then - set startIt to true - else if frontmost of process appName then - set visible of process appName to false - else - set frontmost of process appName to true - end if -end tell -if startIt then - tell application appName to activate -end if - -## version 2.0 - using emacs daemon and client -##set appName to "Emacs" -##set startIt to false -##tell application "System Events" -## try -## -- we look for <= 2 because Emacs --daemon seems to always have an entry in visibile-frame-list even if there isn't -## set frameVisible to do shell script "/usr/local/bin/emacsclient -e '(<= 2 (length (visible-frame-list)))'" -## if frameVisible is not "t" then -## -- there is a not a visible frame, launch one -## do shell script "/usr/local/bin/emacsclient -c -n" -## set startIt to true -## else if frontmost of process "Emacs" then -## set visible of process "Emacs" to false -## else -## set frontmost of process "Emacs" to true -## end if -## on error -## -- daemon is not running, start the daemon and open a frame -## do shell script "/usr/local/bin/emacs --daemon" -## do shell script "/usr/local/bin/emacsclient -c -n" -## set startIt to true -## end try -##end tell -## -##-- bring the visible frame to the front -##if startIt then -## tell application "Emacs" to activate -##end if diff --git a/scripts/remote_build.sh b/scripts/remote_build.sh deleted file mode 100755 index 149ac71..0000000 --- a/scripts/remote_build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#/bin/bash - -svn diff > temp.diff -scp temp.diff cpvedev@cpvedev:cpve_trunk/ - -ssh cpvedev@cpvedev 'cd ~/cpve_trunk && \ - svn revert -R . && \ - patch -p0 < temp.diff &&\ - scons arch=arm platform=android debug=True -j4 androidndk=/opt/android-ndk' -scp cpvedev@cpvedev:cpve_trunk/target/run/Debug/acpvetest.apk ~/CPVE/cpve_trunk/temp/run/Release/ -scp cpvedev@cpvedev:cpve_trunk/target/run/Debug/run_monkey.sh ~/CPVE/cpve_trunk/temp/run/Release/ -#scp cpvedev@cpvedev:cpve_trunk/target/run/Debug/monkeytalk-runner.jar ~/CPVE/cpve_trunk/temp/run/Release/ diff --git a/scripts/update_cpve.pl b/scripts/update_cpve.pl deleted file mode 100755 index ae17398..0000000 --- a/scripts/update_cpve.pl +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl -w - -use strict; - -use Getopt::Std; - -my %options = (); -getopts("n", \%options); -print "-n $options{n}\n" if defined $options{n}; - -my $ip = (split / /, `ifconfig | grep "inet .*broadcast"`)[1]; - -my $cpve_dir = '/Users/peli3-imac/CPVE/cpve_trunk/'; -my $ecc_dir = '/Users/peli3-imac/JCC/ecc-p2p-mac/'; - -my $ecc_mac_libs = "$ecc_dir/contrib/cpve/lib/darwin/x86_64"; -my $cpve_mac_libs = "$cpve_dir/target/dist/lib/darwin/x86_64"; - - -#### -if($options{n}) -{ - print "==== don't build CPVE ======\n"; -} -else -{ - ## building CPVE - chdir $cpve_dir or die ": $!"; - !system "scons arch=x86_64 platform=darwin debug=True -j16 osxversion=10.10" or die "building CPVE failed : $!"; - - ## remove old cpve libs and replace in ECC -# !system "rm -rf $ecc_dir/contrib/cpve/lib/darwin/x86_64/*" or die "remove libs failed : $!"; - !system "rm -rf $ecc_mac_libs/*" or die "remove libs failed : $!"; - - mkdir $ecc_mac_libs unless -e $ecc_mac_libs; - - !system "/bin/cp -r $cpve_mac_libs/* $ecc_mac_libs/" or die "copy libs failed: $!"; - -} - -#### building ecc -chdir $ecc_dir or die ": $!"; -!system "rm $ecc_dir/contrib/cpve/SConstruct" or die "$!" if -e "$ecc_dir/contrib/cpve/SConstruct"; -!system "python runSconsBuild.py JabberMac64Bit -j 16 -t no --early_cpve --nofetch" or die " building ECC failed : $!"; - -print "copy bin-s bin-c\n"; -!system "rm -rf bin-s/* bin-c/*" or die "$!"; -!system "/bin/cp -r $ecc_dir/out/bin/* $ecc_dir/bin-c" or die "$!"; -!system "/bin/cp -r $ecc_dir/out/bin/* $ecc_dir/bin-s" or die "$!"; - -print "copy config files\n"; -!system "/bin/cp $ecc_dir/sss.txt $ecc_dir/bin-s/cucm-credentials.txt" or die ": $!"; -!system "/bin/cp $ecc_dir/ccc.txt $ecc_dir/bin-c/cucm-credentials.txt" or die ": $!"; - -print "add p2p server ip\n"; -open CONF, ">>", "$ecc_dir/bin-c/cucm-credentials.txt" or die "error $!"; -print CONF "P2P_SERVER_IP=" . $ip . "\n"; -close CONF; - - -print "####### DONE #######\n"; diff --git a/scripts/update_cpve_2.pl b/scripts/update_cpve_2.pl deleted file mode 100755 index e569c61..0000000 --- a/scripts/update_cpve_2.pl +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/perl -w - -use strict; - -use Getopt::Std; - -my %options = (); -getopts("n", \%options); -print "-n $options{n}\n" if defined $options{n}; - -my $ip = (split / /, `ifconfig | grep "inet .*broadcast"`)[1]; - -my $cpve_dir = '/Users/peli3-imac/CPVE/cpve_trunk/'; -my $ecc_dir = '/Users/peli3-imac/JCC/ecc-p2p-mac/'; - - -#### -if($options{n}) -{ - print "==== don't build CPVE ======\n"; -} -else -{ - ## building CPVE - chdir $cpve_dir or die ": $!"; - !system "scons arch=x86_64 platform=darwin debug=True -j16 osxversion=10.10" or die "building CPVE failed : $!"; - - ## remove old cpve libs and replace in ECC -#### chdir $ecc_dir or die ": $!"; - !system "rm -rf $ecc_dir/contrib/cpve/lib/darwin/x86_64/*" or die "remove libs failed : $!"; - - !system "/bin/cp -r $cpve_dir/cpve_trunk/target/dist/lib/darwin/x86_64/* $ecc_dir/contrib/cpve/lib/darwin/x86_64/" or die "copy libs failed: $!"; - -} - -#### building ecc -chdir $ecc_dir or die ": $!"; -!system "python runSconsBuild.py JabberMac64Bit -j 16 -t no --early_cpve" or die " building ECC failed : $!"; - -print "copy bin-s bin-c\n"; -###system "rm -rf bin-s binn-c"; -!system "/bin/cp -r $ecc_dir/out/bin $ecc_dir/bin-c" or die "$!"; -!system "/bin/cp -r $ecc_dir/out/bin $ecc_dir/bin-s" or die "$!"; - -print "copy config files\n"; -!system "/bin/cp $ecc_dir/sss.txt $ecc_dir/bin-s/cucm-credentials.txt" or die ": $!"; -!system "/bin/cp $ecc_dir/ccc.txt $ecc_dir/bin-c/cucm-credentials.txt" or die ": $!"; - -print "add p2p server ip\n"; -open CONF, ">>", "$ecc_dir/bin-c/cucm-credentials.txt" or die "error $!"; -print CONF "P2P_SERVER_IP=" . $ip . "\n"; -close CONF; - - -print "####### DONE #######\n"; - -#sub get_local_ip{ -# my @cc = (split / /, `ifconfig | grep "inet .*broadcast"`)[1]; -## @cc[1]; ## return value -## return @cc[1]; -#} - -#print CONF "P2P_SERVER_IP=" . &get_local_ip . "\n";