aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerg <uinarf@autistici.org>2021-06-13 11:50:28 +0200
committererg <uinarf@autistici.org>2021-06-13 11:50:28 +0200
commit89390153e97182c5e786f3ce539bc187164986f2 (patch)
tree82fb2030e9c273375696395a91133f69af92ea83
parent28af1a9900488068fbf7bff5a550b5febbeee260 (diff)
downloadRPGH-89390153e97182c5e786f3ce539bc187164986f2.tar.gz
RPGH-89390153e97182c5e786f3ce539bc187164986f2.tar.bz2
RPGH-89390153e97182c5e786f3ce539bc187164986f2.zip
added settings_server.cfg and RPGH: an openrc service file
-rwxr-xr-xRPGH24
-rw-r--r--settings_server.cfg6
2 files changed, 30 insertions, 0 deletions
diff --git a/RPGH b/RPGH
new file mode 100755
index 0000000..e915233
--- /dev/null
+++ b/RPGH
@@ -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