Mit default zusammenführen

This commit is contained in:
2018-09-06 13:25:25 +02:00
2 changed files with 32 additions and 1 deletions

27
debian/postinst vendored Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
PATH=/bin:/sbin:/usr/bin:/usr/sbin
case "$1" in
configure)
cat <<-END
======= Important RevPiPyLoad post-installation note =======
If you upgrade from pre 0.6.5 Version,you have to migrate to the
new config file format!!!
/etc/revpipyload/revpipyload.conf
READ:
DE: https://revpimodio.org/revpipyplc-auf-065/
EN: https://revpimodio.org/en/revpipyplc-to-064/
END
;;
esac
#DEBHELPER#
exit 0

View File

@@ -77,6 +77,8 @@ class RevPiPlc(Thread):
def _setuppopen(self):
"""Setzt UID und GID fuer das PLC Programm."""
proginit.logger.debug("enter RevPiPlc._setuppopen()")
proginit.logger.info(
"set uid {0} and gid {1} for plc program".format(
self.uid, self.gid)
@@ -84,6 +86,8 @@ class RevPiPlc(Thread):
os.setgid(self.gid)
os.setuid(self.uid)
proginit.logger.debug("leave RevPiPlc._setuppopen()")
def _spopen(self, lst_proc):
"""Startet das PLC Programm.
@param lst_proc Prozessliste
@@ -94,7 +98,7 @@ class RevPiPlc(Thread):
lst_proc,
preexec_fn=self._setuppopen,
cwd=os.path.dirname(self._program),
bufsize=1,
bufsize=0,
stdout=sysstdout if self._plw is None else self._plw.fdw,
stderr=subprocess.STDOUT
)