Add default files for installation or packaging.

This commit is contained in:
2023-01-24 13:00:08 +01:00
parent 76349cf811
commit affa12712d
7 changed files with 44 additions and 14 deletions

View File

@@ -0,0 +1,4 @@
# Additional options that are passed to revpipyloadd.
# add -v or -vv for verbose logging
DAEMON_OPTS=""

View File

@@ -0,0 +1,15 @@
/var/log/revpipyload
/var/log/revpipyloadapp
{
rotate 6
weekly
maxsize 1M
compress
delaycompress
missingok
notifempty
sharedscripts
postrotate
/bin/kill -s USR1 `cat /var/run/revpipyload.pid` > /dev/null 2>&1 || true
endscript
}

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Python PLC services for Revolution Pi
After=network.target
[Service]
EnvironmentFile=-/etc/default/revpipyload
Type=forking
PIDFile=/var/run/revpipyload.pid
ExecStart=/usr/share/revpipyload/revpipyloadd -d $DAEMON_OPTS
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@@ -1,7 +0,0 @@
#!/bin/sh
if [ -d /usr/local/share/revpipyload ]
then
exec "/usr/local/share/revpipyload/revpipyload.py" "$@"
else
exec "/usr/share/revpipyload/revpipyload.py" "$@"
fi

View File

@@ -1,7 +1,6 @@
#!/bin/sh
if [ -d /usr/local/share/revpipyload ]
then
exec "/usr/local/share/revpipyload/secure_installation.py" "$@"
else
exec "/usr/share/revpipyload/secure_installation.py" "$@"
fi
# This will call the entry point of the python package, if it is installed
# in /usr/share/revpipyload. Put this to your bin directory, which is in
# the PATH value
exec "/usr/share/revpipyload/secure_installation" "$@"

6
data/revpipyloadd Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
# This will call the entry point of the python package, if it is installed
# in /usr/share/revpipyload. Put this to your bin directory, which is in
# the PATH value
exec "/usr/share/revpipyload/revpipyloadd" "$@"

View File

@@ -2,7 +2,7 @@
"""Helperfunktionen fuer das gesamte RevPiPyLoad-System."""
__author__ = "Sven Sager"
__copyright__ = "Copyright (C) 2023 Sven Sager"
__license__ = "GPLv3"
__license__ = "GPLv2"
import os
from fcntl import ioctl