remove dbgprint
full path to hbc
This commit is contained in:
@@ -6,13 +6,14 @@ import time, os, sys
|
||||
SLEEP=60
|
||||
SRV="colo2.wapanafa.org"
|
||||
DBG=0
|
||||
HBC="/home/andreas/bin/hbc"
|
||||
|
||||
IFS=[]
|
||||
f=os.popen('/sbin/ifconfig -a 2>/dev/null', 'r')
|
||||
for l in f.readlines():
|
||||
if len(l) > 1 and not l[0] in [' ','\t']:
|
||||
r=l.split()
|
||||
print r
|
||||
if DBG: print r
|
||||
if r[0][-1] == ':':
|
||||
r[0]=r[0][:-1]
|
||||
if r[0][:2] == 'lo':
|
||||
@@ -37,7 +38,7 @@ while 1:
|
||||
else:
|
||||
iaddr=r[1]
|
||||
if iaddr != addrs[I]:
|
||||
msg='hbc -m "ifadd %s %s" %s' % (I, iaddr, SRV)
|
||||
msg='%s -m "ifadd %s %s" %s' % (HBC, I, iaddr, SRV)
|
||||
if DBG: print msg
|
||||
else: os.system(msg)
|
||||
addrs[I]=iaddr
|
||||
|
||||
Reference in New Issue
Block a user