summaryrefslogtreecommitdiffstats
path: root/abs/core/supplemental-web/notify.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-12-07 19:40:39 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-12-07 19:40:39 (GMT)
commitf441710103513f9621672152b889bfda7f50f064 (patch)
treeacbcec242d3444383c46162dd27d964c1eeac9e4 /abs/core/supplemental-web/notify.py
parentf57e609997d91dbdfaa2e18b1e6e7e95876831bc (diff)
downloadlinhes_pkgbuild-f441710103513f9621672152b889bfda7f50f064.zip
linhes_pkgbuild-f441710103513f9621672152b889bfda7f50f064.tar.gz
linhes_pkgbuild-f441710103513f9621672152b889bfda7f50f064.tar.bz2
tilda, wmaker e16 settings: move /reneame to their proper place in the tree.
Diffstat (limited to 'abs/core/supplemental-web/notify.py')
-rw-r--r--abs/core/supplemental-web/notify.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/core/supplemental-web/notify.py b/abs/core/supplemental-web/notify.py
new file mode 100644
index 0000000..2e520c5
--- /dev/null
+++ b/abs/core/supplemental-web/notify.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+# import MySQL module
+
+import MySQLdb
+import sys
+import getopt
+import socket
+import os
+
+def main(argv):
+ db = MySQLdb.connect(host="localhost", user="mythtv", passwd="mythtv", db="mythconverg")
+ # create a cursor
+ cursor = db.cursor()
+ # execute SQL statement
+ cursor.execute("SELECT DISTINCT(hostname) from settings where not hostname is NULL")
+ result = cursor.fetchall()
+ message = sys.argv[2]
+ messagetype = sys.argv[1]
+ port=str(5000)
+ if messagetype == "PH2":
+ port=str(5001)
+
+
+ message = message + " :::" + messagetype
+ for row in result:
+ os.system("/usr/bin/osdClient.pl " + row[0] + " " + port + " "+ "\"" + message + "\"" + "&" )
+
+if __name__ == "__main__":
+ main(sys.argv[1:])