mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 15:13:52 +01:00
Add default files for installation or packaging.
This commit is contained in:
4
data/etc/default/revpipyload
Normal file
4
data/etc/default/revpipyload
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Additional options that are passed to revpipyloadd.
|
||||||
|
# add -v or -vv for verbose logging
|
||||||
|
|
||||||
|
DAEMON_OPTS=""
|
||||||
15
data/etc/logrotate.d/revpipyload
Normal file
15
data/etc/logrotate.d/revpipyload
Normal 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
|
||||||
|
}
|
||||||
13
data/lib/systemd/revpipyload.service
Normal file
13
data/lib/systemd/revpipyload.service
Normal 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
|
||||||
@@ -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
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -d /usr/local/share/revpipyload ]
|
# This will call the entry point of the python package, if it is installed
|
||||||
then
|
# in /usr/share/revpipyload. Put this to your bin directory, which is in
|
||||||
exec "/usr/local/share/revpipyload/secure_installation.py" "$@"
|
# the PATH value
|
||||||
else
|
|
||||||
exec "/usr/share/revpipyload/secure_installation.py" "$@"
|
exec "/usr/share/revpipyload/secure_installation" "$@"
|
||||||
fi
|
|
||||||
|
|||||||
6
data/revpipyloadd
Executable file
6
data/revpipyloadd
Executable 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" "$@"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"""Helperfunktionen fuer das gesamte RevPiPyLoad-System."""
|
"""Helperfunktionen fuer das gesamte RevPiPyLoad-System."""
|
||||||
__author__ = "Sven Sager"
|
__author__ = "Sven Sager"
|
||||||
__copyright__ = "Copyright (C) 2023 Sven Sager"
|
__copyright__ = "Copyright (C) 2023 Sven Sager"
|
||||||
__license__ = "GPLv3"
|
__license__ = "GPLv2"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from fcntl import ioctl
|
from fcntl import ioctl
|
||||||
|
|||||||
Reference in New Issue
Block a user