summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2005-09-06 17:41:26 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2005-09-06 17:41:26 +0000
commitafda8873baf0ae1f7c90f8e8fea0c4dcaa836aeb (patch)
tree81d09ae6a048da3fbee1f8d417b8e3eba14781cb /src
parent619297646188564dbf2cf7925bd5cee4e946773d (diff)
* fix scripts
* don't prepend / if path already contains one * fix a bug that prevents executing scripts git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@10 3be567f1-68ff-0310-b24a-ad7cc433fd2f
Diffstat (limited to 'src')
-rwxr-xr-xsrc/service-discovery-applet.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/service-discovery-applet.in b/src/service-discovery-applet.in
index 5e076fc..7d56e35 100755
--- a/src/service-discovery-applet.in
+++ b/src/service-discovery-applet.in
@@ -80,8 +80,9 @@ def siocgifname(interface):
def service_resolved(interface, protocol, name, type, domain, host, aprotocol, address, port, txt):
print "Service data for service '%s' of type '%s' in domain '%s' on %s.%i:" % (name, type, domain, siocgifname(interface), protocol)
print "\tHost %s (%s), port %i, TXT data: %s" % (host, address, port, avahi.txt_array_to_string_array(txt))
- if os.path.exists("@scriptsdir@/%s.sh"):
+ if os.path.exists("@scriptsdir@/%s.sh" % type):
cmd = '@scriptsdir@/%s.sh "%s" %s %s %i "%s"' % (type, name, host, address, port," ".join(avahi.txt_array_to_string_array(txt)))
+ print cmd
os.system(cmd)
# if type == "_http._tcp":
#