diff options
-rwxr-xr-x | RPGH | 24 | ||||
-rw-r--r-- | settings_server.cfg | 6 |
2 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="RPGH daemon" +description="Runs monitoring daemon on sensors, saves to files." +command=/home/pipi/.local/bin/RPGH_starter.sh +command_args="${RPGH_args}" +pidfile=/var/run/RPGH_starter.pid + +depend() { + need pigpiod + +} +start() { + ebegin "Starting RPGH daemon" + start-stop-daemon -u pipi:pipi --start --exec /usr/bin/python --background --make-pidfile --pidfile /var/run/RPGH_starter.pid /var/git/RPGH_repo/monitor_unified.py + eend $? +} +stop() { + ebegin "Stopping RPGH daemon" + start-stop-daemon --stop --signal 15 --exec /var/git/RPGH_repo/monitor_unified.py --pidfile /var/run/RPGH_starter.pid --stop + eend $? +} diff --git a/settings_server.cfg b/settings_server.cfg new file mode 100644 index 0000000..b109890 --- /dev/null +++ b/settings_server.cfg @@ -0,0 +1,6 @@ +[mysql] +host = localhost +user = vlad +password = hoP-Topapo +unix_socket = /var/run/mysqld/mysqld.sock +database = tescik |