From 44fce5cb156176eefa877c4a0ba90c87a859c31d Mon Sep 17 00:00:00 2001 From: jtf Date: Fri, 27 Sep 2019 22:12:41 +0200 Subject: [PATCH] add gpio systemd service --- .gitignore | 5 ----- .../gpio-systemd-service/activate-gpio-out.sh | 8 ++++++++ .../gpio-systemd-service/activategpio.service | 8 ++++++++ .../gpio-systemd-service/ttyoutput.conf | 2 ++ configuration/readme.org | 16 ++++++++++++++++ webinterface/readme.org | 10 +++++----- 6 files changed, 39 insertions(+), 10 deletions(-) create mode 100755 configuration/gpio-systemd-service/activate-gpio-out.sh create mode 100644 configuration/gpio-systemd-service/activategpio.service create mode 100644 configuration/gpio-systemd-service/ttyoutput.conf create mode 100644 configuration/readme.org diff --git a/.gitignore b/.gitignore index c56f8ca..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +0,0 @@ -html/doc/* -html/media/* -cgi-bin/w -cgi-bin/v -style.css diff --git a/configuration/gpio-systemd-service/activate-gpio-out.sh b/configuration/gpio-systemd-service/activate-gpio-out.sh new file mode 100755 index 0000000..390b414 --- /dev/null +++ b/configuration/gpio-systemd-service/activate-gpio-out.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +/usr/local/bin/gpio export 4 out +/usr/local/bin/gpio export 17 out +/usr/local/bin/gpio export 27 out +/usr/local/bin/gpio export 22 out + +exit diff --git a/configuration/gpio-systemd-service/activategpio.service b/configuration/gpio-systemd-service/activategpio.service new file mode 100644 index 0000000..48378db --- /dev/null +++ b/configuration/gpio-systemd-service/activategpio.service @@ -0,0 +1,8 @@ +[Unit] +Description=Activate GPIO + +[Service] +ExecStart=/usr/local/bin/activate-gpio-out.sh + +[Install] +WantedBy=multi-user.target diff --git a/configuration/gpio-systemd-service/ttyoutput.conf b/configuration/gpio-systemd-service/ttyoutput.conf new file mode 100644 index 0000000..6a396a4 --- /dev/null +++ b/configuration/gpio-systemd-service/ttyoutput.conf @@ -0,0 +1,2 @@ +[Service] +StandardOutput=tty diff --git a/configuration/readme.org b/configuration/readme.org new file mode 100644 index 0000000..a6730da --- /dev/null +++ b/configuration/readme.org @@ -0,0 +1,16 @@ + + + This folder contains tools and scripts for initializing services, + automation stuff and adminstration scripts + +* GPIO systemd service + + 1) move activategpio.service to /etc/systemd/system/ + and ttyoutput.conf to /etc/systemd/system/activategpio.service.d/ + + 2) move activate-gpio-out.sh to /usr/local/bin/activate-gpio-out.sh + + 3) activate service with + + systemctl enable /etc/systemd/system/activategpio.service.d/ + diff --git a/webinterface/readme.org b/webinterface/readme.org index 6d68b35..08ff093 100644 --- a/webinterface/readme.org +++ b/webinterface/readme.org @@ -3,9 +3,9 @@ This folder contains all directories and files for the webinterface. The following directories go to /var/www -www/cgi-bin path to CGI scripts -www/html static files, images, css -www/html/doc system documentation -www/html/media datasheets, manuals and charts used in documentation -www/tpl html templates + - www/cgi-bin :: path to CGI scripts + - www/html :: static files, images, css + - www/html/doc :: system documentation + - www/html/media :: datasheets, manuals and charts used in documentation + - www/tpl :: html templates