Skip to content

Commit

Permalink
v1.0.4: remove restart script, add reconfigure script
Browse files Browse the repository at this point in the history
edit and update README.rst
update copyright years
  • Loading branch information
mikiair committed Jul 6, 2024
1 parent ba58662 commit ab13e25
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
16 changes: 10 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@ Required packages

Installation / Maintenance
--------------------------
After download, configure the serive by editing the file ``raspi-gpio3-shutdown.conf`` (see Configuration_).
Download raspi-gpio3-shutdown via **Code** button or from `Releases <https://github.com/mikiair/raspi-gpio3-shutdown/releases>`_ page (you most likely did already).
Unzip the received file:

``unzip raspi-gpio3-shutdown-main.zip -d ~/raspi-gpio-shutdown``

Configure the service by editing the file ``raspi-gpio3-shutdown.conf`` (see Configuration_).
Then simply run the script ``install`` in the **script** sub-folder. It will download and install the required packages,
copy the files to their destinations, will register the service, and finally start it.

For uninstall, use the second provided script ``uninstall``.

If you like to change the configuration while your system is running, you might use the script ``restart``.
This will copy the changed configuration file to **/etc** folder (overwrites previous version!), and then restart the service.
If you need to change the configuration after installation, you might use the script ``reconfigure`` after editing the source configuration file.
This will stop the service, copy the changed configuration file to **/etc** folder (overwrites previous version!), and then start the service again.

Configuration
-------------

The configuration is defined in the file ``raspi-gpio3-shutdown.conf``. Before installation, you will find it in the
folder where you unzipped the package files. After installation, the active version is in **/etc** folder.
The configuration is defined in the file ``raspi-gpio3-shutdown.conf``. Before installation, you will find the source file in the folder where you unzipped the package files.
After installation, the active version is in **/etc** folder.

The configuration file requires a section ``[GPIO]`` with one mandatory key ``Button``. The ``Button`` key must be created based on this pattern::

Expand Down
6 changes: 3 additions & 3 deletions raspi-gpio3-shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
__author__ = "Michael Heise"
__copyright__ = "Copyright (C) 2021 by Michael Heise"
__license__ = "Apache License Version 2.0"
__version__ = "1.0.3"
__date__ = "11/06/2021"
__version__ = "1.0.4"
__date__ = "07/06/2024"

# Copyright 2021 Michael Heise (mikiair)
# Copyright 2021-2024 Michael Heise (mikiair)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion raspi-gpio3-shutdown.service
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 Michael Heise (mikiair)
# Copyright 2021-2024 Michael Heise (mikiair)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion script/reconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
cd "$(dirname "$0")/.."

sudo systemctl stop raspi-gpio3-shutdown
sudo cp raspi-gpio3-shutdown.conf /etc
sudo cp -u raspi-gpio3-shutdown.conf /etc
sudo systemctl start raspi-gpio3-shutdown
systemctl status raspi-gpio3-shutdown

Expand Down
7 changes: 0 additions & 7 deletions script/restart

This file was deleted.

0 comments on commit ab13e25

Please sign in to comment.