2018-12-17 Fred Gleason <fredg@paravelsystems.com>

* Renamed the RD_RLM2_CLIENT_TCP_PORT define to RD_PAD_CLIENT_TCP_PORT.
	* Renamed the  RD_RLM_SOURCE_UNIX_ADDRESS define to
	 RD_PAD_SOURCE_UNIX_ADDRESS.
	* Added a RD_PYPAD_SCRIPT_DIR define.
	* Added an 'RDNotification::PypadType' value to the
	'RDNotification::Type' enumeration.
	* Added 'PypadOwner=' and 'PypadGroup=' directives to the
	'[Identity]' section of rd.conf(5).
	* Added an rdpadengined(8) service.
	* Added a 'PYPAD_INSTANCES.IS_RUNNING' field to the database.
	* Added a 'PYPAD_INSTANCES.EXIT_CODE' field to the database.
	* Added a 'PYPAD_INSTANCES.ERROR_TEXT' field to the database.
	* Incremented the database version to 304.
This commit is contained in:
Fred Gleason
2018-12-17 14:16:30 -05:00
parent 7a04111228
commit bc42ff435c
62 changed files with 1735 additions and 90 deletions

View File

@@ -21,7 +21,7 @@
## Use automake to process this into a Makefile.in
SUBDIRS = api\
examples\
scripts\
tests
CLEANFILES = *~\

View File

@@ -21,7 +21,9 @@
import configparser
import datetime
import MySQLdb
import signal
import socket
import sys
import json
#
@@ -774,6 +776,9 @@ class Receiver(object):
port - The TCP port to connect to. For most cases, just use
'PyPAD.PAD_TCP_PORT'.
"""
# So we exit cleanly when shutdown by rdpadengined(8)
signal.signal(signal.SIGTERM,SigHandler)
sock=socket.socket(socket.AF_INET)
conn=sock.connect((hostname,port))
c=bytes()
@@ -791,3 +796,5 @@ class Receiver(object):
line=bytes()
def SigHandler(signo,stack):
sys.exit(0)

View File

@@ -22,21 +22,18 @@
install-exec-am:
mkdir -p $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD
../../../helpers/install_python.sh now_and_next.py $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/now_and_next.py
../../../helpers/install_python.sh pypad_filewrite.py $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_filewrite.py
cp pypad_filewrite.exemplar $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_filewrite.exemplar
../../../helpers/install_python.sh pypad_udp.py $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_udp.py
cp pypad_udp.exemplar $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_udp.exemplar
uninstall-local:
rm -f $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/now_and_next.py
rm -f $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_filewrite.exemplar
rm -f $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_filewrite.py
rm -f $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_udp.exemplar
rm -f $(DESTDIR)$(prefix)/@RD_LIB_PATH@/rivendell/PyPAD/pypad_udp.py
EXTRA_DIST = now_and_next.py\
pypad_filewrite.exemplar\
EXTRA_DIST = pypad_filewrite.exemplar\
pypad_filewrite.py\
pypad_udp.exemplar\
pypad_udp.py

View File

@@ -50,9 +50,9 @@ def ProcessPad(update):
#
rcvr=PyPAD.Receiver()
try:
rcvr.setConfigFile(sys.argv[1])
rcvr.setConfigFile(sys.argv[3])
except IndexError:
eprint('pypad_filewrite.py: you must specify a configuration file')
sys.exit(1)
rcvr.setCallback(ProcessPad)
rcvr.start('localhost',PyPAD.PAD_TCP_PORT)
rcvr.start(sys.argv[1],int(sys.argv[2]))

View File

@@ -50,9 +50,9 @@ send_sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
rcvr=PyPAD.Receiver()
try:
rcvr.setConfigFile(sys.argv[1])
rcvr.setConfigFile(sys.argv[3])
except IndexError:
eprint('pypad_udp.py: you must specify a configuration file')
sys.exit(1)
rcvr.setCallback(ProcessPad)
rcvr.start("localhost",PyPAD.PAD_TCP_PORT)
rcvr.start(sys.argv[1],int(sys.argv[2]))

View File

@@ -20,7 +20,8 @@
##
## Use automake to process this into a Makefile.in
EXTRA_DIST = filepath_test.py
EXTRA_DIST = filepath_test.py\
now_and_next.py\
pad_test.py
CLEANFILES = *~\